*** This class provides Binary Compatibility only, not Source Compatibility ***
Class MetadataSourceFactory
Foundation services deployment metadata may be queried from either a SAS Metadata Server or from a services deployment file which has been exported from a server using the Foundation Services Manager plug-in to the SAS Management Console.
Query Metadata from a SAS Metadata Server
The following options are supported to query foundation services deployment metadata from a SAS Metadata Server.- Open a new connection given a user ID & password
- Use a single sign-on connection
- Use a preexisting connection
User ID/Password
Foundation services deployment metadata may be queried from a SAS Metadata Server opening a connection for a specified user ID.| Property Name | Description |
|---|---|
| software_component | software component name |
| deployment_group_[n] | Optional deployment group restrictions |
| omr_host | SAS Metadata Server's host |
| omr_port | SAS Metadata Server's port |
| omr_repository | SAS Metadata Server repository |
| omr_user | User's login id |
| omr_password | User's password.
The password may be plain text or encoded using SasPasswordString. |
Single Sign-On
Foundation services deployment metadata may be queried from a SAS Metadata Server using single sign-on.| Property Name | Description |
|---|---|
| software_component | software component name |
| deployment_group_[n] | Optional deployment group restrictions |
| omr_host | SAS Metadata Server's host |
| omr_port | SAS Metadata Server's port |
| omr_repository | SAS Metadata Server repository |
| metaspn | Single sign-on security principal name. |
| secpackagelist | Single sign-on security package list (or null to use the default). |
Preexisting Connection
Foundation services deployment metadata may be queried from a SAS Metadata Server using a preexisting connection.| Property Name | Description |
|---|---|
| software_component | software component name |
| deployment_group_[n] | Optional deployment group restrictions |
| com.sas.services.connection.ConnectionInterface | An object which implements ConnectionInterface
to the SAS Metadata Server. |
Query Metadata from a Services Deployment File URL
If the foundation services deployment metadata is to be queried from a deployment file URL, specify the following properties.
| Property Name | Description |
|---|---|
| deployment_group_[n] | Optional deployment group restrictions |
| url | URL or String representation of a URL to a foundation services deployment file |
Restrict Deployment of Services to Specified Group(s)
If all groups of foundation services are to be deployed, then there is no need to designate any deployment group restrictions in the properties file since all groups are deployed by default.
deployment_group_[n] is an optional property and should only be specified if there are some deployment groupings of services which are not to be deployed.
For example, if the foundation services deployment contains three deployment groups.
- Core
- Stored Process
- Events
If one only wishes to deploy the services in the "Core" and "Stored Process" groups, then one would specify the following two properties:
- deployment_group_1=Core
- deployment_group_2=Stored Process
Note that we omitted the "Events" deployment group because we do not want to include this group's services in the deployment.
Properties File Character Encoding
Note that the ISO 8859-1 character encoding is used is used to read the properties file. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.- Since:
- 1.1.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty named "com.sas.services.connection.ConnectionInterface" that designates an object which implements aconnectionwhich should be used to query services metadata instead of opening a new connection.static final StringProperty name prefix "deployment_group_" that designates the name of a metadataTreewhich whose members represent a grouping of services which are to be deployed.static final StringProperty named "omr_host" that designates the name of the host on which a SAS Metadata Server is running.static final StringProperty named "omr_port" that designates the name of the port on which a SAS Metadata Server is listening for connections.static final StringProperty named "omr_repository" that designates the name or ID of the SAS Metadata Server's repository which contains the foundation services deployment metadata.static final StringProperty named "omr_user" that designates the user ID which should be used to open a connection to the SAS Metadata Server.static final StringProperty named "omr_password" that designates the user password which should be used to open a connection to the SAS Metadata Server.static final StringProperty named "metadatasource_mode" that designates a mode of either"url"or"omr_repository".static final StringProperty named "software_component" that designates the name of the metadataSoftwareComponentassociated with the foundation services deployment which is to be queried.static final StringProperty named "secpackagelist" that designates the single sign-on security package list which should be used.static final StringProperty named "metaspn" that designates the service principal name that should be used during single sign-on.static final StringProperty named "url" that designates a URL to a metadata source from which foundation services metadata can be queried. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataSourceInterfacecreateMetadataSource(MetadataSourceProperties metadataSourceProperties, Environment environment) Creates a metadata source based upon the specified properties.static intGets the maximum number of service deployment groups which may exist within a service deployment.static StringgetServiceGroupName(int index) Gets the name of a service deployment group for the specified index.static MetadataSourceInterfacenewMetadataSource(Properties properties) Creates a metadata source based upon the specified properties.static MetadataSourceInterfacenewMetadataSource(Properties properties, Environment environment) Creates a metadata source based upon the specified properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
PROPERTY_SOFTWARECOMPONENT
public static final String PROPERTY_SOFTWARECOMPONENTProperty named "software_component" that designates the name of the metadataSoftwareComponentassociated with the foundation services deployment which is to be queried.- See Also:
-
PROPERTY_DEPLOYMENTGROUP
public static final String PROPERTY_DEPLOYMENTGROUPProperty name prefix "deployment_group_" that designates the name of a metadataTreewhich whose members represent a grouping of services which are to be deployed. Suffix this value with an integer value beginning with "1" and incremented by one for each additional deployment group that is to be included (e.g. "deployment_group_1", "deployment_group_2", etc.).This is an optional property which is only required if the foundation services deployment metadata contains more than one services deployment group and services in some groups should not be deployed. deployment group restrictions
If all services should be deployed, then there is no need to specify this property since no restrictions are being applied.
- See Also:
-
PROPERTY_METADATASERVER_HOST
public static final String PROPERTY_METADATASERVER_HOSTProperty named "omr_host" that designates the name of the host on which a SAS Metadata Server is running.- See Also:
-
PROPERTY_METADATASERVER_PORT
public static final String PROPERTY_METADATASERVER_PORTProperty named "omr_port" that designates the name of the port on which a SAS Metadata Server is listening for connections.- See Also:
-
PROPERTY_METADATASERVER_USERID
public static final String PROPERTY_METADATASERVER_USERIDProperty named "omr_user" that designates the user ID which should be used to open a connection to the SAS Metadata Server.- See Also:
-
PROPERTY_SSO_SECPACKAGELIST
public static final String PROPERTY_SSO_SECPACKAGELISTProperty named "secpackagelist" that designates the single sign-on security package list which should be used. This value may benullto indicate that the default should be used or it may be assigned a value such as "Kerberos,NTLM" representing the list of acceptable security packages.Set the
metaspnproperty to specify the service principal name to be used for single sign-on.- See Also:
-
PROPERTY_SSO_SPN
public static final String PROPERTY_SSO_SPNProperty named "metaspn" that designates the service principal name that should be used during single sign-on.- See Also:
-
PROPERTY_METADATASERVER_USERPASSWORD
public static final String PROPERTY_METADATASERVER_USERPASSWORDProperty named "omr_password" that designates the user password which should be used to open a connection to the SAS Metadata Server. This password may be encoded usingSasPasswordString.- See Also:
-
PROPERTY_METADATASERVER_REPOSITORY
public static final String PROPERTY_METADATASERVER_REPOSITORYProperty named "omr_repository" that designates the name or ID of the SAS Metadata Server's repository which contains the foundation services deployment metadata.- See Also:
-
PROPERTY_CONNECTION
public static final String PROPERTY_CONNECTIONProperty named "com.sas.services.connection.ConnectionInterface" that designates an object which implements aconnectionwhich should be used to query services metadata instead of opening a new connection. -
PROPERTY_URL
public static final String PROPERTY_URLProperty named "url" that designates a URL to a metadata source from which foundation services metadata can be queried. Typically this value will specify the URL to a foundation services deployment file.Use this value if foundation services deployment metadata is to be queried from a URL source instead of the SAS Metadata Server.
- See Also:
-
PROPERTY_MODE
public static final String PROPERTY_MODEProperty named "metadatasource_mode" that designates a mode of either"url"or"omr_repository".The mode defaults to "url" if this property is not specified and the
"url"is defined, otherwise the mode defaults to"omr_repository"- See Also:
-
-
Method Details
-
getServiceGroupName
public static String getServiceGroupName(int index) Gets the name of a service deployment group for the specified index.- Parameters:
index- Index of the deployment group. Groups are indexed beginning with the value1and no more than {#MAX_NUM_GROUPS}.- Returns:
- Name of a service deployment group.
- Throws:
IllegalArgumentException- if an invalid index is specified.
-
getMaxNumberOfGroups
public static int getMaxNumberOfGroups()Gets the maximum number of service deployment groups which may exist within a service deployment.- Returns:
- Maximum number of groups which may exist in a service deployment.
-
createMetadataSource
public static MetadataSourceInterface createMetadataSource(MetadataSourceProperties metadataSourceProperties, Environment environment) throws ServiceException Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.The syntax of these files is described in the package documentation.
The following links provide sample properties files.
- Parameters:
metadataSourceProperties- Properties describing how to access the metadata source.environment- The environment object encapsulates resources provided by the container.- Returns:
- Metadata source. TThe caller is responsible for invoking the
metadata source's
destroy()method after services have been deployed when the metadata source is no longer needed. - Throws:
ServiceException- if unable to create a new metadata source.
-
newMetadataSource
public static MetadataSourceInterface newMetadataSource(Properties properties, Environment environment) throws ServiceException Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.The following links provide sample properties files.
- Parameters:
properties- Properties describing how to access the metadata source.environment- The environment object encapsulates resources provided by the container.- Returns:
- Metadata source. The caller is responsible for invoking the
metadata source's
destroy()method after services have been deployed when the metadata source is no longer needed. - Throws:
ServiceException- if unable to create a new metadata source.
-
newMetadataSource
public static MetadataSourceInterface newMetadataSource(Properties properties) throws ServiceException Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.This method is equivalent to calling
newMetadataSource(Properties, Environment)with anullenvironment parameter.The following links provide sample properties files.
- Parameters:
properties- Properties describing how to access the metadata source.- Returns:
- Metadata source. The caller is responsible for invoking the
metadata source's
destroy()method after services have been deployed when the metadata source is no longer needed. - Throws:
ServiceException- if unable to create a new metadata source.- See Also:
-