|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.ServiceDeployment
public final class ServiceDeployment
Utilities to manipulate a foundation services deployment.
ServiceDeploymentDeleter
,
ServiceDeploymentExporter
,
ServiceDeploymentImporter
,
ServiceConfigInstaller
,
ServiceConfigUninstaller
,
ServiceConsumerUtil
,
ServiceDeployments
Constructor Summary | |
---|---|
ServiceDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent)
Constructs a representation of a foundation services deployment. |
|
ServiceDeployment(java.lang.String repositoryName,
java.lang.String softwareComponentName,
com.sas.metadata.remote.MdStore mdStore)
Constructs a representation of a foundation services deployment. |
Method Summary | |
---|---|
void |
exportServiceConfiguration(java.io.File file,
com.sas.metadata.remote.ServiceComponent serviceComponent,
boolean isExportingBaseConfig,
java.util.List appConfigNames)
Exports the specified configurations for a service to a UTF-8 encoded XML file. |
void |
exportServiceConfigurations(java.io.File exportDirectory)
Exports each consumer's service configuration to a UTF-8 encoded XML file. |
void |
exportServiceConfigurations(java.io.File exportDirectory,
java.io.File propertiesFile)
Exports each consumer's service configuration to a UTF-8 encoded XML file. |
com.sas.metadata.remote.ServiceComponent |
getServiceComponent(java.lang.String serviceInterfaceClassName)
Gets the metadata object which represents the foundation service that implements the specified interface. |
com.sas.metadata.remote.ServiceComponent |
getServiceComponent(java.lang.String serviceGroupName,
java.lang.String serviceName)
Gets the services which are defined in the deployment. |
java.util.Set |
getServiceComponents()
Gets the services which are defined in the deployment. |
static java.util.List |
getServiceConfigProperties(com.sas.metadata.remote.ServiceComponent serviceComponent)
Gets the service component's property that represents the service's configuration data. |
com.sas.metadata.remote.Property |
installServiceConfig(java.lang.String configName,
java.lang.String configDesc,
java.io.File configFile,
java.lang.String serviceInterfaceClassName)
Adds an application configuration to the foundation service that implements the specified interface. |
com.sas.metadata.remote.Property |
installServiceConfiguration(ServiceProfile serviceProfile,
com.sas.metadata.remote.ServiceComponent serviceComponent,
AbstractServiceComponentConfig newConfig,
MergePolicy mergePolicy)
Merges a configuration into the service's specified configuration. |
com.sas.metadata.remote.Property |
installServiceConfiguration(java.lang.String configName,
java.lang.String configDesc,
java.io.File configFile,
com.sas.metadata.remote.ServiceComponent serviceComponent)
Adds an application configuration to the foundation service that represented by the specified metadata service component . |
boolean |
installServiceConfiguration(java.lang.String configName,
java.lang.String configDesc,
java.io.File configFile,
java.lang.String serviceInterfaceClassName)
Adds an application configuration to the foundation service that implements the specified interface. |
com.sas.metadata.remote.Property |
installServiceConfigurationUsingPolicy(java.lang.String configName,
java.io.File configFile,
com.sas.metadata.remote.ServiceComponent serviceComponent,
MergePolicy mergePolicy)
Adds an application configuration to the foundation service that represented by the specified metadata service component . |
boolean |
isAccessibleToRemoteClients()
Determines whether the services deployment contains at least one service which is configured to be accessed by a client in a remote JVM. |
boolean |
isConfigInstalled(java.lang.String configName,
com.sas.metadata.remote.ServiceComponent serviceComponent)
Determines whether or not the service has a configuration for the specified name. |
boolean |
isConfigInstalled(java.lang.String configName,
java.lang.String serviceInterfaceClassName)
Determines whether or not the deployment contains a service that implements the specified interface has a configuration for the specified name. |
void |
mergeServiceConfiguration(java.io.File configFile,
com.sas.metadata.remote.ServiceComponent serviceComponent,
com.sas.metadata.remote.Property property)
Merges a configuration into the service's specified configuration. |
java.util.Set<com.sas.metadata.remote.ServiceComponent> |
renameConsumer(java.lang.String oldConsumerName,
java.lang.String newConsumerName)
Renames the service configuration consumer. |
void |
uninstallServiceConfiguration(AbstractServiceComponentConfig serviceConfig,
java.lang.String configName,
java.lang.String serviceInterfaceClassName,
boolean isRemoveUnusedResources)
Deletes the specified application configuration from the foundation service that implements the specified interface. |
void |
uninstallServiceConfiguration(com.sas.metadata.remote.ServiceComponent serviceComponent,
AbstractServiceComponentConfig serviceConfig,
java.lang.String configName)
Deletes the specified application configuration from the foundation service that implements the specified interface. |
void |
uninstallServiceConfiguration(com.sas.metadata.remote.ServiceComponent serviceComponent,
AbstractServiceComponentConfig serviceConfig,
java.lang.String consumerName,
boolean isRemoveUnusedResources)
Deletes the specified application configuration from the foundation service that implements the specified interface. |
Methods inherited from class com.sas.services.deployment.AbstractServiceDeployment |
---|
getSearchOptions, getServiceFactory, getSoftwareComponentName, getXMLSelectProperty |
Constructor Detail |
---|
public ServiceDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent) throws ServiceException, java.rmi.RemoteException
softwareComponent
- SoftwareComponent which represents a foundation services deployment.
ServiceException
- if unable to query the service deployment metadata.
java.rmi.RemoteException
- if a remote object failure occurs.public ServiceDeployment(java.lang.String repositoryName, java.lang.String softwareComponentName, com.sas.metadata.remote.MdStore mdStore) throws ServiceException
repositoryName
- Name of the metadata repository which contains the foundation services
deployment.softwareComponentName
- Name of the SoftwareComponent
which represents a
foundation services deployment.mdStore
- Metadata store.
ServiceException
- if unable to query the service deployment metadata.Method Detail |
---|
public java.util.Set getServiceComponents()
ServiceComponent
metadata objects representing the services
which are defined in the deployment. An empty collection will be returned if no
services are defined. The collection will be non-null
.public com.sas.metadata.remote.ServiceComponent getServiceComponent(java.lang.String serviceGroupName, java.lang.String serviceName) throws ServiceException
serviceGroupName
- Name of the group (Tree.Name
) that contains the desired
service.serviceName
- Name of the desired service (ServiceComponent.Name
) which is
a member of the specified group in this services deployment.
ServiceComponent
metadata object representing the service for the specified
service and group name or null
if the specified service is not defined.
ServiceException
- if an error is encountered.public boolean isAccessibleToRemoteClients() throws ServiceException
true
if the services deployment contains at least one service which is
intended to be accessed by a client in a remote JVM.
ServiceException
- if unable to determine if the services deployment contains services
which are accessible by remote clients.public com.sas.metadata.remote.ServiceComponent getServiceComponent(java.lang.String serviceInterfaceClassName) throws ServiceException
serviceInterfaceClassName
- The primary interface implemented by a foundation service.
Service | Primary Service Interface |
---|---|
Authentication | com.sas.services.security.AuthenticationServiceInterface |
Discovery | com.sas.services.discovery.DiscoveryServiceInterface |
Event Broker | com.sas.services.events.broker.EventBrokerServiceInterface |
Information | com.sas.services.information.InformationServiceInterface |
Session | com.sas.services.session.SessionServiceInterface |
Stored Process | com.sas.services.storedprocess.StoredProcessServiceInterface |
User | com.sas.services.user.UserServiceInterface |
null
if the deployment does not contain a service
that implements the specified interface.
ServiceException
- if unable to determine if the service deployment contains a service
that implements the specified service interface.public void exportServiceConfiguration(java.io.File file, com.sas.metadata.remote.ServiceComponent serviceComponent, boolean isExportingBaseConfig, java.util.List appConfigNames) throws ServiceException
file
- Destination file to which an aggregation of the specified service configurations
will be written as a UTF-8 encoded file.serviceComponent
- The service component whose specified configuration(s) are to be
exported to a service configuration file.isExportingBaseConfig
- true
if the base service configuration should be
exported. Specify false
you only want to export a particular
application configuration.appConfigNames
- A list of 0..* application configuration names. Each list element must
be of type String
representing the name of an application configuration
which should be exported. Only specify one name if exporting a configuration for
one application and do not include the base configuration.
ServiceException
- if unable to export the service's configuration.public com.sas.metadata.remote.Property installServiceConfiguration(java.lang.String configName, java.lang.String configDesc, java.io.File configFile, com.sas.metadata.remote.ServiceComponent serviceComponent) throws ServiceException
service component
.
Use this method if you know the service component whose configuration is to be updated. One must use this method if the services deployment contains more than one service that implements the service interface to designate the appropriate service.
configName
- The name of the application which consumes the configuration that is being
installed (e.g. "Information Delivery Portal").configDesc
- The description parameter is not used.configFile
- The file that contains a foundation services configuration which is to be
added to the service definition.serviceComponent
- The service component.
null
if the
configuration was not installed.
ServiceException
- if unable to install the specified service configuration.installServiceConfig(String, String, File, String)
public com.sas.metadata.remote.Property installServiceConfigurationUsingPolicy(java.lang.String configName, java.io.File configFile, com.sas.metadata.remote.ServiceComponent serviceComponent, MergePolicy mergePolicy) throws ServiceException
service component
.
Use this method if you know the service component whose configuration is to be updated. One must use this method if the services deployment contains more than one service that implements the service interface to designate the appropriate service.
configName
- The name of the application which consumes the configuration that is being
installed (e.g. "Information Delivery Portal").configFile
- The file that contains a foundation services configuration which is to be
added to the service definition.serviceComponent
- The service component.mergePolicy
- Policy which specifies how conflicts are handled when installing a
configuration.
null
if the
configuration was not installed.
ServiceException
- if unable to install the specified service configuration.installServiceConfig(String, String, File, String)
public boolean installServiceConfiguration(java.lang.String configName, java.lang.String configDesc, java.io.File configFile, java.lang.String serviceInterfaceClassName) throws ServiceException
installServiceConfiguration
in class AbstractServiceDeployment
configName
- The unique name for the application configuration (e.g.
"Information Delivery Portal").configDesc
- An optional description for the application configuration.configFile
- The file that contains a foundation services configuration which is to be
added to the service definition.serviceInterfaceClassName
- The fully-qualified Java class name for the primary
interface implemented by the service whose configuration is to be updated (e.g.
"com.sas.services.user.UserServiceInterface").
true
if the service configuration was installed.
ServiceException
- if unable to install the configuration into the service.public com.sas.metadata.remote.Property installServiceConfig(java.lang.String configName, java.lang.String configDesc, java.io.File configFile, java.lang.String serviceInterfaceClassName) throws ServiceException
configName
- The unique name for the application configuration (e.g.
"Information Delivery Portal").configDesc
- An optional description for the application configuration.configFile
- The file that contains a foundation services configuration which is to be
added to the service definition.serviceInterfaceClassName
- The fully-qualified Java class name for the primary
interface implemented by the service whose configuration is to be updated (e.g.
"com.sas.services.user.UserServiceInterface").
null
.
ServiceException
- if unable to install the specified service configuration.public boolean isConfigInstalled(java.lang.String configName, java.lang.String serviceInterfaceClassName) throws ServiceException
configName
- Name of a layered service configuration.serviceInterfaceClassName
- The fully-qualified name of the service's primary interface.
true
if the named service configuration is installed.
ServiceException
- if unable to determine if the service has the specified named
configuration.public boolean isConfigInstalled(java.lang.String configName, com.sas.metadata.remote.ServiceComponent serviceComponent) throws ServiceException
configName
- Name of the desired configuration.serviceComponent
- The service component to check for the specified configuration.
true
if the named service configuration is installed.
ServiceException
- if unable to determine if the service has the specified
configuration.public void mergeServiceConfiguration(java.io.File configFile, com.sas.metadata.remote.ServiceComponent serviceComponent, com.sas.metadata.remote.Property property) throws ServiceException
configFile
- The file that contains a foundation services configuration which is to be
added to the service definition.serviceComponent
- The service component.property
- The property representing the service configuration into which the
configuration to be read from the file is to be merged.
ServiceException
- if unable to merge the specified service configuration.public com.sas.metadata.remote.Property installServiceConfiguration(ServiceProfile serviceProfile, com.sas.metadata.remote.ServiceComponent serviceComponent, AbstractServiceComponentConfig newConfig, MergePolicy mergePolicy) throws ServiceException
serviceProfile
- Service's profile.serviceComponent
- The service component.newConfig
- The service configuration which is to be installed into the service's
configuration property.mergePolicy
- Policy which specifies how conflicts are handled when installing a
configuration.
null
.
ServiceException
- if unable to merge the specified service configuration.
java.lang.IllegalArgumentException
- if an invalid parameter is specified.public java.util.Set<com.sas.metadata.remote.ServiceComponent> renameConsumer(java.lang.String oldConsumerName, java.lang.String newConsumerName) throws ServiceException
oldConsumerName
- The name of the service configuration consumer which is to be renamed.newConsumerName
- The new name of the service configuration consumer.
Consumer
which was renamed.
ServiceException
- if unable to rename the service configuration consumer.public static java.util.List getServiceConfigProperties(com.sas.metadata.remote.ServiceComponent serviceComponent) throws ServiceException
serviceComponent
- Service component whose configuration properties are desired.
Property
objects representing the service component's service's
configuration or an empty list if undefined. The first property in the list
corresponds to the service's configuration. Additional properties, if defined,
correspond to v913 layered service configurations.
ServiceException
- if unable to query the service component's properties.public void uninstallServiceConfiguration(AbstractServiceComponentConfig serviceConfig, java.lang.String configName, java.lang.String serviceInterfaceClassName, boolean isRemoveUnusedResources) throws ServiceException
serviceConfig
- The service configuration from which the application's configuration
should be uninstalled.configName
- The name of the application configuration that is to be deleted (e.g.
"Information Delivery Portal").serviceInterfaceClassName
- The fully-qualified Java class name for the primary
interface implemented by the service whose configuration is to be updated (e.g.
"com.sas.services.user.UserServiceInterface").isRemoveUnusedResources
- true
service configuration resources should be
removed if they are no longer used by any consumers.
ServiceException
- if unable to uninstall the specified service configuration.public void uninstallServiceConfiguration(com.sas.metadata.remote.ServiceComponent serviceComponent, AbstractServiceComponentConfig serviceConfig, java.lang.String configName) throws ServiceException
Use
uninstallServiceConfiguration(ServiceComponent, AbstractServiceComponentConfig, String, boolean)
if you would like to remove service configuration resources if they are no longer used by any
consumers.
serviceComponent
- The metadata object that represents the SAS Foundation Service from
which a layered service configuration is to be uninstalled.configName
- The name of the application configuration that is to be deleted (e.g.
"Information Delivery Portal").
ServiceException
- if unable to uninstall the specified service configuration.#uninstallServiceConfiguration(ServiceComponent, String, boolean)
public void uninstallServiceConfiguration(com.sas.metadata.remote.ServiceComponent serviceComponent, AbstractServiceComponentConfig serviceConfig, java.lang.String consumerName, boolean isRemoveUnusedResources) throws ServiceException
The caller is responsible for persisting the updates to the metadata server.
serviceComponent
- The metadata object that represents the SAS Foundation Service from
which a layered service configuration is to be uninstalled.consumerName
- The name of the consumer whose configuration is to be removed (e.g.
"Information Delivery Portal").isRemoveUnusedResources
- true
service configuration resources should be
removed if they are no longer used by any consumers.
ServiceException
- if unable to uninstall the specified service configuration.public void exportServiceConfigurations(java.io.File exportDirectory) throws java.lang.IllegalArgumentException, ServiceException, java.rmi.RemoteException, com.sas.metadata.remote.MdException
ServiceException
java.lang.IllegalArgumentException
com.sas.metadata.remote.MdException
java.rmi.RemoteException
public void exportServiceConfigurations(java.io.File exportDirectory, java.io.File propertiesFile) throws java.lang.IllegalArgumentException, ServiceException, java.rmi.RemoteException, com.sas.metadata.remote.MdException
ServiceException
java.lang.IllegalArgumentException
com.sas.metadata.remote.MdException
java.rmi.RemoteException
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |