com.arsdigita.kernel
Class PackageType

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.kernel.PackageType

Deprecated. Use ApplicationType instead.

public class PackageType
extends DomainObject

Represents a package type.

Since:
ACS 5.0
Version:
$Revision: #14 $, $Date: 2004/04/07 $

Field Summary
static String BASE_DATA_OBJECT_TYPE
          Deprecated.  
static String versionId
          Deprecated.  
 
Constructor Summary
PackageType()
          Deprecated. Default constructor.
PackageType(DataObject dataObject)
          Deprecated. Constructor in which the contained DataObject is initialized with a new DataObject with an ObjectType specified by the string typeName.
PackageType(OID oid)
          Deprecated. Constructor in which th contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.
 
Method Summary
 void addListener(String listenerClass)
          Deprecated. Adds a listener to the events for this package.
 void addStylesheet(Stylesheet sheet)
          Deprecated. Adds a stylesheet for this package type.
protected  void beforeSave()
          Deprecated.  
static PackageType create(String key, String displayName, String displayPlural, String URI)
          Deprecated. Creates a package type with the specified key, display name, display plural, and URI.
 PackageInstance createInstance(Class instanceClass, String displayName)
          Deprecated. This convenience method is used to create an instance of this package type.
 PackageInstance createInstance(String displayName)
          Deprecated. This convenience method is used to create an instance of this package type.
static PackageType createPackageType(String key, String displayName, String displayPlural, String URI)
          Deprecated.  
static PackageType findByKey(String key)
          Deprecated. Finds the package type of the specified key.
static PackageType findPackageTypeByKey(String key)
          Deprecated.  
static List getAllPackageIds()
          Deprecated.  
static List getAllPackageKeys()
          Deprecated. Returns a list of all available package keys.
protected  String getBaseDataObjectType()
          Deprecated. Returns the base data object type for this domain object class.
 Dispatcher getDispatcher()
          Deprecated. Gets an instance of the dispatcher registered for this class.
 String getDispatcherClass()
          Deprecated. Gets the name of the dispatcher class for this package type.
 String getDisplayName()
          Deprecated.  
 String getDisplayPlural()
          Deprecated. Returns the plural version of the display name.
 BigDecimal getID()
          Deprecated. Gets the value of the ID property.
 PackageInstanceCollection getInstances()
          Deprecated. Returns a collection of all the instances of package type.
 String getKey()
          Deprecated. Gets the key of the package type.
protected  PackageEventListener[] getListeners()
          Deprecated. Finds all the package event listeners registered to this class.
 String getPackageKey()
          Deprecated. Use getKey()
 String getPrettyName()
          Deprecated. Use getDisplayName()
 String getPrettyPlural()
          Deprecated.  
 String getServletPackage()
          Deprecated. This information is no longer used.
 Stylesheet getStylesheet(Locale locale, String outputType)
          Deprecated. Gets the first stylesheet (best match) associated with this package.
 Stylesheet[] getStylesheets(Locale locale, String outputType)
          Deprecated. Gets all the stylesheets used for rendering this package.
 String getURI()
          Deprecated. Gets the Unique Resource Identifier (URI) for the package.
 boolean hasListener(String listenerClass)
          Deprecated. Checks if this package has a listener of the specified class.
protected  void initialize()
          Deprecated. Called from all of the DomainObject constructors to initalize or validate the new domain object or its encapsulated data object.
 void removeListener(String listenerClass)
          Deprecated. Removes a listener from the events for this package.
 void removeStylesheet(Stylesheet sheet)
          Deprecated. Removes a stylesheet from the set of stylesheets used for rendering this package.
static PackageTypeCollection retrieveAll()
          Deprecated. Returns a collection of all defined package types.
 void setDispatcherClass(String dispatcherClass)
          Deprecated. Sets the dispatcher class for this package type.
 void setDisplayName(String displayName)
          Deprecated. Sets the display name of the package type.
 void setDisplayPlural(String displayPlural)
          Deprecated. Sets the displayPlural of the package type.
 void setKey(String key)
          Deprecated. Sets the key of the package type.
 void setPrettyName(String displayName)
          Deprecated.  
 void setPrettyPlural(String prettyPlural)
          Deprecated.  
 void setServletPackage(String servletPackage)
          Deprecated. This information is no longer used.
 void setURI(String URI)
          Deprecated. Sets a Unique Resource Identifier (URI) for the package.
static boolean typeExists(String key)
          Deprecated.  
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
Deprecated. 
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

PackageType

public PackageType()
Deprecated. 
Default constructor. The contained DataObject is initialized with a new DataObject with an ObjectType of "PackageType".

See Also:
DataObject, ObjectType

PackageType

public PackageType(DataObject dataObject)
Deprecated. 
Constructor in which the contained DataObject is initialized with a new DataObject with an ObjectType specified by the string typeName.

See Also:
Party.Party(ObjectType), DataObject, ObjectType

PackageType

