|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.ServiceDeploymentExporter
public final class ServiceDeploymentExporter
Exports a SAS Foundation Services deployment configuration from a SAS Metadata Repository to a UTF-8 encoded XML file.
The following example shows how to synchronously export a SAS Foundation Services deployment from a SAS Metadata Repository and then check the exporter to determine if an exception has occurred.
The following example shows how to asynchronously export a SAS Foundation Services deployment from a SAS Metadata Repository and by registering an observer which will be notified if an exception has occurred.
Constructor Summary | |
---|---|
ServiceDeploymentExporter(com.sas.metadata.remote.SoftwareComponent serviceDeployment,
java.io.File exportDestinationFile)
Constructs an instance of a runnable service deployment exporter specifying the SAS Foundation Services deployment which is to be exported and the output file to which the metadata will be written. |
|
ServiceDeploymentExporter(com.sas.metadata.remote.SoftwareComponent serviceDeployment,
java.io.File exportDestinationFile,
boolean isOKToOverwriteFile)
Constructs an instance of a runnable service deployment exporter specifying the SAS Foundation Services deployment which is to be exported, the output file to which the metadata will be written and whether it is OK to overwrite the output file if it already exists. |
Method Summary | |
---|---|
void |
addObserver(java.util.Observer observer)
Adds an observer that desires to be notified when the export operation has concluded, so that one can determine whether a ServiceException has occurred. |
void |
deleteObserver(java.util.Observer observer)
Removes an observer that no longer desires to be notified when the export operation has concluded. |
static void |
exportDeployment(java.lang.String[] args)
Method for an application which is used to export metadata describing a SAS Foundation Service deployment from a SAS Metadata Repository to a UTF-8 encoded XML file. |
static void |
exportServiceDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent,
java.lang.String fileName,
boolean isOverwriteFile)
Exports a SAS Foundation Services deployment from the metadata server to a UTF-8 encoded XML file. |
ServiceException |
getServiceException()
Gets the service exception, if any, that occurred when exporting the foundation service deployment. |
static void |
main(java.lang.String[] args)
Main method for an application which is used to export metadata describing a SAS Foundation Service deployment from a SAS Metadata Repository to a UTF-8 encoded XML file. |
static com.sas.metadata.remote.MdObjectStore |
newStoreWithCopyOfServiceDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent)
Gets a metadata object store that has been populated with a copy of the foundation service deployment configuration metadata. |
void |
run()
Runs the SAS Foundation Services deployment exporter to write the configuration to the specified file using UTF-8 encoding. |
void |
setExportDestinationFile(java.io.File exportDestinationFile)
Sets the file to which the SAS Foundation Services deployment should be exported. |
void |
setIsBeautifyingXML(boolean isBeautifyingXML)
Specifies whether the XML should be beautified to make it more legible. |
Constructor Detail |
---|
public ServiceDeploymentExporter(com.sas.metadata.remote.SoftwareComponent serviceDeployment, java.io.File exportDestinationFile) throws java.lang.IllegalArgumentException
If a file already exists, then it will be overwritten. Use
ServiceDeploymentExporter(SoftwareComponent, File, boolean)
if an exception should be thrown if the file already exists.
Use ServiceDeploymentExporter(SoftwareComponent, File, boolean)
if the output file should not be overwritten if it already exists.
serviceDeployment
- The SAS Foundation Services deployment whose metadata is to be
exported to the UTF-8 encoded XML file.exportDestinationFile
- Output file to which the SAS Foundation Services deployment
metadata is to be exported using UTF-8 encoding.
java.lang.IllegalArgumentException
- if unable to export the SAS Foundation Services
deployment using the specified parameters.ServiceDeploymentExporter(SoftwareComponent, File, boolean)
public ServiceDeploymentExporter(com.sas.metadata.remote.SoftwareComponent serviceDeployment, java.io.File exportDestinationFile, boolean isOKToOverwriteFile) throws java.lang.IllegalArgumentException
serviceDeployment
- The SAS Foundation Services deployment whose metadata is to be
exported to the UTF-8 encoded XML file.exportDestinationFile
- Output file to which the SAS Foundation Services deployment
metadata is to be exported using UTF-8 encoding.isOKToOverwriteFile
- true
if it is OK to overwrite the file or
false
if an exception should be thrown if the file
already exists.
java.lang.IllegalArgumentException
- if unable to export the service deployment
using the specified parameters.ServiceDeploymentExporter(SoftwareComponent, File)
Method Detail |
---|
public void setIsBeautifyingXML(boolean isBeautifyingXML)
isBeautifyingXML
- true
if the exported XML should be formatted
to increase its legibility or false
if it shouldn't.public void run()
If this method is invoked synchronously one may determine if the export
was successful by checking to see if a ServiceException occurred using
getServiceException()
.
If this method is invoked asynchronously one may determine if the export
was successful by registering an observer using
addObserver(Observer)
and checking to see if a ServiceException
occurs.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Runnable.run()
public static com.sas.metadata.remote.MdObjectStore newStoreWithCopyOfServiceDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent) throws java.lang.IllegalArgumentException, ServiceException
softwareComponent
- Metadata SoftwareComponent
representing a services deployment configuration.
null
is returned if unable to obtain a duplicate.
java.lang.IllegalArgumentException
- if a null
service
component is specified.
ServiceException
- if unable to create a new object store with
containing a copy of the service deployment.public void setExportDestinationFile(java.io.File exportDestinationFile) throws java.lang.IllegalArgumentException
exportDestinationFile
- File to which the SAS Foundation Services deployment
is to be exported using UTF-8 encoding.
java.lang.IllegalArgumentException
- if an invalid file is specified.public ServiceException getServiceException()
null
if the export succeeded.public void addObserver(java.util.Observer observer)
ServiceException
has occurred.
observer
- Observer to be added.public void deleteObserver(java.util.Observer observer)
observer
- Observer to be removed.public static void main(java.lang.String[] args)
The services deployment file can be exported by the Foundation Services Manager plug-in to the SAS Management Console.
SAS Foundation Services | |
---|---|
Option | Description |
-serviceDeploymentName |
Name of the SAS Foundation Services deployment (SoftwareComponent.Name) whose metadata is to be exported from the SAS Metadata Server to a file |
-serviceDeploymentFile |
Name of the file to which the SAS Foundation Services deployment metadata is to be written. A UTF-8 encoded XML file will be created. |
One must specify the SAS Metadata Server and the desired connection approach.
args
- Command line arguments specifying how to connect to the metadata server,
whether a login credential or SSPI is used, the configuration directory
for the services deployment and the name of the application whose
service configurations are to be installed or uninstalled.
One may optionally specify whether
an option prompt is presented by specifying
the command line option -isPrompting <true|false>
public static void exportDeployment(java.lang.String[] args) throws ServiceException
The services deployment file can be exported by the Foundation Services Manager plug-in to the SAS Management Console.
SAS Foundation Services | |
---|---|
Option | Description |
-serviceDeploymentName |
Name of the SAS Foundation Services deployment (SoftwareComponent.Name) whose metadata is to be exported from the SAS Metadata Server to a file |
-serviceDeploymentFile |
Name of the file to which the SAS Foundation Services deployment metadata is to be written. A UTF-8 encoded XML file will be created. |
One must specify the SAS Metadata Server and the desired connection approach.
args
- Command line arguments specifying how to connect to the metadata server,
whether a login credential or SSPI is used, the configuration directory
for the services deployment and the name of the application whose
service configurations are to be installed or uninstalled.
One may optionally specify whether
an option prompt is presented by specifying
the command line option -isPrompting <true|false>
ServiceException
- if unable to export the deployment.public static void exportServiceDeployment(com.sas.metadata.remote.SoftwareComponent softwareComponent, java.lang.String fileName, boolean isOverwriteFile) throws ServiceException
softwareComponent
- The metadata object that represents the SAS Foundation Services deployment
which is to be exported from the SAS Metadata Server.fileName
- The name of the SAS Foundation Services deployment file to which
the SAS Foundation Services deployment metadata is to be exported from
the SAS Metadata Server.isOverwriteFile
- true
if it is OK to overwrite the export file if it already
exists or false
if an exception should be thrown if the file
exists.
ServiceException
- if an exception is encountered.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |