|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.ServiceDeploymentImportFile
public class ServiceDeploymentImportFile
This class represents a foundation services deployment file that was
exported
from a SAS Metadata foundation
repository. The Foundation Services Manager plug-in to the SAS Management Console
provides the capability to export a services deployment.
The services deployment file is a UTF-8 encoded XML that contains SAS metadata describing
an application's foundation services deployment. This file may
be later imported
into a SAS Metadata Repository.
The name of the service deployment may be changed by designating a new
name using setServiceDeploymentName(String name)
. This capability can
be used to rename a foundation services deployment (SoftwareComponent.Name)
that is being imported into a SAS Metadata repository.
Constructor Summary | |
---|---|
ServiceDeploymentImportFile(java.io.File importFile)
Constructs a representation of a foundation service deployment import file. |
|
ServiceDeploymentImportFile(java.io.InputStream inputStream)
Constructs a representation of a foundation service deployment import file by reading metadata from an input stream. |
Method Summary | |
---|---|
void |
destroy()
Destroys this instance. |
java.io.File |
getFile()
Gets the file containing the foundation services deployment metadata that is to be imported into a SAS Metadata Repository. |
java.lang.String |
getMetadata()
Gets the foundation services deployment metadata from the file. |
java.lang.String |
getServiceDeploymentName()
Gets the name of the application's foundation services deployment. |
static java.lang.String |
renameServiceDeployment(java.lang.String inputXML,
java.lang.String newServiceDeploymentName)
Takes a string representing an application's foundation services deployment metadata and updates the name of the SoftwareComponent to the newly specified name. |
void |
setServiceDeploymentName(java.lang.String name)
Sets the name of the application's foundation services deployment. |
static ServiceException |
validateFile(java.io.File file)
Determines whether or not the specified file contains a valid foundation services deployment. |
Constructor Detail |
---|
public ServiceDeploymentImportFile(java.io.File importFile) throws java.lang.IllegalArgumentException
importFile
- File containing a foundation service deployment that can be imported
into a SAS Metadata Repository.
java.lang.IllegalArgumentException
- if an invalid file is specified.public ServiceDeploymentImportFile(java.io.InputStream inputStream) throws java.lang.IllegalArgumentException
inputStream
- Input stream from which foundation service deployment metadata is
to be read for import into a SAS Metadata Repository. The input stream
will be closed once its been read.
java.lang.IllegalArgumentException
- if unable to obtain foundation
services metadata from the specified input stream.Method Detail |
---|
public final java.io.File getFile()
public void destroy()
public final java.lang.String getMetadata() throws ServiceDeploymentImportException
null
if no data was defined.
ServiceDeploymentImportException
- if unable to
read an application's foundation services deployment
metadata from the specified XML formatted import file.public static final java.lang.String renameServiceDeployment(java.lang.String inputXML, java.lang.String newServiceDeploymentName) throws java.lang.IllegalArgumentException, ServiceException
SoftwareComponent
to the newly specified name.
inputXML
- XML representing a foundation services deployment.newServiceDeploymentName
- The new name for the foundation
services deployment. The name must be no more than 60 characters long.
java.lang.IllegalArgumentException
- if invalid XML or name is
specified.
ServiceException
- if an exception was encountered renaming the
service deployment.public final java.lang.String getServiceDeploymentName()
null
if one is not defined. The name is obtained from
the SoftwareComponent.Name
attribute.public final void setServiceDeploymentName(java.lang.String name)
This method updates an in-memory copy of the metadata read from the file and can be used to change the name of the deployment that is to be imported into a SAS Metadata Repository.
name
- The application's foundation services deployment name.
java.lang.IllegalArgumentException
- if an invalid name is specified.public static final ServiceException validateFile(java.io.File file)
file
- File to validate. A valid file is one that was
created by the Foundation Services Manager.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |