|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.ServiceDeploymentImporter
public final class ServiceDeploymentImporter
Utility to import metadata representing a SAS Foundation Services deployment from a UTF-8 encoded XML file into a SAS Metadata Repository.
Construct an instance of this utility by specifying the metadata XML which is to be imported into a SAS Metadata Repository.
Use the following approach to import metadata describing a SAS Foundation Services deployment from a file into a metadata object store.
Use the following approach to asynchronous import metadata describing a SAS Foundation Services deployment from a UTF-8 encoded XML file into a metadata object store. An operation monitor should be specified, so that it can be notified if an exception occurs.
Use the following approach to synchronously import metadata describing a SAS Foundation Services deployment from a file into a metadata object store. An operation monitor should be specified, so that it can be notified if an exception occurs.
Use the following approach to import metadata describing a
SAS Foundation Services deployment from a String
into a metadata object store.
Constructor Summary | |
---|---|
ServiceDeploymentImporter(java.lang.String repositoryId,
ServiceDeploymentImportFile serviceDeploymentImportFile,
OperationMonitorInterface operationMonitor,
com.sas.metadata.remote.MdFactory mdFactory)
Constructs an instance of a runnable service deployment importer which will use the remote JOMA API. |
Method Summary | |
---|---|
void |
dispose()
Destroys this import utility releasing any resources that may have been allocated. |
static void |
importDeployment(java.lang.String[] args)
Method for an application which is used to import metadata describing a SAS Foundation Service deployment from a UTF-8 encoded XML file into a SAS Metadata Repository. |
static void |
importServiceDeployment(com.sas.metadata.remote.MdStore mdStore,
ServiceDeploymentImportFile serviceDeploymentImportFile,
java.lang.String repositoryName)
Imports a SAS Foundation Services deployment from a UTF-8 encoded SAS Foundation Services deployment XML file into the SAS Metadata Repository. |
static void |
importServiceDeployment(java.lang.String metadata,
com.sas.metadata.remote.MdStore mdStore,
boolean isWellFormed)
Populates the object store with the specified metadata. |
static void |
importServiceDeploymentFromFile(ServiceDeploymentImportFile serviceDeploymentImportFile,
java.lang.String metadataRepositoryID,
com.sas.metadata.remote.MdStore mdStore)
Imports metadata describing a SAS Foundation Services deployment configuration from a file into the metadata object store. |
static void |
main(java.lang.String[] args)
Main method for an application which is used to import metadata describing a SAS Foundation Service deployment from a UTF-8 encoded XML file into a SAS Metadata Repository. |
void |
run()
Runs the SAS Foundation Services deployment importer to load an metadata into a SAS Metadata Repository. |
static void |
verifyDeploymentIsImportable(java.lang.String repositoryId,
java.lang.String serviceDeploymentName,
com.sas.metadata.remote.MdStore mdStore)
Constructs an XMLSelect based upon the specified
software component(s) which represent
SAS Foundation Services deployments. |
static void |
verifyServiceDeploymentsAreImportable(java.lang.String repositoryId,
java.util.Set serviceDeploymentsToImport,
com.sas.metadata.remote.MdStore mdStore)
Constructs an XMLSelect based upon
the specified software component(s) which represent
SAS Foundation Services deployments. |
Constructor Detail |
---|
public ServiceDeploymentImporter(java.lang.String repositoryId, ServiceDeploymentImportFile serviceDeploymentImportFile, OperationMonitorInterface operationMonitor, com.sas.metadata.remote.MdFactory mdFactory) throws java.lang.IllegalArgumentException
Metadata representing a foundation services deployment will be read from
a foundation services deployment file and imported into
a SAS Metadata Repository when the run()
method is invoked.
Note that the caller is responsible for destroying this utility by
invoking dispose()
to release any resources allocated
by this importer after the import has been executed.
repositoryId
- SAS Metadata Repository ID.serviceDeploymentImportFile
- A file containing importable foundation service deployment metadata.operationMonitor
- An operation monitor or null
if the
operation won't be monitored.mdFactory
- Metadata factory with a connection to the SAS Metadata Server.
java.lang.IllegalArgumentException
- if unable to construct an instance due to
invalid parameters.Method Detail |
---|
public void run()
If an operation monitor is specified, then it will be run to notify the caller of the completion status of the import operation.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Runnable.run()
public static void importServiceDeploymentFromFile(ServiceDeploymentImportFile serviceDeploymentImportFile, java.lang.String metadataRepositoryID, com.sas.metadata.remote.MdStore mdStore) throws ServiceDeploymentImportException
The service deployment import occurs within a a synchronized code block to serialize access to ensure that a new deployment is verified for uniqueness.
serviceDeploymentImportFile
- UTF-8 encoded file containing metadata that is to be imported into
the metadata repository.metadataRepositoryID
- The ID of the SAS Metadata Repository to which the
service deployment metadata is to be imported.mdStore
- Metadata store initialized with a factory that
has a connection to the metadata server.
ServiceDeploymentImportException
- if unable to import
SAS Foundation Services deployment metadata from the file into
a SAS Metadata Repository specified by the active workspace.public static void importServiceDeployment(java.lang.String metadata, com.sas.metadata.remote.MdStore mdStore, boolean isWellFormed) throws ServiceDeploymentImportException
metadata
- Metadata that is to be populated into
the metadata object store.mdStore
- Metadata store initialized with a factory which
has a connection to the metadata server.isWellFormed
- false
if the specified metadata XML
needs a root element in order to be well formed
or true
if the metadata XML already
has a root element.
ServiceDeploymentImportException
- if unable to
import the SAS Foundation Services deployment
into the SAS Metadata Repository.public static void verifyDeploymentIsImportable(java.lang.String repositoryId, java.lang.String serviceDeploymentName, com.sas.metadata.remote.MdStore mdStore) throws ServiceDeploymentImportException
XMLSelect
based upon the specified
software component(s) which represent
SAS Foundation Services deployments.
Only SoftwareComponent
elements with a ClassIdentifier value
representing a SAS Foundation Services deployment will be selected.
If the set is non-empty then
only those SoftwareComponent
elements will be selected based
on a matching Name value.
repositoryId
- The ID of the SAS Metadata Repository to which the
service deployment metadata is to be imported.serviceDeploymentName
- The name of the SAS Foundation Services deployment
which is to be imported.mdStore
- Metadata store initialized with a factory that
has a connection to the metadata server.
ServiceDeploymentImportException
- if one or more
SAS Foundation Services deployments which are candidates
for import into the metadata repository are already defined.
java.lang.IllegalArgumentException
- if a null
parameter or
invalid service deployment name is specified.public static void verifyServiceDeploymentsAreImportable(java.lang.String repositoryId, java.util.Set serviceDeploymentsToImport, com.sas.metadata.remote.MdStore mdStore) throws ServiceDeploymentImportException
XMLSelect
based upon
the specified software component(s) which represent
SAS Foundation Services deployments.
Only SoftwareComponent
elements with a ClassIdentifier value
representing a SAS Foundation Services deployment will be selected.
If the set is non-empty then
only those SoftwareComponent
elements will be selected based
on a matching Name value.
repositoryId
- The ID of the SAS Metadata Repository to which the
SAS Foundation Services deployment metadata is to be imported.serviceDeploymentsToImport
- Set of metadata String
elements representing the
names of the SAS Foundation Services deployments that are
to be imported.mdStore
- Metadata store initialized with a factory that
has a connection to the metadata server.
ServiceDeploymentImportException
- if one or more
SAS Foundation Services deployments which are candidates
for import into the repository are already defined.public void dispose()
public static void main(java.lang.String[] args)
Optionally, one may also specify a new name for the service deployment that is to be created in the SAS Metadata Server. The name specified in the services deployment file is not affected.
SAS Foundation Services | |
---|---|
Option | Description |
-serviceDeploymentFile |
File that contains a UTF-8 encoded SAS Foundation Service deployment which is to be imported into the SAS Metadata Server. The Foundation Services Manager plug-in to the SAS Management Console is used to export metadata describing a services deployment to a file. |
-serviceDeploymentName |
Optional new name for the SAS Foundation Services deployment (SoftwareComponent.Name). If unspecified, then the name of the services deployment defined in the file will be used. |
One must specify the SAS Metadata Server and the desired connection approach.
args
- Command line arguments specifying the metadata server, the
name of the services deployment file to be imported and the
login ID and password needed to open a connection to the server.
One may optionally specify whether
an option prompt is presented by specifying
the command line option -isPrompting <true|false>
public static void importDeployment(java.lang.String[] args) throws ServiceException
Optionally, one may also specify a new name for the service deployment that is to be created in the SAS Metadata Server. The name specified in the services deployment file is not affected.
SAS Foundation Services | |
---|---|
Option | Description |
-serviceDeploymentFile |
File that contains a UTF-8 encoded SAS Foundation Service deployment which is to be imported into the SAS Metadata Server. The Foundation Services Manager plug-in to the SAS Management Console is used to export metadata describing a services deployment to a file. |
-serviceDeploymentName |
Optional new name for the SAS Foundation Services deployment (SoftwareComponent.Name). If unspecified, then the name of the services deployment defined in the file will be used. |
One must specify the SAS Metadata Server and the desired connection approach.
args
- Command line arguments specifying the metadata server, the
name of the services deployment file to be imported and the
login ID and password needed to open a connection to the server.
One may optionally specify whether
an option prompt is presented by specifying
the command line option -isPrompting <true|false>
ServiceException
- if unable to import the deployment.public static void importServiceDeployment(com.sas.metadata.remote.MdStore mdStore, ServiceDeploymentImportFile serviceDeploymentImportFile, java.lang.String repositoryName) throws ServiceException
mdStore
- Metadata store initialized with a factory which
has a connection to the metadata server.serviceDeploymentImportFile
- UTF-8 encoded SAS Foundation Services deployment file that is
to be imported into the SAS Metadata Server.repositoryName
- The name of the metadata repository into which the
SAS Foundation Services deployment metadata is to be imported.
ServiceException
- if an exception is encountered.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |