|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.deployment.AbstractMetadataSource
public abstract class AbstractMetadataSource
An abstract class representing a source of metadata such as an SAS Metadata Repository or a URL accessible file containing metadata exported from a SAS Metadata Repository via the Foundation Services Manager console plug-in.
A concrete subclass must implement the abstract method
getMetadata() which is used to get the XML UTF-8 encoded metadata
describing an application's foundation service deployment.
An application is represented in a SAS Metadata Repository
as a SoftwareComponent
element. Each application will have 1..* collections of services
using a Tree to contain them. These deployment groups are
used to restrict which collections of services are deployed. When
deploying services one may specify 0..* deployment groups for a particular
application. If no groups are specified then no restriction is applied and
all groups are deployed. If 1..* deployment groups are specified then only
services defined within those groups are eligible for deployment.
OMRMetadataSource,
URLMetadataSource,
Serialized Form| Constructor Summary | |
|---|---|
protected |
AbstractMetadataSource()
Constructs a default instance. |
protected |
AbstractMetadataSource(java.util.Set<java.lang.String> serviceGroupNames)
Constructs an instance used to deploy specified foundation service deployments. |
|
AbstractMetadataSource(java.lang.String softwareComponentName,
java.util.Set<java.lang.String> serviceGroupNames)
Constructs an instance used to deploy specified foundation service deployments. |
|
AbstractMetadataSource(java.lang.String softwareComponentName,
java.lang.String serviceGroupName)
Constructs an instance with the specified foundation service deployment name. |
| Method Summary | |
|---|---|
boolean |
addRMIBinding(RMIBinding rmiBinding)
Adds an RMI binding. |
void |
addServiceDeploymentName(java.lang.String serviceDeploymentGroup)
Adds the name of a service deployment group to the set of service deployment groups that are to be deployed. |
static com.sas.metadata.remote.MdStore |
createMdStore(boolean isRemotelyAccessible,
java.util.Map<java.lang.String,java.lang.String> metaOptions,
Environment environment)
Creates a metadata object store in a new metadata factory. |
void |
destroy()
Destroys this metadata source by disposing the metadata object store. |
boolean |
equals(java.lang.Object other)
Determines whether or not the other object equals this object. |
java.lang.String |
getApplicationServiceDeployment()
Gets the name of the application's foundation services deployment. |
protected java.lang.String |
getDeployFailureMessage()
Gets a message describing this metadata source's inability to deploy services. |
com.sas.metadata.remote.MdObjectStore |
getMdObjectStore()
Gets the metadata object store. |
abstract java.lang.String |
getMetadata()
Gets metadata describing an application's foundation services deployment. |
java.util.Properties |
getProperties()
Gets the properties which define this metadata source's configuration. |
java.rmi.server.RMIClientSocketFactory |
getRMIClientSocketFactory()
Gets the RMI client socket factory. |
java.rmi.server.RMIServerSocketFactory |
getRMIServerSocketFactory()
Gets the RMI server socket factory. |
java.util.Set<java.lang.String> |
getServiceDeploymentNames()
Gets the set of service deployment names that are to be deployed. |
java.lang.String |
getSoftwareComponentName()
Gets the name of the metadata SoftwareComponent that roots
the service deployment metadata hierarchy. |
protected static java.lang.String |
getStringFromInputSource(java.io.InputStream inputStream)
Gets an XML string representing a foundation services deployment from the specified input stream. |
int |
hashCode()
Gets a hash code for this service attribute. |
boolean |
isServiceDeploymentDeployable(java.lang.String applicationServiceDeployment)
An application's foundation service deployment is deployable if: The SoftwareComponent name matches
The SoftwareComponent ClassIdentifier
designates the element as representing an application's
foundation service deployment
All of the service deployment groups to be deployed are
defined as subtree elements of the
SoftwareComponent
|
boolean |
isServiceDeploymentDeployable(java.lang.String applicationServiceDeployment,
com.sas.metadata.remote.Tree serviceGroup)
Determines whether or not the specified application service deployment's service deployment group is deployable. |
java.util.List<RemoteServiceInterface> |
lookupServices(DiscoveryServiceInterface discoveryService)
Attempts to lookup services using previously discovered RMI bindings. |
void |
removeServiceDeploymentName(java.lang.String serviceDeploymentGroup)
Removes a service deployment group name from the groups that are to be deployed. |
void |
setApplicationServiceDeployment(java.lang.String softwareComponentName)
Sets the name of the metadata SoftwareComponent that roots
an application's service deployment metadata hierarchy. |
void |
setProperties(java.util.Properties properties)
Sets the properties which define this metadata source's configuration. |
void |
setRMIClientSocketFactory(java.rmi.server.RMIClientSocketFactory socketFactory)
Sets the RMI client socket factory. |
void |
setRMIServerSocketFactory(java.rmi.server.RMIServerSocketFactory socketFactory)
Sets the RMI server socket factory. |
void |
setServiceDeploymentNames(java.util.Set<java.lang.String> serviceGroupNames)
Sets the set of deployment group names for Tree
elements. |
protected void |
setSoftwareComponentName(java.lang.String softwareComponentName)
Specifies the name of the application containing foundation service deployment metadata.The metadata SoftwareComponent that
serves as the root for the service deployment metadata hierarchy. |
java.lang.String |
toString()
Gets a string representation of this OMR metadata source. |
| Constructor Detail |
|---|
protected AbstractMetadataSource()
throws java.lang.IllegalArgumentException
AbstractMetadataSource(applicationDeployment, deploymentGroup)
or
AbstractMetadataSource(applicationDeployment, deploymentGroups)
which specify one or
more foundation service deployment names.
java.lang.IllegalArgumentException - if unable to create a metadata object store.
public AbstractMetadataSource(java.lang.String softwareComponentName,
java.util.Set<java.lang.String> serviceGroupNames)
throws InitializationException
softwareComponentName - The name of the metadata SoftwareComponent that
serves as the root of the service deployment hierarchy.serviceGroupNames - Set of String names designating the
service groups that are to be deployed. Use this parameter if
you want to deploy services that belong to specified groups, but
not all groups
(e.g. services in the "Core" group, but not in "Stored Process" group).
If a null
or empty set is specified, then no filter will be applied. The service
deployment name corresponds to the Name attribute of
a metadata Tree that is a subtree of the
SoftwareComponent.
InitializationException - if an invalid set of service deployment
names is specified.
protected AbstractMetadataSource(java.util.Set<java.lang.String> serviceGroupNames)
throws InitializationException
A subclass must initialize the name of the service deployment by
calling setSoftwareComponentName(String).
serviceGroupNames - Set of String names designating the
service groups that are to be deployed. Use this parameter if
you want to deploy services that belong to specified groups, but
not all groups
(e.g. services in the "Core" group, but not in "Stored Process" group).
If a null
or empty set is specified, then no filter will be applied. The service
deployment name corresponds to the Name attribute of
a metadata Tree that is a subtree of the
SoftwareComponent.
InitializationException - if an invalid set of service deployment
names is specified.
public AbstractMetadataSource(java.lang.String softwareComponentName,
java.lang.String serviceGroupName)
throws InitializationException
SoftwareComponent's
name attribute.
softwareComponentName - The name of the metadata SoftwareComponent that
serves as the root of the service deployment hierarchy.serviceGroupName - The name of the foundation service deployment group that is to be deployed.
This name corresponds to the metadata
Tree's Name attribute.
InitializationException - if an invalid service deployment name
is specified.| Method Detail |
|---|
public static com.sas.metadata.remote.MdStore createMdStore(boolean isRemotelyAccessible,
java.util.Map<java.lang.String,java.lang.String> metaOptions,
Environment environment)
throws ServiceException
isRemotelyAccessible - false if objects created by the metadata factory will only
be accessed from within this JVM or true if remotely accessible
objects are required.metaOptions - Options required to open a connection to the metadata server.environment - Resources environment or null if a default environment
should be used.
ServiceExceptionpublic java.util.Properties getProperties()
getProperties in interface MetadataSourceInterfacepublic void setProperties(java.util.Properties properties)
setProperties in interface MetadataSourceInterfaceproperties - Properties which define this metadata source's configuration.public final boolean isServiceDeploymentDeployable(java.lang.String applicationServiceDeployment)
SoftwareComponent name matches SoftwareComponent ClassIdentifier
designates the element as representing an application's
foundation service deploymentSoftwareComponent
isServiceDeploymentDeployable in interface MetadataSourceInterfaceapplicationServiceDeployment - Metadata SoftwareComponent being considered for
deployment
true if its OK to deploy the foundation services or
false if it isn't.MetadataSourceInterface.isServiceDeploymentDeployable(String)
public final boolean isServiceDeploymentDeployable(java.lang.String applicationServiceDeployment,
com.sas.metadata.remote.Tree serviceGroup)
isServiceDeploymentDeployable in interface MetadataSourceInterfaceapplicationServiceDeployment - Metadata SoftwareComponent being considered for
deployment.serviceGroup - Service deployment group defined under the application's service
deployment.
true if it is OK to deploy this service deployment
group for the specified application service deployment.
or false if it isn't.MetadataSourceInterface.isServiceDeploymentDeployable(String, Tree)public final java.lang.String getSoftwareComponentName()
SoftwareComponent that roots
the service deployment metadata hierarchy.
SoftwareComponent that roots
the service deployment metadata hierarchy or null
if no name is defined.public final void setApplicationServiceDeployment(java.lang.String softwareComponentName)
SoftwareComponent that roots
an application's service deployment metadata hierarchy.
setApplicationServiceDeployment in interface MetadataSourceInterfacesoftwareComponentName - Name of the metadata SoftwareComponent that roots
the service deployment metadata hierarchy or null
if no name is defined.MetadataSourceInterface.setApplicationServiceDeployment(String)public final java.util.Set<java.lang.String> getServiceDeploymentNames()
SoftwareComponent element's Name attribute.
getServiceDeploymentNames in interface MetadataSourceInterfaceString names of the service deployments that
are to be deployed. Note that this set may not contain any
elements, but it is guaranteed to be non-null.MetadataSourceInterface.getServiceDeploymentNames()public final void setServiceDeploymentNames(java.util.Set<java.lang.String> serviceGroupNames)
Tree
elements. Each element of the Set must be a
String representing the name of a service group
which is to be deployed. An empty set or null set
indicates that services will not be filtered.
serviceGroupNames - Set of String names designating the
service groups that are to be deployed. Use this parameter if
you want to deploy services that belong to specified groups, but
not all groups
(e.g. services in the "Core" group, but not in "Stored Process" group).
If a null
or empty set is specified, then no filter will be applied. The service
deployment name corresponds to the Name attribute of
a metadata Tree that is a subtree of the
SoftwareComponent.
protected final void setSoftwareComponentName(java.lang.String softwareComponentName)
throws InitializationException
SoftwareComponent that
serves as the root for the service deployment metadata hierarchy.
softwareComponentName - The name of the metadata SoftwareComponent that
serves as the root of the service deployment hierarchy.
InitializationException - if an invalid service deployment name
is specified.
public final void addServiceDeploymentName(java.lang.String serviceDeploymentGroup)
throws InitializationException
serviceDeploymentGroup - Name of a service deployment group to be added to the set that is
to be deployed.
InitializationException - if an invalid service deployment name
is specified.public final void removeServiceDeploymentName(java.lang.String serviceDeploymentGroup)
serviceDeploymentGroup - Name of a service deployment group that is to be removed from the
set of deployable groups.
public abstract java.lang.String getMetadata()
throws ServiceException
getMetadata in interface MetadataSourceInterfaceServiceException - if unable to retrieve the metadata.MetadataSourceInterface.getMetadata()public final java.lang.String getApplicationServiceDeployment()
getApplicationServiceDeployment in interface MetadataSourceInterfaceMetadataSourceInterface.getApplicationServiceDeployment()
protected static final java.lang.String getStringFromInputSource(java.io.InputStream inputStream)
throws ServiceException
inputStream - Input stream from which the metadata will be read.
Note that the input stream should be encoded using an
utf-8 character set.
null if
unable to read the string.
ServiceException - if unable to obtain a
String from the specified input source.public final java.rmi.server.RMIClientSocketFactory getRMIClientSocketFactory()
null
if the default client socket factory is desired.public final java.rmi.server.RMIServerSocketFactory getRMIServerSocketFactory()
null
if the default server socket factory is desired.public final void setRMIClientSocketFactory(java.rmi.server.RMIClientSocketFactory socketFactory)
socketFactory - RMI client socket factory or null
if the default client socket factory is desired.public final void setRMIServerSocketFactory(java.rmi.server.RMIServerSocketFactory socketFactory)
socketFactory - RMI server socket factory or null
if the default server socket factory is desired.
public final com.sas.metadata.remote.MdObjectStore getMdObjectStore()
throws java.lang.IllegalStateException
getMdObjectStore in interface MetadataSourceInterfacejava.lang.IllegalStateException - if the metadata source has been destroyed
and the metadata object store is null.public void destroy()
destroy in interface MetadataSourceInterfacepublic final boolean addRMIBinding(RMIBinding rmiBinding)
rmiBinding - RMI binding that describes a remote discovery service.
true if the RMI binding has already been
registered or was successfully added to the list of bindings.public final java.util.List<RemoteServiceInterface> lookupServices(DiscoveryServiceInterface discoveryService)
discoveryService -
servicesprotected java.lang.String getDeployFailureMessage()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - Other object.
true if the objects are equivalent.
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||