com.arsdigita.apm
Class Specification

java.lang.Object
  |
  +--com.arsdigita.apm.Specification

public class Specification
extends java.lang.Object

An APM specfication defines an APM Package Type. An APM package type is a type of APM package that specifies the properties of an ACS software program. These programs can be ACS services or ACS applications. The Specification serves a similar purpose as the JAR Manifest in that they both specify the component files of the application, but the Specification contains ACS specific information. Specifications are XML files that conform to a the APM-PACKAGE.dtd available at http://developer.arsdigita.com/doc/apm/apm-package.dtd

Since:
ACS 4.0
See Also:
java.util.jar.Manifest, ACSPackageType

Field Summary
static java.lang.String cvsId
           
 
Constructor Summary
Specification()
          Constructs a new empty Specification instance.
Specification(ACSPackageType pt, ACSPackageVersion pv)
          Creates a new Specification instance from an existing ACSPackageType and ACSPackageVersion.
Specification(java.math.BigDecimal versionPK)
          Creates a new Specification instance from a specific package version.
Specification(java.io.File file)
          Constructs a new Specification instance from the given file.
Specification(java.io.InputStream is)
          Constructs a new Specification instance from the specified input stream.
Specification(Specification spec)
          Constructs a new Specificaiton by copying the old one.
 
Method Summary
 void clear()
          Clear the contents of the Specification.
 java.lang.String[] getDataModels()
           
 java.lang.String getKey()
          Returns the package key.
 ACSPackageType getPackageType()
          Get the value of packageType.
 ACSPackageVersion getPackageVersion()
          Get the value of packageVersion.
 void read(java.io.InputStream is)
          Reads the Specification from the specified InputStream.
 void register()
           
 void setPackageType(ACSPackageType v)
          Set the value of packageType.
 void setPackageVersion(ACSPackageVersion v)
          Set the value of packageVersion.
 java.lang.String toString()
          Return the XML contents of the specification.
 void write(java.io.OutputStream out)
          Write the specification to the specified OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cvsId

public static final java.lang.String cvsId
Constructor Detail

Specification

public Specification()
              throws ApmException
Constructs a new empty Specification instance.
Throws:
ApmException - if the XML parser is unavailable.

Specification

public Specification(ACSPackageType pt,
                     ACSPackageVersion pv)
              throws ApmException
Creates a new Specification instance from an existing ACSPackageType and ACSPackageVersion.
Parameters:
pt - an ACSPackageType value
pv - an ACSPackageVersion value
Throws:
ApmException - if the XML parser is unavailable.

Specification

public Specification(java.math.BigDecimal versionPK)
              throws ApmException
Creates a new Specification instance from a specific package version.
Parameters:
versionPK - a BigDecimal value
Throws:
ApmException - if an error occurs

Specification

public Specification(java.io.InputStream is)
              throws ApmException
Constructs a new Specification instance from the specified input stream.
Parameters:
is - an InputStream value
Throws:
ApmException - if an error occurs

Specification

public Specification(java.io.File file)
              throws ApmException
Constructs a new Specification instance from the given file.
Parameters:
file - The file.
Throws:
ApmException - Thrown when an error occurs.

Specification

public Specification(Specification spec)
              throws ApmException
Constructs a new Specificaiton by copying the old one.
Parameters:
spec - a Specification value
Throws:
ApmException - if the XML parser is unavailable.
Method Detail

read

public void read(java.io.InputStream is)
          throws ApmException
Reads the Specification from the specified InputStream.
Parameters:
is - an InputStream value

getKey

public java.lang.String getKey()
Returns the package key.
Returns:
The package key.

getDataModels

public java.lang.String[] getDataModels()

register

public void register()
              throws ApmException

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Write the specification to the specified OutputStream.
Parameters:
out - an OutputStream value

clear

public void clear()
Clear the contents of the Specification.

getPackageVersion

public ACSPackageVersion getPackageVersion()
Get the value of packageVersion.
Returns:
value of packageVersion.

setPackageVersion

public void setPackageVersion(ACSPackageVersion v)
Set the value of packageVersion.
Parameters:
v - Value to assign to packageVersion.

getPackageType

public ACSPackageType getPackageType()
Get the value of packageType.
Returns:
value of packageType.

setPackageType

public void setPackageType(ACSPackageType v)
Set the value of packageType.
Parameters:
v - Value to assign to packageType.

toString

public java.lang.String toString()
Return the XML contents of the specification.
Overrides:
toString in class java.lang.Object
Returns:
a String value