***  This class is subject to change   ***

com.sas.services.deployment
Class OMRMetadataSource

java.lang.Object
  |
  +--com.sas.services.deployment.AbstractMetadataSource
        |
        +--com.sas.services.deployment.OMRMetadataSource
All Implemented Interfaces:
MetadataSourceInterface,

public class OMRMetadataSource
extends AbstractMetadataSource
implements MetadataSourceInterface

SAS Metadata Repository metadata source from which a foundation services deployment can be queried.

Since:
1.0
See Also:
Serialized Form

Field Summary
static short TEMPLATE_ALL_SERVICES
          Specifies use of a template that retrieves all services.
static short TEMPLATE_REMOTE_DISCOVERY_SERVICES
          Specifies use of a template that retrieves only remote discovery services.
 
Constructor Summary
OMRMetadataSource(String omrHost, String omrPort, String omrIdentity, String omrIdentityPassword, String repositoryName, String softwareComponentName)
          Constructs an instance with the specified SAS Metadata Server host, port, identity and password, and name of the foundation service deployment that is to be deployed.
OMRMetadataSource(String omrHost, String omrPort, String omrIdentity, String omrIdentityPassword, String repositoryName, String softwareComponentName, Set serviceDeploymentNames)
          Constructs an instance with the specified SAS Metadata Server host, port, identity and password, and Set of String elements representing the foundation service deployments that are to be deployed.
OMRMetadataSource(String omrHost, String omrPort, String omrIdentity, String omrIdentityPassword, String repositoryName, String softwareComponentName, String serviceDeploymentName)
          Constructs an instance with the specified SAS Metadata Server host, port, identity and password, and name of the foundation service deployment that is to be deployed.
 
Method Summary
 void closeOMRConnection()
          Deprecated. Use AbstractMetadataSource.destroy() instead.
 boolean equals(Object other)
          Determines whether or not the other object equals this object.
protected  String getDeployFailureMessage()
          Gets a message describing this metadata source's inability to deploy services.
 MdOMRConnection getMdConnection()
          Gets the metadata SAS Metadata Server connnection.
 MdObjectStore getMdObjectStore()
          Deprecated. Use getMetadataObjectStore()
 MdOMRConnection getMdOMRConnection()
          Deprecated. Use getMdConnection()
 String getMetadata()
          Gets metadata representing a foundation services deployment queried from a SAS Metadata Repository.
 MdOMRConnection getMetadataConnection()
          Gets the connection to the metadata server.
 MdObjectStore getMetadataObjectStore()
          Gets the metadata SAS Metadata Server connnection.
 String getMetadataToDeployServices()
          Query a SAS Metadata Repository for metadata describing a foundation services deployment configuration.
 String getMetadataToLocateRemoteDiscoveryServices()
          Query a SAS Metadata Repository for metadata describing deployment configuration data for remote discovery services.
 String getRepositoryId()
          Gets SAS Metadata Server repository ID.
 int hashCode()
          Gets a hash code for this service attribute.
 String toString()
          Gets a string representation of this SAS Metadata Server metadata source which includes its host and port.
 
Methods inherited from class com.sas.services.deployment.AbstractMetadataSource
addServiceDeploymentName, destroy, getApplicationServiceDeployment, getMdObjectStore, getRMIClientSocketFactory, getRMIServerSocketFactory, getServiceDeploymentNames, getSoftwareComponentName, getStringFromInputSource, isOKToDestroy, isServiceDeploymentDeployable, isServiceDeploymentDeployable, removeServiceDeploymentName, setApplicationServiceDeployment, setIsOKToClose, setRMIClientSocketFactory, setRMIServerSocketFactory, setServiceDeploymentNames
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sas.services.deployment.MetadataSourceInterface
destroy, getApplicationServiceDeployment, getMdObjectStore, getServiceDeploymentNames, isOKToDestroy, isServiceDeploymentDeployable, isServiceDeploymentDeployable, setApplicationServiceDeployment, setIsOKToClose
 

Field Detail

TEMPLATE_ALL_SERVICES

public static final short TEMPLATE_ALL_SERVICES
Specifies use of a template that retrieves all services. It is intended for use in deploying a set of services.

TEMPLATE_REMOTE_DISCOVERY_SERVICES

public static final short TEMPLATE_REMOTE_DISCOVERY_SERVICES
Specifies use of a template that retrieves only remote discovery services. This is used in the case where one is not deploying any services, but relying upon them to have already been deployed. This template is used to obtain handles to any remote discovery services which in turn have knowledge of previously deployed services.
Constructor Detail

OMRMetadataSource

public OMRMetadataSource(String omrHost,
                         String omrPort,
                         String omrIdentity,
                         String omrIdentityPassword,
                         String repositoryName,
                         String softwareComponentName)
                  throws InitializationException
Constructs an instance with the specified SAS Metadata Server host, port, identity and password, and name of the foundation service deployment that is to be deployed.

Use this constructor if you want the ServiceLoader utility to obtain its own metadata connection to SAS Metadata Server.

Use OMRMetadataSource(String, String, String, String, String, String, Set) if more than one service deployment is to be deployed.

Parameters:
omrHost - SAS Metadata Server host.
omrPort - SAS Metadata Server port.
omrIdentity - SAS Metadata Server logon identity.
omrIdentityPassword - SAS Metadata Server logon identity's password. The password should be encoded using SAS001_ENCODING, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded using the following method. com.sas.util.SasPasswordString.encode(SasPasswordString.SAS001_ENCODING, unencodedPassword).
repositoryName - Name of the SAS Metadata Server repository that contains the service deployment.
softwareComponentName - The name of the metadata SoftwareComponent that serves as the root of the service deployment hierarchy.
Throws:
InitializationException - if unable to construct an instance.

OMRMetadataSource

public OMRMetadataSource(String omrHost,
                         String omrPort,
                         String omrIdentity,
                         String omrIdentityPassword,
                         String repositoryName,
                         String softwareComponentName,
                         String serviceDeploymentName)
                  throws InitializationException
Constructs an instance with the specified SAS Metadata Server host, port, identity and password, and name of the foundation service deployment that is to be deployed.

Use this constructor if you want the ServiceLoader utility to obtain its own metadata connection to SAS Metadata Server.

Use OMRMetadataSource(String, String, String, String, String, String, Set) if more than one service deployment is to be deployed.

Parameters:
omrHost - SAS Metadata Server host.
omrPort - SAS Metadata Server port.
omrIdentity - SAS Metadata Server logon identity.
omrIdentityPassword - SAS Metadata Server logon identity's password. The password should be encoded using SAS001_ENCODING, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded using the following method. com.sas.util.SasPasswordString.encode(SasPasswordString.SAS001_ENCODING, unencodedPassword).
repositoryName - Name of the SAS Metadata Server repository that contains the service deployment.
softwareComponentName - The name of the metadata SoftwareComponent that serves as the root of the service deployment hierarchy.
serviceDeploymentName - The name of a service deployment to be deployed. The service deployment name corresponds to the Name attribute of a metadata Tree that is a subtree of the SoftwareComponent.
Throws:
InitializationException - if unable to construct an instance.

OMRMetadataSource

public OMRMetadataSource(String omrHost,
                         String omrPort,
                         String omrIdentity,
                         String omrIdentityPassword,
                         String repositoryName,
                         String softwareComponentName,
                         Set serviceDeploymentNames)
                  throws InitializationException
Constructs an instance with the specified SAS Metadata Server host, port, identity and password, and Set of String elements representing the foundation service deployments that are to be deployed.

Use this constructor if you want the ServiceLoader utility to obtain its own metadata connection to SAS Metadata Server.

Use OMRMetadataSource(String, String, String, String, String, String) if deploying a single service deployment.

Parameters:
omrHost - SAS Metadata Server host.
omrPort - SAS Metadata Server port.
omrIdentity - SAS Metadata Server logon identity.
omrIdentityPassword - SAS Metadata Server logon identity's password. The password should be encoded using SAS001_ENCODING, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded using the following method. com.sas.util.SasPasswordString.encode(SasPasswordString.SAS001_ENCODING, unencodedPassword).
repositoryName - Name of the SAS Metadata Server repository that contains the service deployment.
softwareComponentName - The name of the metadata SoftwareComponent that serves as the root of the service deployment hierarchy.
serviceDeploymentNames - Set of String names designating the service deployments that are to be deployed. The service deployment name corresponds to the Name attribute of a metadata Tree that is a subtree of the SoftwareComponent.
Throws:
InitializationException - if unable to construct an instance.
Method Detail

getRepositoryId

public final String getRepositoryId()
Gets SAS Metadata Server repository ID.
Returns:
SAS Metadata Server repository ID or null if it is undefined.

getMdOMRConnection

public final MdOMRConnection getMdOMRConnection()
Deprecated. Use getMdConnection()

Gets the metadata SAS Metadata Server connnection.
Returns:
Metadata SAS Metadata Server connection or null if a connection is not defined.

getMdConnection

public final MdOMRConnection getMdConnection()
                                      throws ServiceException
Gets the metadata SAS Metadata Server connnection.
Returns:
Metadata SAS Metadata Server connection.
Throws:
ServiceException - if unable to obtain a connection to the metadata server.

getMdObjectStore

public final MdObjectStore getMdObjectStore()
Deprecated. Use getMetadataObjectStore()

Gets the metadata SAS Metadata Server connnection.
Overrides:
getMdObjectStore in class AbstractMetadataSource
Returns:
Metadata SAS Metadata Server connection or null if a connection is not defined.

getMetadataObjectStore

public final MdObjectStore getMetadataObjectStore()
                                           throws InitializationException
Gets the metadata SAS Metadata Server connnection.
Returns:
Metadata SAS Metadata Server connection or null if a connection is not defined.
Throws:
InitializationException - if unable to connect to the metadata server.

getMetadataConnection

public final MdOMRConnection getMetadataConnection()
                                            throws InitializationException
Gets the connection to the metadata server.

If a connection is not currently open, then an attempt will be made to open a new connection.

Returns:
Metadata server connection
Throws:
InitializationException - if unable to obtain the connection.

getMetadataToLocateRemoteDiscoveryServices

public final String getMetadataToLocateRemoteDiscoveryServices()
                                                        throws ServiceException
Query a SAS Metadata Repository for metadata describing deployment configuration data for remote discovery services.
Returns:
Metadata describing remote discovery service(s).
Throws:
ServiceException -  

getMetadataToDeployServices

public final String getMetadataToDeployServices()
                                         throws ServiceException
Query a SAS Metadata Repository for metadata describing a foundation services deployment configuration.
Returns:
Metadata describing a foundation services deployment.
Throws:
ServiceException -  

getMetadata

public final String getMetadata()
                         throws ServiceException
Gets metadata representing a foundation services deployment queried from a SAS Metadata Repository.
Specified by:
getMetadata in interface MetadataSourceInterface
Overrides:
getMetadata in class AbstractMetadataSource
Returns:
Foundation services deployment metadata.
Throws:
ServiceException - if unable to obtain metadata describing a foundation services deployment from a SAS Metadata Repository.
See Also:
MetadataSourceInterface.getMetadata()

closeOMRConnection

public final void closeOMRConnection()
Deprecated. Use AbstractMetadataSource.destroy() instead.

Destroys the metadata factory.

getDeployFailureMessage

protected final String getDeployFailureMessage()
Gets a message describing this metadata source's inability to deploy services.
Overrides:
getDeployFailureMessage in class AbstractMetadataSource
Returns:
Message describing a failure to deploy services.

toString

public String toString()
Gets a string representation of this SAS Metadata Server metadata source which includes its host and port.
Overrides:
toString in class AbstractMetadataSource
Returns:
String representation of this instance.

hashCode

public final int hashCode()
Gets a hash code for this service attribute. The hash is an XOR of all of this service's fields.
Overrides:
hashCode in class AbstractMetadataSource
Returns:
Hash code.

equals

public boolean equals(Object other)
Determines whether or not the other object equals this object.
Overrides:
equals in class AbstractMetadataSource
Parameters:
other - Other object.
Returns:
true if the objects are equivalent.

***  This class is subject to change   ***




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:53