*** This class is subject to change. ***
Class OMRMetadataSource
- All Implemented Interfaces:
MetadataSourceInterface,Serializable
A connection will be opened to the SAS Metadata Server when this object
is constructed. The creator of this object is responsible for invoking the
destroy() method to ensure that this object is destroyed and its
connection to the server closed.
Use the
OMRMetadataSource(String, String, Set, String, String, String, String, Environment)
constructor to create an instance that uses single sign-on specifying the desired
service principal name and the security package list.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortSpecifies use of a template that retrieves all services.static final shortSpecifies use of a template that retrieves only remote discovery services. -
Constructor Summary
ConstructorsConstructorDescriptionOMRMetadataSource(com.sas.meta.SASOMI.IOMI omi, String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames, Environment environment) Constructs an instance with the specified SAS Metadata Server host, port, identity and password, andSetofStringelements representing the foundation service deployments that are to be deployed.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 repositoryNameOrID, String softwareComponentName, String serviceGroupName) 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 repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames) Constructs an instance with the specified SAS Metadata Server host, port, identity and password, andSetofStringelements representing the foundation service deployments that are to be deployed.OMRMetadataSource(String omrHost, String omrPort, String omrIdentity, String omrIdentityPassword, String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames, Environment environment) Constructs an instance with the specified SAS Metadata Server host, port, identity and password, andSetofStringelements representing the foundation service deployments that are to be deployed.OMRMetadataSource(String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames, String omrHost, String omrPort, String secSPN, String secPackageList, Environment environment) Constructs an instance which will open a single sign-on connection to the specified SAS Metadata Server. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys the metadata source.booleanequals(Object other) Determines whether or not the other object equals this object.protected StringGets a message describing this metadata source's inability to deploy services.StringGets metadata representing a foundation services deployment queried from a SAS Metadata Repository.StringGets SAS Metadata Server repository ID.inthashCode()Gets a hash code for this service attribute.StringtoString()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
addRMIBinding, addServiceDeploymentName, createMdStore, getApplicationServiceDeployment, getMdObjectStore, getProperties, getRMIClientSocketFactory, getRMIServerSocketFactory, getServiceDeploymentNames, getSoftwareComponentName, getStringFromInputSource, isServiceDeploymentDeployable, isServiceDeploymentDeployable, lookupServices, removeServiceDeploymentName, setApplicationServiceDeployment, setProperties, setRMIClientSocketFactory, setRMIServerSocketFactory, setServiceDeploymentNames, setSoftwareComponentNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sas.services.deployment.MetadataSourceInterface
getApplicationServiceDeployment, getMdObjectStore, getProperties, getServiceDeploymentNames, isServiceDeploymentDeployable, isServiceDeploymentDeployable, setApplicationServiceDeployment, setProperties
-
Field Details
-
TEMPLATE_ALL_SERVICES
public static final short TEMPLATE_ALL_SERVICESSpecifies use of a template that retrieves all services. It is intended for use in deploying a set of services.- See Also:
-
TEMPLATE_REMOTE_DISCOVERY_SERVICES
public static final short TEMPLATE_REMOTE_DISCOVERY_SERVICESSpecifies 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.- See Also:
-
-
Constructor Details
-
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
ServiceLoaderutility to obtain its own metadata connection to SAS Metadata Server.Use this constructor if you want to deploy all services that are defined in the service deployment.
If you want to only deploy certain groups of services, then either use either
OMRMetadataSource(String, String, String, String, String, String, String)to only deploy services in the specified group or useOMRMetadataSource(String, String, String, String, String, String, Set)if you have multiple groups of services, and wish to deploy services in some, but not all groups (e.g. only deploy services in "Core" and "Stored Process" groups, but not any other group).A connection will be opened to the metadata server. Invoke the
destroy()method when this metadata source is no longer needed in order to close the connection to the metadata server.- Parameters:
omrHost- SAS Metadata Server host.omrPort- SAS Metadata Server port.omrIdentity- SAS Metadata Server login identity.omrIdentityPassword- SAS Metadata Server login identity's password. The password should be encoded usingSasPasswordString, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded using the following method.SasPasswordString.encode(String).repositoryName- Name of the SAS Metadata Server repository that contains the service deployment.softwareComponentName- The name of the metadataSoftwareComponentthat 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 repositoryNameOrID, String softwareComponentName, String serviceGroupName) 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
ServiceLoaderutility 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.A connection will be opened to the metadata server. Invoke the
destroy()method when this metadata source is no longer needed in order to close the connection to the metadata server.- Parameters:
omrHost- SAS Metadata Server host.omrPort- SAS Metadata Server port.omrIdentity- SAS Metadata Server login identity.omrIdentityPassword- SAS Metadata Server login identity's password. The password should be encoded usingSasPasswordString, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded usingSasPasswordString.encode(String).repositoryNameOrID- Name or ID of the SAS Metadata Server repository that contains the service deployment.softwareComponentName- The name of the metadataSoftwareComponentthat serves as the root of the service deployment hierarchy.serviceGroupName- The name of a service group that is to be deployed. Only services that are defined in this group will be deployed. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if unable to construct an instance.
-
OMRMetadataSource
public OMRMetadataSource(String omrHost, String omrPort, String omrIdentity, String omrIdentityPassword, String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames) throws InitializationException Constructs an instance with the specified SAS Metadata Server host, port, identity and password, andSetofStringelements representing the foundation service deployments that are to be deployed.Use this constructor if you want the
ServiceLoaderutility to obtain its own metadata connection to SAS Metadata Server.Use
OMRMetadataSource(String, String, String, String, String, String)if deploying a single service deployment.A connection will be opened to the metadata server. Invoke the
destroy()method when this metadata source is no longer needed in order to close the connection to the metadata server.- Parameters:
omrHost- SAS Metadata Server host.omrPort- SAS Metadata Server port.omrIdentity- SAS Metadata Server login identity.omrIdentityPassword- SAS Metadata Server login identity's password. The password should be encoded usingSasPasswordString, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded usingSasPasswordString.encode(String unencodedPassword).repositoryNameOrID- Name or ID of the SAS Metadata Server repository that contains the service deployment.softwareComponentName- The name of the metadataSoftwareComponentthat serves as the root of the service deployment hierarchy.serviceGroupNames-SetofStringnames 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" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.- Throws:
InitializationException- if unable to construct an instance.
-
OMRMetadataSource
public OMRMetadataSource(String omrHost, String omrPort, String omrIdentity, String omrIdentityPassword, String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames, Environment environment) throws InitializationException Constructs an instance with the specified SAS Metadata Server host, port, identity and password, andSetofStringelements representing the foundation service deployments that are to be deployed.Use this constructor if you want the
ServiceLoaderutility to obtain its own metadata connection to SAS Metadata Server.Use
OMRMetadataSource(String, String, String, String, String, String)if deploying a single service deployment.A connection will be opened to the metadata server. Invoke the
destroy()method when this metadata source is no longer needed in order to close the connection to the metadata server.- 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 usingSasPasswordString, but unencoded passwords are also supported. If an encoded password is desired then the password should be encoded usingSasPasswordString.encode(String).repositoryNameOrID- Name or ID of the SAS Metadata Server repository that contains the service deployment.softwareComponentName- The name of the metadataSoftwareComponentthat serves as the root of the service deployment hierarchy.serviceGroupNames-SetofStringnames 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" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.environment- The environment encapsulates resources provided by the container ornullif a container environment is not applicable.- Throws:
InitializationException- if unable to construct an instance.
-
OMRMetadataSource
public OMRMetadataSource(String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames, String omrHost, String omrPort, String secSPN, String secPackageList, Environment environment) throws ServiceException Constructs an instance which will open a single sign-on connection to the specified SAS Metadata Server.Single sign-on uses Microsoft's Security Support Provider Interface (SSPI), so one both the client and the metadata server must be running on the Windows platform.
Invoke the
destroy()method when this metadata source is no longer needed in order to release resources such as the connection to the metadata server.- Parameters:
repositoryNameOrID- Name or ID of the SAS Metadata Server repository that contains the service deployment.softwareComponentName- The name of the metadataSoftwareComponentthat serves as the root of the service deployment hierarchy.serviceGroupNames-SetofStringnames 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" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied causing all services to be deployed regardless of their group. The service group name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.omrHost- SAS Metadata Server host.omrPort- SAS Metadata Server port.secSPN- Single sign-on service principal name.secPackageList- Single sign-on security packages, e.g. "Kerberos,NTLM", (ornullfor default).environment- The environment encapsulates resources provided by the container ornullif a container environment is not applicable.- Throws:
ServiceException- if unable to construct an instance.- See Also:
-
OMRMetadataSource
public OMRMetadataSource(com.sas.meta.SASOMI.IOMI omi, String repositoryNameOrID, String softwareComponentName, Set<String> serviceGroupNames, Environment environment) throws InitializationException Constructs an instance with the specified SAS Metadata Server host, port, identity and password, andSetofStringelements representing the foundation service deployments that are to be deployed.Use this constructor if you want the
ServiceLoaderutility to obtain its own metadata connection to SAS Metadata Server.Use
OMRMetadataSource(String, String, String, String, String, String)if deploying a single service deployment.This metadata source will use the connection provided by the OMI object.
- Parameters:
omi- SAS Metadata Server OMI.repositoryNameOrID- Name or ID of the SAS Metadata Server repository that contains the service deployment.softwareComponentName- The name of the metadataSoftwareComponentthat serves as the root of the service deployment hierarchy.serviceGroupNames-SetofStringnames 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" and "Stored Process" groups, but not in any other groups). If anullor empty set is specified, then no filter will be applied. The service deployment name corresponds to theNameattribute of a metadataTreethat is a subtree of theSoftwareComponent.environment- The environment encapsulates resources provided by the container ornullif a container environment is not applicable.- Throws:
InitializationException- if unable to construct an instance.
-
-
Method Details
-
getRepositoryId
public String getRepositoryId()Gets SAS Metadata Server repository ID.- Returns:
- SAS Metadata Server repository ID or
nullif it is undefined.
-
getMetadata
Gets metadata representing a foundation services deployment queried from a SAS Metadata Repository.- Specified by:
getMetadatain interfaceMetadataSourceInterface- Specified by:
getMetadatain classAbstractMetadataSource- Returns:
- Foundation services deployment metadata.
The return value will be non-
null. - Throws:
ServiceException- if unable to obtain metadata describing a foundation services deployment from a SAS Metadata Repository.- See Also:
-
destroy
public void destroy()Destroys the metadata source.If a connection was passed into this object, then it will be cleared from the metadata factory's connection.
- Specified by:
destroyin interfaceMetadataSourceInterface- Overrides:
destroyin classAbstractMetadataSource
-
getDeployFailureMessage
protected String getDeployFailureMessage()Gets a message describing this metadata source's inability to deploy services.- Overrides:
getDeployFailureMessagein classAbstractMetadataSource- Returns:
- Message describing a failure to deploy services.
The return value will be non-
null.
-
toString
public String toString()Gets a string representation of this SAS Metadata Server metadata source which includes its host and port.- Overrides:
toStringin classAbstractMetadataSource- Returns:
- String representation of this instance.
The return value will be non-
null.
-
hashCode
public int hashCode()Gets a hash code for this service attribute. The hash is an XOR of all of this service's fields.- Overrides:
hashCodein classAbstractMetadataSource- Returns:
- Hash code.
-
equals
public boolean equals(Object other) Determines whether or not the other object equals this object.- Overrides:
equalsin classAbstractMetadataSource- Parameters:
other- Other object.- Returns:
trueif the objects are equivalent.
-