*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.deployment
Class AbstractServiceConfigFactory
java.lang.Object
com.sas.services.deployment.AbstractServiceConfigFactory
- All Implemented Interfaces:
ServiceConfigFactoryInterface
- Direct Known Subclasses:
OMRServiceConfigFactory,URLServiceConfigFactory
@SASScope("ALL")
@BinaryCompatibilityOnly
public abstract class AbstractServiceConfigFactory
extends Object
implements ServiceConfigFactoryInterface
Abstract factory used to manufacture a service configuration.
A concrete sub-class must implement the following method:
- Since:
- 9.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue of a metadataProperty'sPropertyNameattribute that designates a property specifying platform service initialization data.static final StringValue of a metadataStoredText'sRoleattribute that designates that the text string is used for initialization purposes. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractServiceConfigFactory(com.sas.meta.SASOMI.IOMI omi) Constructs a factory which can be used to create service configurations. -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddKeywordAttributes(List<ServiceAttributeInterface> attributes, com.sas.metadata.remote.Root root) Gets a set ofNameValueAttributeattributes for each Keyword associated to the specified metadata object.protected static voidaddServiceAttributes(com.sas.metadata.remote.ServiceComponent serviceComponent, com.sas.metadata.remote.SoftwareComponent softwareComponent, ServiceDiscoveryConfigurationInterface serviceDiscoveryConfiguration) Adds service attributes to the service's discovery configuration.abstract ServiceConfigurationInterfacecreateConfigForService(String softwareComponentName, String treeName, String serviceComponentName, MetadataSourceInterface metadataSource, boolean isRMIExportEnabled) Query the service's configuration using a metadata resource adaptor.protected ServiceConfigurationInterfacecreateServiceConfig(String metadataXML, String softwareComponentName, String treeName, String serviceComponentName, MetadataSourceInterface metadataSource, boolean isRMIExportEnabled) Creates a service configuration using the specified metadata.voiddestroy()Destroys this factory and its object store.protected final com.sas.metadata.remote.MdFactoryGets the object store's metadata factory.protected final com.sas.metadata.remote.MdObjectStoreGets the object store.protected static Class[]getServiceTypes(com.sas.metadata.remote.ServiceComponent serviceComponent) Gets the service types a deployed component supports.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
PROPERTYNAME_INITDATA
public static final String PROPERTYNAME_INITDATAValue of a metadataProperty'sPropertyNameattribute that designates a property specifying platform service initialization data. This value is "INIT_DATA"- See Also:
-
PROPERTYROLE_INITIALIZATION
public static final String PROPERTYROLE_INITIALIZATIONValue of a metadataStoredText'sRoleattribute that designates that the text string is used for initialization purposes. This value is "initialization"- See Also:
-
-
Constructor Details
-
AbstractServiceConfigFactory
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 ornullif querying the metadata from a services deployment export XML file.- Throws:
ServiceException- if unable to initialize a meadata object store.
-
-
Method Details
-
createConfigForService
public abstract ServiceConfigurationInterface createConfigForService(String softwareComponentName, String treeName, 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:
createConfigForServicein interfaceServiceConfigFactoryInterface- Parameters:
softwareComponentName- The name of the SAS Foundation Services deployment. This is theSoftwareComponent.Name.treeName- The name of the service deployment group. This is theTree.Name.serviceComponentName- The name of the service component. This is theServiceComponent.Name.metadataSource- Metadata source.isRMIExportEnabled-trueif remote objects should be exported to the RMI system orfalseif 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 IllegalStateExceptionGets the object store.- Returns:
- Metadata object store.
- Throws:
IllegalStateException- if the metadata object store has been destroyed.
-
getMdFactory
Gets the object store's metadata factory.- Returns:
- Metadata factory.
- Throws:
ServiceException- if unable to get the factory from the metadata object store.IllegalStateException- if the metadata object store has been destroyed.
-
createServiceConfig
protected ServiceConfigurationInterface createServiceConfig(String metadataXML, String softwareComponentName, String treeName, 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 theSoftwareComponent.Name.treeName- The name of the service deployment group. This is theTree.Name.serviceComponentName- The name of the service component. This is theServiceComponent.Name.metadataSource- The metadata source which will be used to query the service configuration.isRMIExportEnabled-trueif remote objects should be exported to the RMI system orfalseif 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 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
nullif 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(List<ServiceAttributeInterface> attributes, com.sas.metadata.remote.Root root) throws ServiceException Gets a set ofNameValueAttributeattributes 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 ofServiceAttributeInterfaceobjects to whichname/valueattributes 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.
-