*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.deployment
Class ServiceDeployments
java.lang.Object
com.sas.services.deployment.ServiceDeployments
@SASScope("ALL")
@BinaryCompatibilityOnly
public class ServiceDeployments
extends Object
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.
- delete
- deployment
- Service Registry
- Service
- group of services within a deployment
- get all foundation service deployments
- get the names of all foundation service deployments
- get all services for a particular service deployment
- get the foundation service deployment that owns a specified service or group
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic final voiddeleteDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent) Deletes a foundation services deployment.static final voiddeleteGroup(com.sas.metadata.remote.Tree tree, boolean isValidatingServiceDependencies) Deletes a foundation services deployment group.static final voiddeleteRegistry(com.sas.metadata.remote.DeployedComponent deployedComponent) Deletes a foundation service registry.static final voiddeleteService(com.sas.metadata.remote.ServiceComponent serviceComponent, boolean isValidatingDependentServices) Deletes a foundation service.static final String[]getNames(com.sas.meta.SASOMI.IOMI iomi, String repositoryID) Gets the names of all foundation service deployments defined in the specified metadata repository.static final com.sas.metadata.remote.ServiceComponentgetServiceComponent(com.sas.metadata.remote.MdStore mdStore, String repositoryID, String softwareComponentName, String groupName, String serviceComponentName) Gets theServiceComponentfrom the specified open metadata repository.static final com.sas.metadata.remote.SoftwareComponentgetServiceDeployment(com.sas.metadata.remote.MdStore mdStore, String repositoryID, String serviceDeploymentName) Gets theSoftwareComponentfor the specified foundation services deployment from the SAS metadata repository.static final com.sas.metadata.remote.SoftwareComponentgetServiceDeploymentForID(com.sas.metadata.remote.MdStore mdStore, String repositoryID, String serviceDeploymentID) Gets theSoftwareComponentfor the specified foundation services deployment from the SAS metadata repository for the specified FQID.static final List<com.sas.metadata.remote.SoftwareComponent> getServiceDeployments(com.sas.metadata.remote.MdStore mdStore, String repositoryID, Set<String> serviceDeploymentsToFind) GetsSoftwareComponentelements from the specified open metadata repository.static final List<com.sas.metadata.remote.SoftwareComponent> getServiceDeploymentsUsingID(com.sas.metadata.remote.MdStore mdStore, String repositoryID, Set<String> serviceDeploymentIDsToFind) GetsSoftwareComponentelements from the specified open metadata repository.static final Set<com.sas.metadata.remote.ServiceComponent> getServices(com.sas.metadata.remote.SoftwareComponent softwareComponent) GetsServiceComponentelements that are defined within the specifiedSoftwareComponent.static final Set<com.sas.metadata.remote.ServiceComponent> getServices2(com.sas.metadata.remote.SoftwareComponent softwareComponent) GetsServiceComponentelements that are defined within the specifiedSoftwareComponent.static final com.sas.metadata.remote.SoftwareComponentgetSoftwareComponent(com.sas.metadata.remote.Root root) Gets theSoftwareComponentelement that parents the metadata hierarchy in which this specified root element exists.static final com.sas.metadata.remote.SoftwareComponentgetSoftwareComponentForGroup(com.sas.metadata.remote.Tree serviceDeploymentGroup) Gets theSoftwareComponentelement that parents the metadata hierarchy in which this specified root element exists.static final voidverifyNoDependentServices(List<com.sas.metadata.remote.Tree> trees) Determines whether or not its OK to delete all services that are defined within the specified group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
deleteDeployment
public static final void deleteDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent) throws ServiceException, 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.IllegalArgumentException- if an invalid parameter is specified.
-
deleteGroup
public static final void deleteGroup(com.sas.metadata.remote.Tree tree, boolean isValidatingServiceDependencies) throws ServiceException, DependentServicesException, IllegalArgumentException Deletes a foundation services deployment group.- Parameters:
tree- Foundation services deployment group that is to be deleted.isValidatingServiceDependencies-trueif the service should not be deleted if there are any services which use it orfalseif 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.IllegalArgumentException- if an invalid parameter is specified.
-
deleteService
public static final void deleteService(com.sas.metadata.remote.ServiceComponent serviceComponent, boolean isValidatingDependentServices) throws DependentServicesException, ServiceException, IllegalArgumentException Deletes a foundation service.- Parameters:
serviceComponent- Foundation service that is to be deleted.isValidatingDependentServices-trueif 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.IllegalArgumentException- if an invalid parameter is specified.
-
deleteRegistry
public static final void deleteRegistry(com.sas.metadata.remote.DeployedComponent deployedComponent) throws ServiceException, 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.IllegalArgumentException- if an invalid parameter is specified.
-
verifyNoDependentServices
public static final void verifyNoDependentServices(List<com.sas.metadata.remote.Tree> 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 IllegalArgumentException Gets theSoftwareComponentelement that parents the metadata hierarchy in which this specified root element exists.- Parameters:
root- Metadata object for which we want to determine theSoftwareComponentthat roots its metadata hierarchy.- Returns:
- Root
SoftwareComponentelement that parents the metadata hierarchy in which this specified root element exists. Anullis returned if aSoftwareComponentis undefined. - Throws:
IllegalArgumentException- if anullparameter is specified.
-
getSoftwareComponentForGroup
public static final com.sas.metadata.remote.SoftwareComponent getSoftwareComponentForGroup(com.sas.metadata.remote.Tree serviceDeploymentGroup) throws IllegalArgumentException Gets theSoftwareComponentelement that parents the metadata hierarchy in which this specified root element exists.- Parameters:
serviceDeploymentGroup- Metadata object for which we want to determine theSoftwareComponentthat roots its metadata hierarchy.- Returns:
- Root
SoftwareComponentelement that parents the metadata hierarchy in which this specified root element exists. Anullis returned if aSoftwareComponentis undefined. - Throws:
IllegalArgumentException- if anullparameter is specified.
-
getServices
public static final Set<com.sas.metadata.remote.ServiceComponent> getServices(com.sas.metadata.remote.SoftwareComponent softwareComponent) GetsServiceComponentelements that are defined within the specifiedSoftwareComponent.- Parameters:
softwareComponent-- Returns:
- List containing elements that are of type
ServiceComponent. An empty list is returned in the event that noServiceComponentelements were found.
-
getServices2
public static final Set<com.sas.metadata.remote.ServiceComponent> getServices2(com.sas.metadata.remote.SoftwareComponent softwareComponent) throws ServiceException GetsServiceComponentelements that are defined within the specifiedSoftwareComponent.- Parameters:
softwareComponent-- Returns:
- List containing elements that are of type
ServiceComponent. An empty list is returned in the event that noServiceComponentelements 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, String repositoryID, String serviceDeploymentName) throws ServiceException Gets theSoftwareComponentfor the specified foundation services deployment from the SAS metadata repository.- Parameters:
mdStore- Metadata object store to be used to create the metadataSoftwareComponentobjects.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:
SoftwareComponentfor the specified name ornullif a service deployment was not found.- Throws:
ServiceException- if unable to get theSoftwareComponentthat represents the foundation services deployment.
-
getServiceDeploymentForID
public static final com.sas.metadata.remote.SoftwareComponent getServiceDeploymentForID(com.sas.metadata.remote.MdStore mdStore, String repositoryID, String serviceDeploymentID) throws ServiceException Gets theSoftwareComponentfor 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 metadataSoftwareComponentobjects.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:
SoftwareComponentfor the specified name ornullif a service deployment was not found.- Throws:
ServiceException- if unable to get theSoftwareComponentthat represents the foundation services deployment.- Since:
- 9.3
-
getServiceDeployments
public static final List<com.sas.metadata.remote.SoftwareComponent> getServiceDeployments(com.sas.metadata.remote.MdStore mdStore, String repositoryID, Set<String> serviceDeploymentsToFind) throws ServiceException GetsSoftwareComponentelements from the specified open metadata repository.- Parameters:
mdStore- Metadata object store to be used to create the metadataSoftwareComponentobjects.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 noSoftwareComponentelements were found. - Throws:
ServiceException- if unable to determine the service deployments.
-
getServiceDeploymentsUsingID
public static final List<com.sas.metadata.remote.SoftwareComponent> getServiceDeploymentsUsingID(com.sas.metadata.remote.MdStore mdStore, String repositoryID, Set<String> serviceDeploymentIDsToFind) throws ServiceException GetsSoftwareComponentelements from the specified open metadata repository.- Parameters:
mdStore- Metadata object store to be used to create the metadataSoftwareComponentobjects.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 noSoftwareComponentelements 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, String repositoryID, String softwareComponentName, String groupName, String serviceComponentName) throws ServiceException Gets theServiceComponentfrom the specified open metadata repository.- Parameters:
mdStore- Metadata object store to be used to create the metadataSoftwareComponentobjects.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 noSoftwareComponentelements were found. - Throws:
ServiceException- if unable to determine the service deployments.
-
getNames
public static final String[] getNames(com.sas.meta.SASOMI.IOMI iomi, 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 acom.sas.iom.SASIOMDefs.GenericErrorwhich would provide additional details describing the failure.IllegalArgumentException- if an invalid IOMI or repositoryID parameter is specified.
-