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

com.sas.services.deployment
Class AbstractServiceConfigFactory

com.sas.services.deployment.AbstractServiceConfigFactory
All Implemented Interfaces:
ServiceConfigFactoryInterface
Direct Known Subclasses:
OMRServiceConfigFactory, URLServiceConfigFactory

public abstract class AbstractServiceConfigFactory
implements ServiceConfigFactoryInterface

Abstract factory used to manufacture a service configuration.

A concrete sub-class must implement the following method:

Since:
9.2

Field Summary
static java.lang.String PROPERTYNAME_INITDATA
          Value of a metadata Property's PropertyName attribute that designates a property specifying platform service initialization data.
static java.lang.String PROPERTYROLE_INITIALIZATION
          Value of a metadata StoredText's Role attribute that designates that the text string is used for initialization purposes.
 
Constructor Summary
protected AbstractServiceConfigFactory(com.sas.meta.SASOMI.IOMI omi)
          Constructs a factory which can be used to create service configurations.
 
Method Summary
protected static void addKeywordAttributes(java.util.List attributes, com.sas.metadata.remote.Root root)
          Gets a set of NameValueAttribute attributes for each Keyword associated to the specified metadata object.
protected static void addServiceAttributes(com.sas.metadata.remote.ServiceComponent serviceComponent, com.sas.metadata.remote.SoftwareComponent softwareComponent, ServiceDiscoveryConfigurationInterface serviceDiscoveryConfiguration)
          Adds service attributes to the service's discovery configuration.
abstract  ServiceConfigurationInterface createConfigForService(java.lang.String softwareComponentName, java.lang.String treeName, java.lang.String serviceComponentName, MetadataSourceInterface metadataSource, boolean isRMIExportEnabled)
          Query the service's configuration using a metadata resource adaptor.
protected  ServiceConfigurationInterface createServiceConfig(java.lang.String metadataXML, java.lang.String softwareComponentName, java.lang.String treeName, java.lang.String serviceComponentName, MetadataSourceInterface metadataSource, boolean isRMIExportEnabled)
          Creates a service configuration using the specified metadata.
 void destroy()
          Destroys this factory and its object store.
protected  com.sas.metadata.remote.MdFactory getMdFactory()
          Gets the object store's metadata factory.
protected  com.sas.metadata.remote.MdObjectStore getMdObjectStore()
          Gets the object store.
protected static java.lang.Class[] getServiceTypes(com.sas.metadata.remote.ServiceComponent serviceComponent)
          Gets the service types a deployed component supports.
 

Field Detail

PROPERTYNAME_INITDATA

public static final java.lang.String PROPERTYNAME_INITDATA
Value of a metadata Property's PropertyName attribute that designates a property specifying platform service initialization data. This value is "INIT_DATA"

See Also:
Constant Field Values

PROPERTYROLE_INITIALIZATION

public static final java.lang.String PROPERTYROLE_INITIALIZATION
Value of a metadata StoredText's Role attribute that designates that the text string is used for initialization purposes. This value is "initialization"

See Also:
Constant Field Values
Constructor Detail

AbstractServiceConfigFactory

protected AbstractServiceConfigFactory(com.sas.meta.SASOMI.IOMI omi)
                                throws ServiceException
Constructs a factory which can be used to create service configurations.

Parameters:
omi - The OMI connection to be used to query the service configuration from the metadata repository or null if querying the metadata from a services deployment export XML file.
Throws:
ServiceException - if unable to initialize a meadata object store.
Method Detail

createConfigForService

public abstract ServiceConfigurationInterface createConfigForService(java.lang.String softwareComponentName,
                                                                     java.lang.String treeName,
                                                                     java.lang.String serviceComponentName,
                                                                     MetadataSourceInterface metadataSource,
                                                                     boolean isRMIExportEnabled)
                                                              throws ServiceException
Query the service's configuration using a metadata resource adaptor. If an identity is not explicitly specified, then use a pre-configured identity obtained from the JAAS login-config.xml.

Specified by:
createConfigForService in interface ServiceConfigFactoryInterface
Parameters:
softwareComponentName - The name of the SAS Foundation Services deployment. This is the SoftwareComponent.Name.
treeName - The name of the service deployment group. This is the Tree.Name.
serviceComponentName - The name of the service component. This is the ServiceComponent.Name.
metadataSource - Metadata source.
isRMIExportEnabled - true if remote objects should be exported to the RMI system or false if they shouldn't.
Returns:
Service configuration
Throws:
ServiceException - if unable to get the service configuration. The ServiceException may wrap an exception that provides details concerning the cause of the failure.

getMdObjectStore

protected final com.sas.metadata.remote.MdObjectStore getMdObjectStore()
                                                                throws java.lang.IllegalStateException
Gets the object store.

Returns:
Metadata object store.
Throws:
java.lang.IllegalStateException - if the metadata object store has been destroyed.

getMdFactory

protected final com.sas.metadata.remote.MdFactory getMdFactory()
                                                        throws ServiceException
Gets the object store's metadata factory.

Returns:
Metadata factory.
Throws:
ServiceException - if unable to get the factory from the metadata object store.
java.lang.IllegalStateException - if the metadata object store has been destroyed.

createServiceConfig

protected ServiceConfigurationInterface createServiceConfig(java.lang.String metadataXML,
                                                            java.lang.String softwareComponentName,
                                                            java.lang.String treeName,
                                                            java.lang.String serviceComponentName,
                                                            MetadataSourceInterface metadataSource,
                                                            boolean isRMIExportEnabled)
                                                     throws ServiceException
Creates a service configuration using the specified metadata.

Parameters:
metadataXML - Metadata describing the service configuration.
softwareComponentName - The name of the SAS Foundation Services deployment. This is the SoftwareComponent.Name.
treeName - The name of the service deployment group. This is the Tree.Name.
serviceComponentName - The name of the service component. This is the ServiceComponent.Name.
metadataSource - The metadata source which will be used to query the service configuration.
isRMIExportEnabled - true if remote objects should be exported to the RMI system or false if they shouldn't.
Returns:
Service configuration.
Throws:
ServiceException - if unable to create a configuration.

destroy

public void destroy()
Destroys this factory and its object store.


getServiceTypes

protected static java.lang.Class[] getServiceTypes(com.sas.metadata.remote.ServiceComponent serviceComponent)
                                            throws ServiceException
Gets the service types a deployed component supports.

Parameters:
serviceComponent - Deployed component.
Returns:
Service types or null if no service types are supported.
Throws:
ServiceException - if unable to determine the service's service types.

addServiceAttributes

protected static void addServiceAttributes(com.sas.metadata.remote.ServiceComponent serviceComponent,
                                           com.sas.metadata.remote.SoftwareComponent softwareComponent,
                                           ServiceDiscoveryConfigurationInterface serviceDiscoveryConfiguration)
                                    throws ServiceException
Adds service attributes to the service's discovery configuration.

Parameters:
serviceComponent - Service component whose configuration is to be updated.
softwareComponent - Application that owns the services deployment.
serviceDiscoveryConfiguration - Service's discovery configuration which is to be updated with optional attributes which may be used to lookup a service.
Throws:
ServiceException - if unable to determine the service's attributes.

addKeywordAttributes

protected static void addKeywordAttributes(java.util.List attributes,
                                           com.sas.metadata.remote.Root root)
                                    throws ServiceException
Gets a set of NameValueAttribute attributes for each Keyword associated to the specified metadata object. The attribute's name corresponds to the Keyword.Name and its value corresponds to Keyword.Desc.

Parameters:
attributes - List of ServiceAttributeInterface objects to which name/value attributes describing this metadata object keywords will be added.
root - Metadata object whose associated keywords are to be represented using name/value attributes.
Throws:
ServiceException - if unable to obtain name/value attributes representing the metadata object's keywords.

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.