com.arsdigita.apm
Class ACSPackageVersion

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

public class ACSPackageVersion
extends java.lang.Object

This package represents the version information of an ACSPackageType.

Since:
ACS 4.0

Field Summary
static java.lang.String cvsId
           
 
Constructor Summary
ACSPackageVersion(java.math.BigDecimal pk)
          Creates a new ACSPackageVersion instance.
ACSPackageVersion(java.lang.String packageKey)
          Creates a new ACSPackageVersion instance from the latest version of the given package key.
ACSPackageVersion(java.lang.String packageKey, java.math.BigDecimal versionPK, java.lang.String versionName, java.lang.String URI, java.lang.String releaseDate, java.lang.String summary, java.lang.String description, java.lang.String descriptionFormat, java.lang.String vendor, java.lang.String vendor_uri, java.lang.String servletPackage)
          Creates a new ACSPackageVersion.
 
Method Summary
 void disable()
          Marks this version as disabled in the db.
 void enable()
          Enables a version of a package (disabling any other version of the package).
 void generateTarball()
          Creates the distribution file.
 java.io.File getAPMFile()
          Returns the File object for the APM distribution file.
 com.arsdigita.util.xml.XMLObject getDependencies()
           
 java.lang.String getDescription()
          Get the value of description.
 java.lang.String getDescriptionFormat()
          Get the value of descriptionFormat.
 com.arsdigita.util.xml.XMLObject getFiles()
           
 java.lang.String getPackageKey()
          Gets the value of the package key.
 java.lang.String getPackagePrettyName()
          Gets the package's pretty name.
 com.arsdigita.util.xml.XMLObject getParameters()
          Returns all of the parameters for this version.
 java.lang.String getReleaseDate()
          Get the value of releaseDate.
 java.lang.String getServletPackage()
          get the java servlet package
 com.arsdigita.util.xml.XMLObject getSpecification()
           
 java.lang.String getSummary()
          Get the value of summary.
 java.lang.String getURI()
          Get the value of URI.
 java.lang.String getVendor()
          Get the value of vendor.
 java.lang.String getVendorURI()
          Get the value of vendor URI.
 java.lang.String getVersionName()
          Get the value of name.
 java.math.BigDecimal getVersionPK()
          Returns the primary key of the version.
 void installOwners(java.lang.String[] owner_names, java.lang.String[] owner_uris)
          Install all of the owners of the package version
 boolean isEnabledP()
          Get the value of enabledP.
 boolean isInstalledP()
          Get the value of installedP.
 void setDescription(java.lang.String v, java.lang.String format)
          Set the value of description.
 void setEnabledP(boolean v)
          Set the value of enabledP.
 void setInstalledP(boolean v)
          Set the value of installedP.
 void setReleaseDate(java.lang.String v)
          Set the value of releaseDate.
 void setServletPackage(java.lang.String v)
          Set the java servlet package
 void setSummary(java.lang.String v)
          Set the value of summary.
 void setURI(java.lang.String v)
          Set the value of URI.
 void setVendor(java.lang.String v)
          Set the value of vendor.
 void setVendorURI(java.lang.String v)
          Set the value of vendor.
 void setVersionName(java.lang.String v)
          Set the value of name.
 java.lang.String toString()
           
 java.math.BigDecimal updateDB()
          Updates this version in the DB
 void upgradeDB()
          Upgrade a package to a locally maintained later version.
 
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

ACSPackageVersion

public ACSPackageVersion(java.math.BigDecimal pk)
                  throws ApmException
Creates a new ACSPackageVersion instance.

ACSPackageVersion

public ACSPackageVersion(java.lang.String packageKey)
                  throws ApmException
Creates a new ACSPackageVersion instance from the latest version of the given package key.
Parameters:
packageKey - a String value
Throws:
ApmException - if an error occurs

ACSPackageVersion

public ACSPackageVersion(java.lang.String packageKey,
                         java.math.BigDecimal versionPK,
                         java.lang.String versionName,
                         java.lang.String URI,
                         java.lang.String releaseDate,
                         java.lang.String summary,
                         java.lang.String description,
                         java.lang.String descriptionFormat,
                         java.lang.String vendor,
                         java.lang.String vendor_uri,
                         java.lang.String servletPackage)
                  throws ApmException
Creates a new ACSPackageVersion. Version must not presently exist in the database.
Method Detail

getSpecification

