***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.deployment
Class ServiceDeployments

com.sas.services.deployment.ServiceDeployments

public class ServiceDeployments

Utility class that represents foundation service deployments which are represented as a SoftwareComponent element in an open metadata repository.

Utilities are provided for the following operations.

Since:
1.0

Method Summary
static void deleteDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent)
          Deletes a foundation services deployment.
static void deleteEvent(com.sas.metadata.remote.Event event, com.sas.metadata.remote.ServiceComponent eventBrokerService)
          Deletes an Event.
static void deleteEventBrokerService(com.sas.metadata.remote.ServiceComponent serviceComponent, boolean isValidatingDependentServices)
          Deletes a foundation Event Broker service.
static void deleteGroup(com.sas.metadata.remote.Tree tree, boolean isValidatingServiceDependencies)
          Deletes a foundation services deployment group.
static void deleteProcess(com.sas.metadata.remote.TransformationActivity process, com.sas.metadata.remote.Event triggeringEvent)
          Deletes an event process.
static void deleteRegistry(com.sas.metadata.remote.DeployedComponent deployedComponent)
          Deletes a foundation service registry.
static void deleteService(com.sas.metadata.remote.ServiceComponent serviceComponent, boolean isValidatingDependentServices)
          Deletes a foundation service.
static java.lang.String[] getNames(com.sas.meta.SASOMI.IOMI iomi, java.lang.String repositoryID)
          Gets the names of all foundation service deployments defined in the specified metadata repository.
static com.sas.metadata.remote.ServiceComponent getServiceComponent(com.sas.metadata.remote.MdStore mdStore, java.lang.String repositoryID, java.lang.String softwareComponentName, java.lang.String groupName, java.lang.String serviceComponentName)
          Gets the ServiceComponent from the specified open metadata repository.
static com.sas.metadata.remote.SoftwareComponent getServiceDeployment(com.sas.metadata.remote.MdStore mdStore, java.lang.String repositoryID, java.lang.String serviceDeploymentName)
          Gets the SoftwareComponent for the specified foundation services deployment from the SAS metadata repository.
static com.sas.metadata.remote.SoftwareComponent getServiceDeploymentForID(com.sas.metadata.remote.MdStore mdStore, java.lang.String repositoryID, java.lang.String serviceDeploymentID)
          Gets the SoftwareComponent for the specified foundation services deployment from the SAS metadata repository for the specified FQID.
static java.util.List getServiceDeployments(com.sas.metadata.remote.MdStore mdStore, java.lang.String repositoryID, java.util.Set serviceDeploymentsToFind)
          Gets SoftwareComponent elements from the specified open metadata repository.
static java.util.List<com.sas.metadata.remote.SoftwareComponent> getServiceDeploymentsUsingID(com.sas.metadata.remote.MdStore mdStore, java.lang.String repositoryID, java.util.Set<java.lang.String> serviceDeploymentIDsToFind)
          Gets SoftwareComponent elements from the specified open metadata repository.
static java.util.Set getServices(com.sas.metadata.remote.SoftwareComponent softwareComponent)
          Gets ServiceComponent elements that are defined within the specified SoftwareComponent.
static java.util.Set getServices2(com.sas.metadata.remote.SoftwareComponent softwareComponent)
          Gets ServiceComponent elements that are defined within the specified SoftwareComponent.
static com.sas.metadata.remote.SoftwareComponent getSoftwareComponent(com.sas.metadata.remote.Root root)
          Gets the SoftwareComponent element that parents the metadata hierarchy in which this specified root element exists.
static com.sas.metadata.remote.SoftwareComponent getSoftwareComponentForGroup(com.sas.metadata.remote.Tree serviceDeploymentGroup)
          Gets the SoftwareComponent element that parents the metadata hierarchy in which this specified root element exists.
static void verifyNoDependentServices(java.util.List trees)
          Determines whether or not its OK to delete all services that are defined within the specified group.
 

Method Detail

deleteDeployment

public static final void deleteDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent)
                                   throws ServiceException,
                                          java.lang.IllegalArgumentException
Deletes a foundation services deployment.

Parameters:
softwareComponent - Foundation services deployment that is to be deleted.
Throws:
ServiceException - if an exception occurred while deleting the deployment.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

deleteEvent

public static final void deleteEvent(com.sas.metadata.remote.Event event,
                                     com.sas.metadata.remote.ServiceComponent eventBrokerService)
                              throws ServiceException,
                                     java.lang.IllegalArgumentException
Deletes an Event.

Parameters:
event - Event that is to be deleted.
eventBrokerService - The event's Event Broker if the event should be removed from the Event Broker prior to deletion of the event.
Throws:
ServiceException - if an exception occurred while deleting the event.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

deleteGroup

public static final void deleteGroup(com.sas.metadata.remote.Tree tree,
                                     boolean isValidatingServiceDependencies)
                              throws ServiceException,
                                     DependentServicesException,
                                     java.lang.IllegalArgumentException
Deletes a foundation services deployment group.

