*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.deployment
Class ServiceDeploymentDeleter
java.lang.Object
com.sas.services.deployment.ServiceDeploymentDeleter
@SASScope("ALL")
@BinaryCompatibilityOnly
public final class ServiceDeploymentDeleter
extends Object
Utility used to delete a SAS Foundation Services deployment from a SAS Metadata Repository.
- Since:
- 9.2
-
Constructor Summary
ConstructorsConstructorDescriptionServiceDeploymentDeleter(com.sas.metadata.remote.SoftwareComponent softwareComponent) Constructs an instance of a utility that can be used to delete a SAS Foundation Services deployment. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDeletionTemplates(Map<String, String> deletionTemplateMap) Adds deletion templates necessary to delete the following: service component named services localized resources properties (Property) property's stored configuration (TextStore)voiddelete()Delete this metadataServiceComponentrepresenting a foundation service.static voiddeleteDeployment(String[] args) Main method for an application which is used to delete a SAS Foundation Services deployment from a SAS Metadata Repository.protected voiddeleteMetadataObjects(List<com.sas.metadata.remote.CMetadata> deletedObjects) Deletes the metadata objects specified in the list.protected static final voiddeleteProperties(com.sas.metadata.remote.Root root, List<com.sas.metadata.remote.CMetadata> deletedObjects) Removes properties from the metadata object by collecting the Property, its owning PropertyType, and its stored configuration Text eligible for deletion.protected static final voiddeleteProperty(com.sas.metadata.remote.Property property, List<com.sas.metadata.remote.CMetadata> deletedObjects) Removes properties from the metadata object by collecting the Property, its owning PropertyType, and its stored configuration Text eligible for deletion.static voiddeleteServiceDeployment(com.sas.metadata.remote.MdStore mdStore, String repositoryName, String serviceDeploymentName) Deletes the SAS Foundation Services deployment from the metadata server.static voiddeleteServiceDeploymentForID(com.sas.metadata.remote.MdStore mdStore, String repositoryName, String serviceDeploymentID) Deletes the SAS Foundation Services deployment from the metadata server which matches the specified FQID (SoftwareComponent.Id).protected static final StringGets a deletion template for a DeployedComponent.protected static final StringGets a deletion template for an Event.protected static final StringGets a deletion template for a localized resource.protected static final StringGets a deletion template for a named service.protected static final StringGets a deletion template for a DeployedComponent.protected static final StringGets a deletion template for a DeployedComponent.protected final com.sas.metadata.remote.RootgetRoot()Gets the metadata object which is to be deleted.static voidmain(String[] args) Main method for an application which is used to delete a SAS Foundation Services deployment from a SAS Metadata Repository.protected voidVerify whether or not it is OK to delete the metadata object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ServiceDeploymentDeleter
public ServiceDeploymentDeleter(com.sas.metadata.remote.SoftwareComponent softwareComponent) Constructs an instance of a utility that can be used to delete a SAS Foundation Services deployment.- Parameters:
softwareComponent- The SAS Foundation Services deployment that is to be deleted.- Throws:
IllegalArgumentException- if an invalid service deployment is specified.- Since:
- 9.2
-
-
Method Details
-
addDeletionTemplates
Adds deletion templates necessary to delete the following:- service component
- named services
- localized resources
- properties (Property)
- property's stored configuration (TextStore)
- Parameters:
deletionTemplateMap- Map keyed by a deletion template to a deletion template.- Throws:
ServiceException- if an exception occurred while attempting to delete the foundation services deployment.
-
deleteMetadataObjects
protected void deleteMetadataObjects(List<com.sas.metadata.remote.CMetadata> deletedObjects) throws ServiceException Deletes the metadata objects specified in the list. A sub-class should collect the necessary metadata objects which need to be deleted and then call this method to execute the deletion.- Parameters:
deletedObjects- Metadata objects to be deleted.- Throws:
ServiceException- if an exception occurred while attempting to delete the foundation services deployment.
-
main
public static void main(String[] args) Main method for an application which is used to delete a SAS Foundation Services deployment from a SAS Metadata Repository.SAS Foundation Service Command Line Options SAS Foundation Services Option Description -serviceDeploymentNameName of the SAS Foundation Services deployment (SoftwareComponent.Name) whose metadata is to be deleted from the SAS Metadata Server to a file -serviceDeploymentIDFQID of the SAS Foundation Services deployment (SoftwareComponent.Id) whose metadata is to be deleted from the SAS Metadata Server to a file Metadata Server
One must specify the SAS Metadata Server and the desired connection approach.
- Parameters:
args- Command line arguments specifying the metadata server, the name of the services deployment to be deleted.- -metaserver <server>
- -metaport <port>
- -metarepository <repository>
- -serviceDeploymentID <serviceDeploymentID> | -serviceDeploymentName <serviceDeploymentName>
- Connection
- using a Login Credential
- -metauser <userID>
- -metapass <password> | -password_on_stdin true (and specify -metapass via stdin)
- using SSPI
- -secpackagelist <secpackagelist>
- -metaspn <spn> (optional)
- using a Login Credential
One may optionally specify whether an option prompt is presented by specifying the command line option
-isPrompting <true|false>- Since:
- 9.2
-
deleteDeployment
Main method for an application which is used to delete a SAS Foundation Services deployment from a SAS Metadata Repository.SAS Foundation Service Command Line Options SAS Foundation Services Option Description -serviceDeploymentNameName of the SAS Foundation Services deployment (SoftwareComponent.Name) whose metadata is to be deleted from the SAS Metadata Server to a file -serviceDeploymentIDFQID of the SAS Foundation Services deployment (SoftwareComponent.Id) whose metadata is to be deleted from the SAS Metadata Server to a file Metadata Server
One must specify the SAS Metadata Server and the desired connection approach.
- Parameters:
args- Command line arguments specifying the metadata server and either the ID or name of the services deployment to be deleted.- -metaserver <server>
- -metaport <port>
- -metarepository <repository>
- -serviceDeploymentName <serviceDeploymentID> | -serviceDeploymentName <serviceDeploymentName>
- Connection
- using a Login Credential
- -metauser <userID>
- -metapass <password> | -password_on_stdin true (and specify -metapass via stdin)
- using SSPI
- -secpackagelist <secpackagelist>
- -metaspn <spn> (optional)
- using a Login Credential
One may optionally specify whether an option prompt is presented by specifying the command line option
-isPrompting <true|false>- Throws:
ServiceException- if unable to delete the deployment.- Since:
- 9.2
-
deleteServiceDeployment
public static void deleteServiceDeployment(com.sas.metadata.remote.MdStore mdStore, String repositoryName, String serviceDeploymentName) throws ServiceException Deletes the SAS Foundation Services deployment from the metadata server.- Parameters:
mdStore- Metadata store whose factory has a connection to the metadata server.repositoryName- The name of the metadata repository that contains the SAS Foundation Services deployment that is to be deleted.serviceDeploymentName- The name of the SAS Foundation Services deployment that is to be deleted from the SAS Metadata Server.- Throws:
ServiceException- if an exception is encountered.- Since:
- 9.2
-
deleteServiceDeploymentForID
public static void deleteServiceDeploymentForID(com.sas.metadata.remote.MdStore mdStore, String repositoryName, String serviceDeploymentID) throws ServiceException Deletes the SAS Foundation Services deployment from the metadata server which matches the specified FQID (SoftwareComponent.Id).- Parameters:
mdStore- Metadata store whose factory has a connection to the metadata server.repositoryName- The name of the metadata repository that contains the SAS Foundation Services deployment that is to be deleted.serviceDeploymentID- The FQID (SoftwareComponent.Id) of the SAS Foundation Services deployment that is to be deleted from the SAS Metadata Server.- Throws:
ServiceException- if an exception is encountered.- Since:
- 9.3
-
getDeleteTemplateDeployedComponent
protected static final String getDeleteTemplateDeployedComponent()Gets a deletion template for a DeployedComponent.- Returns:
- Deletion template for a deployed component.
-
getDeleteTemplateEvent
protected static final String getDeleteTemplateEvent()Gets a deletion template for an Event.- Returns:
- Deletion template for an event.
-
getDeleteTemplateLocalizedResource
protected static final String getDeleteTemplateLocalizedResource()Gets a deletion template for a localized resource.- Returns:
- Deletion template for a localized resource.
-
getDeleteTemplateNamedService
protected static final String getDeleteTemplateNamedService()Gets a deletion template for a named service.- Returns:
- Deletion template for a named service.
-
getDeleteTemplateTextStore
protected static final String getDeleteTemplateTextStore()Gets a deletion template for a DeployedComponent.- Returns:
- Deletion template for a deployed component.
-
getDeleteTemplateProperty
protected static final String getDeleteTemplateProperty()Gets a deletion template for a DeployedComponent.- Returns:
- Deletion template for a deployed component.
-
delete
Delete this metadataServiceComponentrepresenting a foundation service. Note that no other services must depend upon this service or else this deletion request will be rejected.- Throws:
DependentServicesException- if the request to delete the service was denied because another service depends upon the service being deleted.ServiceException- if unable to delete the service.
-
verifyIsOKToDelete
Verify whether or not it is OK to delete the metadata object. A sub-class should override this method to provide necessary deletion verification logic.- Throws:
ServiceException- if it is not OK to delete the metadata object.
-
deleteProperties
protected static final void deleteProperties(com.sas.metadata.remote.Root root, List<com.sas.metadata.remote.CMetadata> deletedObjects) throws com.sas.metadata.remote.MdException Removes properties from the metadata object by collecting the Property, its owning PropertyType, and its stored configuration Text eligible for deletion.- Parameters:
root- The metadata object whose properties are to be cleared.deletedObjects- List ofCMetadataobjects which are to be deleted. This list will be updated with objects which should be deleted.- Throws:
com.sas.metadata.remote.MdException- if unable to determine which objects need to be deleted.
-
deleteProperty
protected static final void deleteProperty(com.sas.metadata.remote.Property property, List<com.sas.metadata.remote.CMetadata> deletedObjects) throws com.sas.metadata.remote.MdException Removes properties from the metadata object by collecting the Property, its owning PropertyType, and its stored configuration Text eligible for deletion.- Parameters:
property- A metadata property which is to be deleted.deletedObjects- List ofCMetadataobjects which are to be deleted. This list will be updated with objects which should be deleted.- Throws:
com.sas.metadata.remote.MdException- if unable to determine which objects need to be deleted.
-
getRoot
protected final com.sas.metadata.remote.Root getRoot()Gets the metadata object which is to be deleted.- Returns:
- Metadata object.
-