public com.arsdigita.util.xml.XMLObject getSpecification()
                                                  throws ApmException
Returns:
The specification for this version.

getDependencies

public com.arsdigita.util.xml.XMLObject getDependencies()
                                                 throws ApmException
Returns:
The dependencies for each version.

getFiles

public com.arsdigita.util.xml.XMLObject getFiles()
                                          throws ApmException
Returns:
All of the files registered to this version.

getParameters

public com.arsdigita.util.xml.XMLObject getParameters()
                                               throws ApmException
Returns all of the parameters for this version.

getVersionPK

public java.math.BigDecimal getVersionPK()
Returns the primary key of the version.
Returns:
an BigDecimal value

getDescription

public java.lang.String getDescription()
Get the value of description.
Returns:
value of description.

getDescriptionFormat

public java.lang.String getDescriptionFormat()
Get the value of descriptionFormat.
Returns:
value of description.

setDescription

public void setDescription(java.lang.String v,
                           java.lang.String format)
Set the value of description.
Parameters:
v - Value to assign to description.

getSummary

public java.lang.String getSummary()
Get the value of summary.
Returns:
value of summary.

setSummary

public void setSummary(java.lang.String v)
Set the value of summary.
Parameters:
v - Value to assign to summary.

getVendor

public java.lang.String getVendor()
Get the value of vendor.
Returns:
value of vendor.

setVendor

public void setVendor(java.lang.String v)
Set the value of vendor.
Parameters:
v - Value to assign to vendor.

getVendorURI

public java.lang.String getVendorURI()
Get the value of vendor URI.
Returns:
value of vendor URI.

setVendorURI

public void setVendorURI(java.lang.String v)
Set the value of vendor.
Parameters:
v - Value to assign to vendor.

getVersionName

public java.lang.String getVersionName()
Get the value of name.
Returns:
value of name.

getPackagePrettyName

public java.lang.String getPackagePrettyName()
Gets the package's pretty name.
Returns:
value of pretty name.

setVersionName

public void setVersionName(java.lang.String v)
Set the value of name.
Parameters:
v - Value to assign to name.

getServletPackage

public java.lang.String getServletPackage()
get the java servlet package
Returns:
fully-qualified java servlet package name

setServletPackage

public void setServletPackage(java.lang.String v)
Set the java servlet package
Parameters:
v - fully-qualified java servlet package name

getReleaseDate

public java.lang.String getReleaseDate()
Get the value of releaseDate.
Returns:
value of releaseDate.

setReleaseDate

public void setReleaseDate(java.lang.String v)
Set the value of releaseDate.
Parameters:
v - Value to assign to releaseDate.

getURI

public java.lang.String getURI()
Get the value of URI.
Returns:
value of URI.

setURI

public void setURI(java.lang.String v)
Set the value of URI.
Parameters:
v - Value to assign to URI.

isEnabledP

public boolean isEnabledP()
Get the value of enabledP.
Returns:
value of enabledP.

setEnabledP

public void setEnabledP(boolean v)
Set the value of enabledP.
Parameters:
v - Value to assign to enabledP.

isInstalledP

public boolean isInstalledP()
Get the value of installedP.
Returns:
value of installedP.

setInstalledP

public void setInstalledP(boolean v)
Set the value of installedP.
Parameters:
v - Value to assign to installedP.

getPackageKey

public java.lang.String getPackageKey()
Gets the value of the package key.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

updateDB

public java.math.BigDecimal updateDB()
                              throws java.sql.SQLException
Updates this version in the DB
Returns:
new version id.

upgradeDB

public void upgradeDB()
               throws java.sql.SQLException
Upgrade a package to a locally maintained later version.

getAPMFile

public java.io.File getAPMFile()
Returns the File object for the APM distribution file. Note that this file may not exist; if it does not exist, it can be created with generateTarball();

generateTarball

public void generateTarball()
                     throws ApmException
Creates the distribution file.

disable

public void disable()
             throws java.sql.SQLException
Marks this version as disabled in the db. Equivalent to apm_version_disable.
Parameters:
version_id - The id of the version to be disabled.

enable

public void enable()
            throws java.sql.SQLException
Enables a version of a package (disabling any other version of the package).
Parameters:
version_id - The id of the version to be enabled.

installOwners

public void installOwners(java.lang.String[] owner_names,
                          java.lang.String[] owner_uris)
                   throws java.sql.SQLException
Install all of the owners of the package version