***  This API provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.deployment
Class ServiceDeploymentExporter

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.sas.services.deployment.ServiceDeploymentExporter
All Implemented Interfaces:

public final class ServiceDeploymentExporter
extends Thread

Exports an application's foundation services deployment configuration from a SAS Metadata Repository to a UTF-8 encoded XML file.

Construct an instance of this utility by specifying the appropriate service deployment data choosing one of the following approaches:

Since:
1.0

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ServiceDeploymentExporter(File exportDestinationFile, Set serviceDeployments, String repositoryId, boolean isBeautifyingXML)
          Constructs an instance of a runnable service deployment exporter.
ServiceDeploymentExporter(File exportDestinationFile, String serviceDeploymentXml)
          Constructs an instance of a runnable service deployment exporter.
ServiceDeploymentExporter(File exportDestinationFile, String serviceDeploymentXml, PropertyChangeListener propertyChangeListener)
          Deprecated. Property change listener is no supported.
ServiceDeploymentExporter(SoftwareComponent serviceDeployment, String repositoryId)
          Constructs an instance of a runnable service deployment exporter.
 
Method Summary
 void cancel()
          Deprecated. This action may not be cancelled.
 void cleanup()
          Deprecated. since not used
static MdObjectStore getStoreWithTemporaryMetadata(String repositoryId, 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 service deployment export to write the configuration to the specified file.
 void setServiceDeployments(Set serviceDeployments)
          Defines the set of metadata SoftwareComponent elements for which their service deployment(s) are to be exported.
 void setServiceDeploymentXml(String serviceDeploymentXml)
          Gets the XML representing the service deployment configuration.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceDeploymentExporter

public ServiceDeploymentExporter(SoftwareComponent serviceDeployment,
                                 String repositoryId)
                          throws InitializationException
Constructs an instance of a runnable service deployment exporter. The specified metadata service deployment will be exported to the specified URL destination when this exporter is run.
Parameters:
serviceDeployment - The service deployment that is to be exported.
repositoryId - Metadata repository's ID.
Throws:
InitializationException - if unable to export the service deployment using the specified parameters.

ServiceDeploymentExporter

public ServiceDeploymentExporter(File exportDestinationFile,
                                 Set serviceDeployments,
                                 String repositoryId,
                                 boolean isBeautifyingXML)
                          throws InitializationException
Constructs an instance of a runnable service deployment exporter. The specified metadata service deployment will be exported to the specified URL destination when this exporter is run.
Parameters:
exportDestinationFile - File specifying the destination to which the service deployment metadata is to be exported.
serviceDeployments - Set containing SoftwareComponent elements representing the service deployment(s) that are to be exported.
repositoryId - Metadata repository's ID.
isBeautifyingXML - true if the exported XML should be formatted to increase its legibility or false if it shouldn't.
Throws:
InitializationException - if unable to export the service deployment using the specified parameters.

ServiceDeploymentExporter

public ServiceDeploymentExporter(File exportDestinationFile,
                                 String serviceDeploymentXml)
                          throws InitializationException
Constructs an instance of a runnable service deployment exporter. The specified metadata service deployment will be exported to the specified URL destination when this exporter is run.
Parameters:
exportDestinationFile - File specifying the destination to which the service deployment metadata is to be exported.
serviceDeploymentXml - Metadata representation of a service deployment to be exported.
Throws:
InitializationException - if unable to export the service deployment using the specified parameters.

ServiceDeploymentExporter

public ServiceDeploymentExporter(File exportDestinationFile,
                                 String serviceDeploymentXml,
                                 PropertyChangeListener propertyChangeListener)
                          throws InitializationException
Deprecated. Property change listener is no supported.

Constructs an instance of a runnable service deployment exporter. The specified metadata service deployment will be exported to the specified URL destination when this exporter is run.
Parameters:
exportDestinationFile - File specifying the destination to which the service deployment metadata is to be exported.
serviceDeploymentXml - Metadata representation of a service deployment to be exported.
propertyChangeListener - Optional event listener. If specified this listener will receive a ServiceDeploymentChangeEvent to provide notification of the completion status of this operation.
Throws:
InitializationException - if unable to export the service deployment using the specified parameters.
Method Detail

run

public final void run()
Runs the service deployment export to write the configuration to the specified file.
Overrides:
run in class Thread

cancel

public final void cancel()
Deprecated. This action may not be cancelled.

Processes a request to cancel this task.

cleanup

public final void cleanup()
Deprecated. since not used

Performs housekeeping to clean up upon the completion of this task.

setServiceDeployments

public final void setServiceDeployments(Set serviceDeployments)
                                 throws InitializationException
Defines the set of metadata SoftwareComponent elements for which their service deployment(s) are to be exported.
Parameters:
serviceDeployments - Set containing SoftwareComponent elements representing the service deployment(s) that are to be exported.
Throws:
InitializationException - if an invalid set of service deployments is specified.

setServiceDeploymentXml

public final void setServiceDeploymentXml(String serviceDeploymentXml)
                                   throws InitializationException
Gets the XML representing the service deployment configuration. An XSL transform is applied to eliminate unnecessary data.
Parameters:
serviceDeploymentXml - Service deployment XML.
Throws:
InitializationException - if unable to obtain the service deployment.

getStoreWithTemporaryMetadata

public static final MdObjectStore getStoreWithTemporaryMetadata(String repositoryId,
                                                                SoftwareComponent softwareComponent)
Gets a metadata object store that has been populated with a copy of the foundation service deployment configuration metadata.
Parameters:
repositoryId - SAS Metadata Repository's ID.
softwareComponent - Metadata SoftwareComponent representing an application's services deployment configuration.
Returns:
SoftwareComponent that is a duplicate of the original except that its in a new metadata store and all of the IDs and ObjRefs are temporary. Note that the caller is responsible for disposing the object store associated with this duplicated SoftwareComponent. A null is returned if unable to obtain a duplicate.

***  This API provides Binary Compatibility only, not Source Compatibility  ***




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