Parameters:
tree - Foundation services deployment group that is to be deleted.
isValidatingServiceDependencies - true if the service should not be deleted if there are any services which use it or false if the service should be deleted without regard to it being used by any other services.
Throws:
ServiceException - if an exception occurred while deleting the group.
DependentServicesException - if unable to delete the group because a service depends upon one of the services that was to be deleted.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

deleteProcess

public static final void deleteProcess(com.sas.metadata.remote.TransformationActivity process,
                                       com.sas.metadata.remote.Event triggeringEvent)
                                throws ServiceException,
                                       java.lang.IllegalArgumentException
Deletes an event process.

Parameters:
process - Event process that is to be deleted.
triggeringEvent - The triggering event which should be removed from the process before the process is deleted or null.
Throws:
ServiceException - if an exception occurred while deleting the transformation activity.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

deleteService

public static final void deleteService(com.sas.metadata.remote.ServiceComponent serviceComponent,
                                       boolean isValidatingDependentServices)
                                throws DependentServicesException,
                                       ServiceException,
                                       java.lang.IllegalArgumentException
Deletes a foundation service.

Parameters:
serviceComponent - Foundation service that is to be deleted.
isValidatingDependentServices - true if a check should occur to ensure that a service is not being deleted which is required by another service.
Throws:
DependentServicesException - if the request to delete the service was denied because another service depends upon the service being deleted.
ServiceException - if an exception occurred while deleting the service.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

deleteEventBrokerService

public static final void deleteEventBrokerService(com.sas.metadata.remote.ServiceComponent serviceComponent,
                                                  boolean isValidatingDependentServices)
                                           throws ServiceException,
                                                  java.lang.IllegalArgumentException
Deletes a foundation Event Broker service.

Parameters:
serviceComponent - Foundation Event Broker service that is to be deleted.
isValidatingDependentServices - true if a check should occur to ensure that a service is not being deleted which is required by another service.
Throws:
ServiceException - if an exception occurred while deleting the service.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

deleteRegistry

public static final void deleteRegistry(com.sas.metadata.remote.DeployedComponent deployedComponent)
                                 throws ServiceException,
                                        java.lang.IllegalArgumentException
Deletes a foundation service registry.

Parameters:
deployedComponent - Service registry that is to be deleted.
Throws:
ServiceException - if an exception occurred while deleting the registry.
java.lang.IllegalArgumentException - if an invalid parameter is specified.

verifyNoDependentServices

public static final void verifyNoDependentServices(java.util.List trees)
                                            throws DependentServicesException
Determines whether or not its OK to delete all services that are defined within the specified group. Its OK to delete the group only if all services which depend upon services defined in the group are also members of the same group.

Parameters:
trees - Groups containing the services that are to be deleted.
Throws:
DependentServicesException - if deletion of the specified service deployment groups would result in a service that is not

getSoftwareComponent

public static final com.sas.metadata.remote.SoftwareComponent getSoftwareComponent(com.sas.metadata.remote.Root root)
                                                                            throws java.lang.IllegalArgumentException
Gets the SoftwareComponent element that parents the metadata hierarchy in which this specified root element exists.

Parameters:
root - Metadata object for which we want to determine the SoftwareComponent that roots its metadata hierarchy.
Returns:
Root SoftwareComponent element that parents the metadata hierarchy in which this specified root element exists. A null is returned if a SoftwareComponent is undefined.
Throws:
java.lang.IllegalArgumentException - if a null parameter is specified.

getSoftwareComponentForGroup

public static final com.sas.metadata.remote.SoftwareComponent getSoftwareComponentForGroup(com.sas.metadata.remote.Tree serviceDeploymentGroup)
                                                                                    throws java.lang.IllegalArgumentException
Gets the SoftwareComponent element that parents the metadata hierarchy in which this specified root element exists.

Parameters:
serviceDeploymentGroup - Metadata object for which we want to determine the SoftwareComponent that roots its metadata hierarchy.
Returns:
Root SoftwareComponent element that parents the metadata hierarchy in which this specified root element exists. A null is returned if a SoftwareComponent is undefined.
Throws:
java.lang.IllegalArgumentException - if a null parameter is specified.

getServices

public static final java.util.Set getServices(com.sas.metadata.remote.SoftwareComponent softwareComponent)
Gets ServiceComponent elements that are defined within the specified SoftwareComponent.

Parameters:
softwareComponent -
Returns:
List containing elements that are of type Tree. An empty list is returned in the event that no Tree elements were found.

getServices2

public static final java.util.Set getServices2(com.sas.metadata.remote.SoftwareComponent softwareComponent)
                                        throws ServiceException
Gets ServiceComponent elements that are defined within the specified SoftwareComponent.

Parameters:
softwareComponent -
Returns:
List containing elements that are of type Tree. An empty list is returned in the event that no Tree elements were found.
Throws:
ServiceException - if unable to get the services for the software component.

getServiceDeployment

public static final com.sas.metadata.remote.SoftwareComponent getServiceDeployment(com.sas.metadata.remote.MdStore mdStore,
                                                                                   java.lang.String repositoryID,
                                                                                   java.lang.String serviceDeploymentName)
                                                                            throws ServiceException
Gets the SoftwareComponent for the specified foundation services deployment from the SAS metadata repository.

Parameters:
mdStore - Metadata object store to be used to create the metadata SoftwareComponent objects.
repositoryID - Id of the metadata repository.
serviceDeploymentName - The name of the foundation services deployment (SoftwareComponent.Name) that is to be obtained from the metadata store.
Returns:
SoftwareComponent for the specified name or null if a service deployment was not found.
Throws:
ServiceException - if unable to get the SoftwareComponent that represents the foundation services deployment.

getServiceDeploymentForID

public static final com.sas.metadata.remote.SoftwareComponent getServiceDeploymentForID(com.sas.metadata.remote.MdStore mdStore,
                                                                                        java.lang.String repositoryID,
                                                                                        java.lang.String serviceDeploymentID)
                                                                                 throws ServiceException
Gets the SoftwareComponent for the specified foundation services deployment from the SAS metadata repository for the specified FQID.

Parameters:
mdStore - Metadata object store to be used to create the metadata SoftwareComponent objects.
repositoryID - Id of the metadata repository.
serviceDeploymentID - The FQID of the foundation services deployment (SoftwareComponent.Id) that is to be obtained from the metadata store.
Returns:
SoftwareComponent for the specified name or null if a service deployment was not found.
Throws:
ServiceException - if unable to get the SoftwareComponent that represents the foundation services deployment.
Since:
9.3

getServiceDeployments

public static final java.util.List getServiceDeployments(com.sas.metadata.remote.MdStore mdStore,
                                                         java.lang.String repositoryID,
                                                         java.util.Set serviceDeploymentsToFind)
                                                  throws ServiceException
Gets SoftwareComponent elements from the specified open metadata repository.

Parameters:
mdStore - Metadata object store to be used to create the metadata SoftwareComponent objects.
repositoryID - Id of the metadata repository.
serviceDeploymentsToFind - Set of String elements representing the SoftwareComponent.Name that is to be obtained from the metadata store.
Returns:
List containing elements that are of type SoftwareComponent. An empty list is returned in the event that no SoftwareComponent elements were found.
Throws:
ServiceException - if unable to determine the service deployments.

getServiceDeploymentsUsingID

public static final java.util.List<com.sas.metadata.remote.SoftwareComponent> getServiceDeploymentsUsingID(com.sas.metadata.remote.MdStore mdStore,
                                                                                                           java.lang.String repositoryID,
                                                                                                           java.util.Set<java.lang.String> serviceDeploymentIDsToFind)
                                                                                                    throws ServiceException
Gets SoftwareComponent elements from the specified open metadata repository.

Parameters:
mdStore - Metadata object store to be used to create the metadata SoftwareComponent objects.
repositoryID - Id of the metadata repository.
serviceDeploymentIDsToFind - Set of String elements representing one or more FQIDs (SoftwareComponent.Id of SAS Foundation Services deployments ) that are to be obtained from the metadata store.
Returns:
List containing elements that are of type SoftwareComponent. An empty list is returned in the event that no SoftwareComponent elements were found.
Throws:
ServiceException - if unable to determine the service deployments.
Since:
9.3

getServiceComponent

public static final com.sas.metadata.remote.ServiceComponent getServiceComponent(com.sas.metadata.remote.MdStore mdStore,
                                                                                 java.lang.String repositoryID,
                                                                                 java.lang.String softwareComponentName,
                                                                                 java.lang.String groupName,
                                                                                 java.lang.String serviceComponentName)
                                                                          throws ServiceException
Gets the ServiceComponent from the specified open metadata repository.

Parameters:
mdStore - Metadata object store to be used to create the metadata SoftwareComponent objects.
repositoryID - Id of the metadata repository.
softwareComponentName - The service deployment's name (i.e. SoftwareComponent.Name).
groupName - The service group's name (i.e. Tree.Name).
serviceComponentName - The service component's name (i.e. ServiceComponent.Name).
Returns:
List containing elements that are of type SoftwareComponent. An empty list is returned in the event that no SoftwareComponent elements were found.
Throws:
ServiceException - if unable to determine the service deployments.

getNames

public static final java.lang.String[] getNames(com.sas.meta.SASOMI.IOMI iomi,
                                                java.lang.String repositoryID)
                                         throws ServiceException
Gets the names of all foundation service deployments defined in the specified metadata repository.

Parameters:
iomi - IOMI to be used for the request.
repositoryID - The ID of the metadata repository to be queried.
Returns:
Names of the foundation service deployments defined in the metadata repository or an empty array if no deployments were found.
Throws:
ServiceException - if unable to perform the request. This exception may chain a com.sas.iom.SASIOMDefs.GenericError which would provide additional details describing the failure.
java.lang.IllegalArgumentException - if an invalid IOMI or repositoryID parameter is specified.

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.