public PackageType(OID oid)
            throws DataObjectNotFoundException
Deprecated. 
Constructor in which th contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.

Parameters:
oid - the OID for the retrieved DataObject
See Also:
ObservableDomainObject.ObservableDomainObject(OID), DataObject, OID
Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()
Deprecated. 
Description copied from class: DomainObject
Returns the base data object type for this domain object class. Intended to be overrided by subclasses whenever the subclass will only work if their primary data object is of a certain base type.

Overrides:
getBaseDataObjectType in class DomainObject
Returns:
The fully qualified name ("modelName.typeName") of the base data object type for this domain object class, or null if there is no restriction on the data object type for the primary data object encapsulated by this class.

initialize

protected void initialize()
Deprecated. 
Description copied from class: DomainObject
Called from all of the DomainObject constructors to initalize or validate the new domain object or its encapsulated data object. This was introduced in order to support efficient validation of the encapsualted data object's type. If the validation is typically performed in class constructors, then redundant validation is performed in superclass constructors. This validation now occurs here.

Overrides:
initialize in class DomainObject

beforeSave

protected void beforeSave()
                   throws PersistenceException
Deprecated. 
Overrides:
beforeSave in class DomainObject
Throws:
PersistenceException

getID

public BigDecimal getID()
Deprecated. 
Gets the value of the ID property.

Returns:
the value of the ID property.

getKey

public String getKey()
Deprecated. 
Gets the key of the package type.

Returns:
the key of the package. This will never be null.
See Also:
setKey(String)

setKey

public void setKey(String key)
Deprecated. 
Sets the key of the package type. The key is an abbreviation of the package name and is a unique String representation of it. An example key for the "ACS Kernel" is "acs-kernel."

This method can only be called when the package type is intially created. After it is saved, calling this method will cause an exception to be thrown.

Parameters:
key - the key of the package
Throws:
RuntimeException - if setKey() is called after the package type has been persisted by calling the save() method.
See Also:
getKey()

getDisplayName

public String getDisplayName()
Deprecated. 

setDisplayName

public void setDisplayName(String displayName)
Deprecated. 
Sets the display name of the package type. The value of this method is used by UIs to provide a human-readable display for a package type.

Parameters:
displayName - the display name of the package type

getDisplayPlural

public String getDisplayPlural()
Deprecated. 
Returns the plural version of the display name.

Returns:
the plural version of the display name.
See Also:
setDisplayPlural(String)

setDisplayPlural

public void setDisplayPlural(String displayPlural)
Deprecated. 
Sets the displayPlural of the package type. The value is used by UIs to provide a human-readable display for a package type.

Parameters:
displayPlural - the plural form of the display name
See Also:
getDisplayPlural()

getURI

public String getURI()
Deprecated. 
Gets the Unique Resource Identifier (URI) for the package.

Returns:
the Unique Resource Identifier for this package.
See Also:
setURI(String)

setURI

public void setURI(String URI)
Deprecated. 
Sets a Unique Resource Identifier (URI) for the package. The URI is used to provide a completely unique identification for this package. The URI typically identifies a company name and the package key (for example, http://www.arsdigita.com/acs-java).

Parameters:
URI - a Unique Resource Identifier for the package
See Also:
getURI()

getDispatcherClass

public String getDispatcherClass()
Deprecated. 
Gets the name of the dispatcher class for this package type.

Returns:
the name of this package type's dispatcher class.
See Also:
setDispatcherClass(String), getDispatcher()

setDispatcherClass

public void setDispatcherClass(String dispatcherClass)
Deprecated. 
Sets the dispatcher class for this package type. When an instance of this package is mounted at a site node, the dispatcher becomes active for the URL for that node. The dispatcher must implement the Dispatcher interface.

Parameters:
dispatcherClass - the string name of a dispatcher implementation
See Also:
getDispatcherClass()

getDispatcher

public Dispatcher getDispatcher()
                         throws ClassNotFoundException,
                                InstantiationException,
                                IllegalAccessException,
                                InvocationTargetException
Deprecated. 
Gets an instance of the dispatcher registered for this class. package. The setDispatcherClass(String) method is used to set which dispatcher will be returned.

Returns:
a dispatcher for this ACS package.
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
InvocationTargetException
See Also:
setDispatcherClass(String), getDispatcher()

createInstance

public PackageInstance createInstance(String displayName)
Deprecated. 
This convenience method is used to create an instance of this package type. The package instance that is returned is persisted so the DomainObject.save() method only needs to be called if it is changed.

Parameters:
displayName - the display name for the package instance
Returns:
a persisted package instance.

createInstance

public PackageInstance createInstance(Class instanceClass,
                                      String displayName)
Deprecated. 
This convenience method is used to create an instance of this package type. The package instance that is returned is persisted so the DomainObject.save() method only needs to be called if it is changed.

Parameters:
displayName - the display name for the package instance
Returns:
a persisted package instance.

addStylesheet

public void addStylesheet(Stylesheet sheet)
Deprecated. 
Adds a stylesheet for this package type. When any component of this package is rendered from XML, the stylesheet will be used.

Parameters:
sheet - a stylesheet used for rendering this package

getStylesheets

public Stylesheet[] getStylesheets(Locale locale,
                                   String outputType)
Deprecated. 
Gets all the stylesheets used for rendering this package.

Parameters:
locale - the locale being used for rendering the package
outputType - an identification of output type, such as "text/html"
Returns:
an array of stylesheets for the specificed locale and output type.
See Also:
addStylesheet(Stylesheet)

getStylesheet

public Stylesheet getStylesheet(Locale locale,
                                String outputType)
Deprecated. 
Gets the first stylesheet (best match) associated with this package.

Parameters:
locale - the locale being used for rendering the package
outputType - an identification of output type, such as "text/html"
Returns:
the best match stylesheet for this package.
See Also:
addStylesheet(Stylesheet)

removeStylesheet

public void removeStylesheet(Stylesheet sheet)
Deprecated. 
Removes a stylesheet from the set of stylesheets used for rendering this package.

Parameters:
sheet - the stylesheet to be removed

addListener

public void addListener(String listenerClass)
Deprecated. 
Adds a listener to the events for this package.

Parameters:
listenerClass - the name of a listener instance

removeListener

public void removeListener(String listenerClass)
Deprecated. 
Removes a listener from the events for this package.

Parameters:
listenerClass - the name of the listener instance

hasListener

public boolean hasListener(String listenerClass)
Deprecated. 
Checks if this package has a listener of the specified class.

Parameters:
listenerClass - the name of a listener registered on this class
Returns:
true if the specified listener is registered, false otherwise.

getListeners

protected PackageEventListener[] getListeners()
Deprecated. 
Finds all the package event listeners registered to this class.

Returns:
the package event listeners.

getInstances

public PackageInstanceCollection getInstances()
Deprecated. 
Returns a collection of all the instances of package type.

Returns:
all the instances of this package type.

findByKey

public static PackageType findByKey(String key)
                             throws DataObjectNotFoundException
Deprecated. 
Finds the package type of the specified key.

Parameters:
key - the package key for the package
Returns:
the package type with the specified key.
Throws:
DataObjectNotFoundException - if the key does not correspond to an existing package type.
See Also:
setKey(String), getKey()

typeExists

public static boolean typeExists(String key)
Deprecated. 

create

public static PackageType create(String key,
                                 String displayName,
                                 String displayPlural,
                                 String URI)
Deprecated. 
Creates a package type with the specified key, display name, display plural, and URI. This is a convenience method for having to create an empty packageType followed by all of the set methods. The example below creates a package type for subsites.
 PackageType subsite = PackageType.create
       ("acs-subsite", "ACS Subsite", "ACS Subsites",
        "http://arsdigita.com/acs-subsite/");
 

Parameters:
key - the key for the package type
displayName - the display name for the package type
displayPlural - the plural form of the display name
URI - the Unique Resource Identifier for this package
Returns:
A persisted packageType. The save() method is automatically called.
See Also:
setKey(String), setDisplayName(String), setDisplayPlural(String), setURI(String)

getAllPackageKeys

public static List getAllPackageKeys()
Deprecated. 
Returns a list of all available package keys.

Returns:
a list of all PackageKeys in the system.

retrieveAll

public static PackageTypeCollection retrieveAll()
Deprecated. 
Returns a collection of all defined package types.

Returns:
A PackageTypeCollection with all package types.

getAllPackageIds

public static List getAllPackageIds()
Deprecated.  

Returns a list of all available package ID values.

See Also:
getAllPackageKeys()

getPackageKey

public String getPackageKey()
Deprecated. Use getKey()


getServletPackage

public String getServletPackage()
Deprecated. This information is no longer used.

Returns:
the package of Java servlets that are bundled with this package.

setServletPackage

public void setServletPackage(String servletPackage)
Deprecated. This information is no longer used.

Returns:
the package of Java servlets that are bundled with this package.

getPrettyName

public String getPrettyName()
Deprecated. Use getDisplayName()


setPrettyName

public void setPrettyName(String displayName)
Deprecated.  

See Also:
setDisplayName(String)

getPrettyPlural

public String getPrettyPlural()
Deprecated.  

See Also:
getDisplayPlural()

setPrettyPlural

public void setPrettyPlural(String prettyPlural)
Deprecated.  

See Also:
setDisplayPlural(String)

findPackageTypeByKey

public static PackageType findPackageTypeByKey(String key)
                                        throws DataObjectNotFoundException
Deprecated.  

Finds the package type of the specified key.

Throws:
DataObjectNotFoundException
See Also:
findByKey(String)

createPackageType

public static PackageType createPackageType(String key,
                                            String displayName,
                                            String displayPlural,
                                            String URI)
Deprecated.  

Creates a package type and persists it to the database.

See Also:
create(String, String, String, String)


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC