com.arsdigita.acs
Class ACSPackage

java.lang.Object
  |
  +--com.arsdigita.acs.ACSPackage

public class ACSPackage
extends java.lang.Object

Represents a package instance within an ACS install.


Field Summary
static java.lang.String cvsId
           
 
Constructor Summary
protected ACSPackage(java.math.BigDecimal packageId)
          Protected constructor, should only be used by ACSPackageFactory class.
 
Method Summary
 java.math.BigDecimal getPackageId()
           
 java.lang.String getPackageKey()
           
 java.lang.String getParameter(java.lang.String param)
          Returns a parameter for this package instance, or empty string if undefined
 boolean getParameter(java.lang.String param, boolean def)
          Returns a parameter for this package instance as a boolean true/false
 int getParameter(java.lang.String param, int def)
          Returns a parameter for this package instance as an int primitive
 java.lang.String getParameter(java.lang.String param, java.lang.String def)
          Returns a parameter for this package instance.
 java.lang.String getServletPackage()
           
 void setParameter(java.lang.String param, java.lang.String value)
          Sets a parameter persistently for this package instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

public static java.lang.String cvsId
Constructor Detail

ACSPackage

protected ACSPackage(java.math.BigDecimal packageId)
Protected constructor, should only be used by ACSPackageFactory class.
Parameters:
packageKey - the package key
packageId - the package instance ID
Method Detail

getPackageKey

public java.lang.String getPackageKey()
Returns:
the package key (name of this package)

getServletPackage

public java.lang.String getServletPackage()
Returns:
the package of Java servlets that are bundled with this package.

getPackageId

public java.math.BigDecimal getPackageId()
Returns:
the package id (id for this package instance)

getParameter

public java.lang.String getParameter(java.lang.String param)
                              throws java.sql.SQLException
Returns a parameter for this package instance, or empty string if undefined
Parameters:
param - The parameter key
Returns:
the parameter value for this package instance, or the empty string if the parameter is not defined.

getParameter

public java.lang.String getParameter(java.lang.String param,
                                     java.lang.String def)
Returns a parameter for this package instance.
Parameters:
param - The parameter key
def - the default value
Returns:
the parameter value for this package instance, or def if not set.

getParameter

public boolean getParameter(java.lang.String param,
                            boolean def)
Returns a parameter for this package instance as a boolean true/false
Parameters:
param - The parameter key
def - the default value
Returns:
the parameter value for this package instance, or def if not set.

Returns true if the string value int the database field is "1", false if otherwise.


getParameter

public int getParameter(java.lang.String param,
                        int def)
Returns a parameter for this package instance as an int primitive
Parameters:
param - The parameter key
def - the default value
Returns:
the parameter value for this package instance, or def if not set.

setParameter

public void setParameter(java.lang.String param,
                         java.lang.String value)
                  throws java.sql.SQLException
Sets a parameter persistently for this package instance.
Parameters:
param - The parameter key to set
value - The value to set