com.sap.sdm.api.remote
Interface TargetSystemContainer


public interface TargetSystemContainer

A container for target systems. Within a TargetSystemContainer, both the ID as well as the ServerType are key attributes for the contained TargetSystem objects.

Version:
1.0

Method Summary
 void addTargetSystem(TargetSystem targetSystem)
          Adds a TargetSystem to this TargetSystemContainer.
 boolean canAddTargetSystem(TargetSystem targetSystem)
          Indicates whether the specified TargetSystem can be added to this TargetSystemContainer.
 TargetSystem getTargetSystemByID(java.lang.String id)
          Returns the TargetSystem with the specified ID.
 TargetSystem getTargetSystemByServerType(ServerType serverType)
          Returns the TargetSystem with the specified ServerType.
 TargetSystem[] getTargetSystems()
          Returns all target systems in this container.
 

Method Detail

getTargetSystems

public TargetSystem[] getTargetSystems()
                                throws RemoteException
Returns all target systems in this container.
Returns:
an array of TargetSystem

getTargetSystemByID

public TargetSystem getTargetSystemByID(java.lang.String id)
                                 throws RemoteException
Returns the TargetSystem with the specified ID.
Parameters:
id - the ID of the TargetSystem
Returns:
a TargetSystem with the specified ID, if contained by this TargetSystemContainer; null otherwise
Throws:
NullPointerException - if id is null

getTargetSystemByServerType

public TargetSystem getTargetSystemByServerType(ServerType serverType)
                                         throws RemoteException
Returns the TargetSystem with the specified ServerType.
Parameters:
serverType - the ServerType
Returns:
a TargetSystem with the specified ServerType, if contained in this TargetSystemContainer; null otherwise
Throws:
NullPointerException - if serverType is null

canAddTargetSystem

public boolean canAddTargetSystem(TargetSystem targetSystem)
                           throws RemoteException
Indicates whether the specified TargetSystem can be added to this TargetSystemContainer. A TargetSystem can be added to this TargetSystemContainer, if this TargetSystemContainer contains neither a TargetSystem with the same ID nor a TargetSystem with the same ServerType as the specified TargetSystem.
Parameters:
targetSystem - the specified TargetSystem
Returns:
true if targetSystem can be added; false otherwise
Throws:
NullPointerException - if targetSystem is null

addTargetSystem

public void addTargetSystem(TargetSystem targetSystem)
                     throws RemoteException,
                            java.io.IOException
Adds a TargetSystem to this TargetSystemContainer. As a precondition, no TargetSystem with identical ID or identical ServerType must be contained in this TargetSystemContainer. After adding the repository is saved to disk.
Parameters:
targetSystem - the TargetSystem to be added
Throws:
java.lang.IllegalArgumentException - if this TargetSystemContainer contains a TargetSystem with the same ID or with the same ServerType
NullPointerException - if targetSystem is null
java.io.IOException - if saving of the repository fails after the targetsystem was added
See Also:
canAddTargetSystem(TargetSystem)