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

com.sas.services.deployment
Class ServiceDeploymentImporter

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

public final class ServiceDeploymentImporter
extends Thread

Utility to import metadata representing foundation service deployment(s) from a utf-8 encoded file into a SAS Metadata Repository.

Construct an instance of this utility by specifying the metadata XML that is to be imported into a SAS Metadata Repository.

Since:
1.0

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ServiceDeploymentImporter(String repositoryId, ServiceDeploymentImportFile[] serviceDeploymentImportFiles, OperationMonitorInterface operationMonitor)
          Constructs an instance of a runnable service deployment exporter.
ServiceDeploymentImporter(String repositoryId, ServiceDeploymentImportFile serviceDeploymentImportFile, OperationMonitorInterface operationMonitor)
          Constructs an instance of a runnable service deployment importer.
 
Method Summary
 void cancel()
          Processes a request to cancel this task.
 void cleanup()
          Performs housekeeping to clean up upon the completion of this task.
static void importServiceDeployment(String metadata, boolean isWellFormed)
          Populates the object store with the specified metadata.
static void importServiceDeploymentFromFile(ServiceDeploymentImportFile serviceDeploymentImportFile, String metadataRepositoryID)
          Imports metadata describing a foundation service deployment configuration from a file into the metadata object store.
 void run()
          Runs the service deployment import to load an application's foundation service deployment metadata into OMR.
static void verifyDeploymentIsImportable(String repositoryId, String serviceDeploymentName)
          Constructs an XMLSelect based upon the specified software component(s).
static void verifyServiceDeploymentsAreImportable(String repositoryId, Set serviceDeploymentsToImport)
          Constructs an XMLSelect based upon the specified software component(s).
 
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

ServiceDeploymentImporter

public ServiceDeploymentImporter(String repositoryId,
                                 ServiceDeploymentImportFile serviceDeploymentImportFile,
                                 OperationMonitorInterface operationMonitor)
                          throws InitializationException
Constructs an instance of a runnable service deployment importer. Metadata representing a foundation services deployment will be read from a foundation services deployment file and imported into a SAS Metadata Repository.

Use the Foundation Services Manager, SAS Management Console plug-in, to export a foundation services deployment to a file. This file can then be imported into a SAS Metadata Repository, so long as the service deployment name specified in the file is unique within the repository.

Parameters:
repositoryId - Metadata repository's ID.
serviceDeploymentImportFile - A file containing importable foundation service deployment metadata.
operationMonitor - An operation monitor or null if the operation won't be monitored.
Throws:
InitializationException - if unable to import the service deployment using the specified parameters.

ServiceDeploymentImporter

public ServiceDeploymentImporter(String repositoryId,
                                 ServiceDeploymentImportFile[] serviceDeploymentImportFiles,
                                 OperationMonitorInterface operationMonitor)
                          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:
repositoryId - Metadata repository's ID.
serviceDeploymentImportFiles - An array of 1..* of files containing importable foundation service deployment metadata.
operationMonitor - An operation monitor or null if the operation won't be monitored.
Throws:
InitializationException - if unable to import the service deployment using the specified parameters.
Method Detail

run

public final void run()
Runs the service deployment import to load an application's foundation service deployment metadata into OMR.
Overrides:
run in class Thread

importServiceDeploymentFromFile

public static final void importServiceDeploymentFromFile(ServiceDeploymentImportFile serviceDeploymentImportFile,
                                                         String metadataRepositoryID)
                                                  throws ServiceDeploymentImportException
Imports metadata describing a foundation service deployment configuration from a file into the metadata object store.
Parameters:
serviceDeploymentImportFile - Local file containing metadata that is to be imported into the metadata object store.
metadataRepositoryID - The ID of the SAS Metadata Repository to which the service deployment metadata is to be imported.
Throws:
ServiceDeploymentImportException - if unable to import foundation services deployment metadata from the file into a SAS Metadata Repository specified by the active workspace.

importServiceDeployment

public static final void importServiceDeployment(String metadata,
                                                 boolean isWellFormed)
                                          throws ServiceDeploymentImportException
Populates the object store with the specified metadata. Use importServiceDeploymentFromFile(ServiceDeploymentImportFile, String) instead.
Parameters:
metadata - Metadata that is to be populated into the metadata object store.
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.
Throws:
ServiceDeploymentImportException - if unable to import the application's foundation services deployment into the SAS Metadata Repository.

cancel

public final void cancel()
Processes a request to cancel this task. Cancellation is not currently implemented.

cleanup

public final void cleanup()
Performs housekeeping to clean up upon the completion of this task.

verifyDeploymentIsImportable

public static final void verifyDeploymentIsImportable(String repositoryId,
                                                      String serviceDeploymentName)
                                               throws ServiceDeploymentImportException
Constructs an XMLSelect based upon the specified software component(s). Only SoftwareComponent elements with a ClassIdentifier value representing a foundation service deployment will be selected. If the set is non-empty then only those SoftwareComponent elements will be selected based on a matching Name value.
Parameters:
repositoryId - The metadata repository's ID.
serviceDeploymentName - The name of the foundation service deployment that is to be imported.
Throws:
ServiceDeploymentImportException - if one or more foundation service deployments that are candidates for import into OMR are already defined in OMR.

verifyServiceDeploymentsAreImportable

public static final void verifyServiceDeploymentsAreImportable(String repositoryId,
                                                               Set serviceDeploymentsToImport)
                                                        throws ServiceDeploymentImportException
Constructs an XMLSelect based upon the specified software component(s). Only SoftwareComponent elements with a ClassIdentifier value representing a foundation service deployment will be selected. If the set is non-empty then only those SoftwareComponent elements will be selected based on a matching Name value.
Parameters:
repositoryId - Repository ID in OMR.
serviceDeploymentsToImport - Set of metadata String elements representing the names of the foundation service deployments that are to be imported.
Throws:
ServiceDeploymentImportException - if one or more foundation service deployments that are candidates for import into OMR are already defined in OMR.

***  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