com.sap.sdm.api.remote
Interface HelperFactory


public interface HelperFactory

Enables the client to create objects that are not provided by the SDM server.

Version:
1.0

Method Summary
 ComponentVersionHandlingRule createComponentVersionHandlingRule(int ruleAsInt)
          Creates a ComponentVersionHandlingRule according to the specified int represantation of the rule.
 DeployItem createDeployItem(java.io.File archive)
          Creates a DeployItem for the specified archive.
 ErrorHandlingRule createErrorHandlingRule(int ruleAsInt)
          Creates a ErrorHandlingRule according to the specified int represantation of the rule.
 Param createParam(ParamType type, java.lang.String name, java.lang.Object value, boolean shallBeHidden)
          Deprecated.  
 Param createParam(ParamType type, java.lang.String name, java.lang.String displayName, java.lang.Object value, boolean shallBeHidden)
          Creates a Param object with the specified type, name, display name, value and "hidden" attribute.
 TargetSystem createTargetSystem(java.lang.String id, ServerType type, java.lang.String description)
          Creates a TargetSystem object with the specified ID, type and an optional description.
 ParamType createType(int typeAsInt)
          Creates a ParamType object with the specified type.
 UnDeployItem createUndeployItem(java.lang.String vendor, java.lang.String name)
          Creates a UnDeployItem.
 UnDeployItem createUndeployItem(java.lang.String vendor, java.lang.String name, java.lang.String location, java.lang.String counter)
          Creates a UnDeployItem.
 

Method Detail

createParam

public Param createParam(ParamType type,
                         java.lang.String name,
                         java.lang.String displayName,
                         java.lang.Object value,
                         boolean shallBeHidden)
                  throws RemoteException
Creates a Param object with the specified type, name, display name, value and "hidden" attribute. The type has to correspond to one of the permitted types specified by ParamTypes. The value has to match the specified type.
Parameters:
type - the ParamType of the parameter
name - the name of the parameter
displayName - the display name of the parameter
value - the value of the parameter; for primitive types, an instance of the corresponding wrapper class has to be provided; null is a possible value
shallBeHidden - indicates whether the value should be displayed or transported in clear text or decrypted
Returns:
a Param with the specified properties
Throws:
java.lang.IllegalArgumentException - if type does not represent a permitted type or value does not match the specified type
NullPointerException - if type or name is null
See Also:
ParamTypes

createParam

public Param createParam(ParamType type,
                         java.lang.String name,
                         java.lang.Object value,
                         boolean shallBeHidden)
                  throws RemoteException
Deprecated.  

Creates a Param object with the specified type, name, value and "hidden" attribute. The type has to correspond to one of the permitted types specified by ParamTypes. The value has to match the specified type. This is a deprecated version of the method above which uses a new parameter displayName. Using this method means that the displayName will be set to the value of name internally.
Parameters:
type - the ParamType of the parameter
name - the name of the parameter
value - the value of the parameter; for primitive types, an instance of the corresponding wrapper class has to be provided; null is a possible value
shallBeHidden - indicates whether the value should be displayed or transported in clear text or decrypted
Returns:
a Param with the specified properties
Throws:
java.lang.IllegalArgumentException - if type does not represent a permitted type or value does not match the specified type
NullPointerException - if type or name is null
See Also:
ParamTypes

createType

public ParamType createType(int typeAsInt)
                     throws RemoteException
Creates a ParamType object with the specified type. The type has to correspond to one of the permitted types specified by ParamTypes.
Parameters:
typeAsInt - an int representation of the type; the permitted values are defined in ParamTypes
Returns:
a ParamType
Throws:
java.lang.IllegalArgumentException - if the value of typeAsInt is not permitted
See Also:
ParamTypes

createTargetSystem

public TargetSystem createTargetSystem(java.lang.String id,
                                       ServerType type,
                                       java.lang.String description)
                                throws RemoteException
Creates a TargetSystem object with the specified ID, type and an optional description. The type has to be one of the types returned by SDMConfig.
Parameters:
id - a String defining the ID of the target system
type - the ServerType of the target system
description - a String providing a description of the target system; may be null
Returns:
a TargetSystem with the specified properties
Throws:
java.lang.IllegalArgumentException - if type represents an unknown server type
NullPointerException - if id or type is null
See Also:
SDMConfig, ServerType, TargetSystem

createDeployItem

public DeployItem createDeployItem(java.io.File archive)
                            throws RemoteException,
                                   java.io.IOException
Creates a DeployItem for the specified archive.
Parameters:
archive - a File specifying the archive
Returns:
a DeployItem for the specified archive
Throws:
java.io.IOException - if an I/O exception of some sort has occurred
NullPointerException - if archive is null

createComponentVersionHandlingRule

public ComponentVersionHandlingRule createComponentVersionHandlingRule(int ruleAsInt)
                                                                throws RemoteException
Creates a ComponentVersionHandlingRule according to the specified int represantation of the rule.
Parameters:
ruleAsInt - a int specifying the type of rule wanted
Returns:
a ComponentVersionHandlingRule
Throws:
java.lang.IllegalArgumentException - if the specified int represantation is unknown
See Also:
for possible values

createErrorHandlingRule

public ErrorHandlingRule createErrorHandlingRule(int ruleAsInt)
                                          throws RemoteException
Creates a ErrorHandlingRule according to the specified int represantation of the rule. This method is new with API client version 5.
Parameters:
ruleAsInt - a int specifying the type of rule wanted
Returns:
a ErrorHandlingRule
Throws:
java.lang.IllegalArgumentException - if the specified int represantation is unknown
See Also:
for possible values

createUndeployItem

public UnDeployItem createUndeployItem(java.lang.String vendor,
                                       java.lang.String name)
                                throws RemoteException
Creates a UnDeployItem. The two arguments vendor and name are used to identify the component line (development or software component) of the deployment that should be undeployed. Thus any deployment that belongs to the same component line will be undeployed not matter what the current version (location/counter) of the deployment is.
Parameters:
vendor - the vendor of the component to be undeployed
name - the name of the component to be undeployed
Returns:
a UnDeployItem
Throws:
java.lang.IllegalArgumentException - if vendor or name was null

createUndeployItem

public UnDeployItem createUndeployItem(java.lang.String vendor,
                                       java.lang.String name,
                                       java.lang.String location,
                                       java.lang.String counter)
                                throws RemoteException
Creates a UnDeployItem. The four arguments vendor, name, location and counter are used to identify the component (development or software component) of the deployment that should be undeployed.
Parameters:
vendor - the vendor of the component to be undeployed
name - the name of the component to be undeployed
location - the location of the component to be undeployed
counter - the counter of the component to be undeployed
Returns:
a UnDeployItem
Throws:
java.lang.IllegalArgumentException - if vendor, name, location or counter was null or counter had a wrong format.