com.ibm.datapower.wamt.clientAPI
Class ServiceConfiguration

java.lang.Object
  extended by com.ibm.datapower.wamt.clientAPI.ServiceConfiguration

public class ServiceConfiguration
extends java.lang.Object

The ServiceConfiguration is created for the services in the source configuration to be deployed.

See Also:
ServiceDeployment

Field Summary
static java.lang.String COPYRIGHT_2012_2013
           
 
Constructor Summary
ServiceConfiguration(URLSource urlSource)
          Construct a ServiceConfiguration with the URL of source configuration.
 
Method Summary
 ConfigService[] getAvailableServices(Device device)
          Get all available services in the Service Configuration for deployment.
 ConfigService[] getServicesForDeployment()
          Get the services to be deployed.
 void setServicesForDeployment(ConfigService[] services)
          Set the services to be deployed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_2012_2013

public static final java.lang.String COPYRIGHT_2012_2013
See Also:
Constant Field Values
Constructor Detail

ServiceConfiguration

public ServiceConfiguration(URLSource urlSource)
                     throws java.net.URISyntaxException
Construct a ServiceConfiguration with the URL of source configuration. The schemes of url only support "file:///", "http://", "https://" and "device://" in this release. URISyntaxException exception is thrown if the urlSource is not valid.

Parameters:
urlSource - is a URLSource that points to the configuration that should be deployed to the Device for service deployment
Method Detail

getAvailableServices

public ConfigService[] getAvailableServices(Device device)
                                     throws AMPException,
                                            DeletedException,
                                            UnsuccessfulOperationException,
                                            java.io.IOException,
                                            DeletedException,
                                            NotExistException,
                                            InUseException,
                                            InvalidParameterException
Get all available services in the Service Configuration for deployment. The result are cached for later invocation setServicesForDeployment(ConfigService[])

Note: The firmware version of parameter device must be 5.0.0 or higher.

Parameters:
device - The device is used to get the available service in the source configuration
Returns:
a ConfigService array contains all available service(s) to deploy

setServicesForDeployment

public void setServicesForDeployment(ConfigService[] services)
                              throws NotExistException,
                                     InvalidParameterException
Set the services to be deployed. The parameter services must be the subset of services returned from getAvailableServices(Device), meaning the null is not allowed.

By default, all services in the source configuration (returned from getAvailableServices(Device) ) will be deployed if this method is not called.

Parameters:
services - A service array contains service(s) to be deployed
See Also:
getServicesForDeployment()

getServicesForDeployment

public ConfigService[] getServicesForDeployment()
Get the services to be deployed. The result is the same as the getAvailableServices(Device) if setServicesForDeployment(ConfigService[]) was not invoked.

Returns:
a ConfigService array contains service(s) to be deployed
See Also:
setServicesForDeployment(ConfigService[])


© Copyright IBM Corp. 2006, 2010 All Rights Reserved.