com.arsdigita.web
Class Application
java.lang.Object
com.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.kernel.Resource
com.arsdigita.web.Application
- Direct Known Subclasses:
- Admin, SiteMap
- public class Application
- extends Resource
A base class for defining a web application. An application has
three important aspects:
- Each is a data partition. An application is like a
folder: it contains a user-driven subset of the objects in the
system. For instance, the travel forum has its own posts and the
cooking forum has its own posts, even though both forums are the
same type.
- Each has its own configuration. An application may
be independently configured to change its behavior.
- Each corresponds to a top-level UI. An application
has an associated self-contained UI, a servlet. Generally, this
UI will work off of the application's content (from the data
partition) and configuration. The main dispatcher knows
about applications and dispatches to their servlets
directly.
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/web/Application.java#11 $
- Author:
- Jim Parsons, Justin Ross
Methods inherited from class com.arsdigita.kernel.Resource |
afterSave, createResource, createResource, getChildResources, getContainer, getContainingResource, getDescription, getDisplayName, getParentResource, getResourceType, getTimestamp, getTitle, isContainerModified, retrieveAllResources, retrieveResource, retrieveResource, retrieveResource, setDescription, setParentResource, setResourceType, setTitle |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, setID, setID |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, 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 |
versionId
public static final String versionId
- See Also:
- Constant Field Values
PRIMARY_URL
public static final String PRIMARY_URL
- See Also:
- Constant Field Values
BASE_DATA_OBJECT_TYPE
public static final String BASE_DATA_OBJECT_TYPE
- See Also:
- Constant Field Values
Application
protected Application(DataObject dataObject)
Application
protected Application(OID oid)
throws DataObjectNotFoundException
getBaseDataObjectType
protected String getBaseDataObjectType()
- 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 Resource
createRootApplication
public static Application createRootApplication(ApplicationType type,
String title)
createApplication
public static Application createApplication(ApplicationType type,
String fragment,
String title,
Application parent)
createApplication
public static Application createApplication(String typeName,
String fragment,
String title,
Application parent)
retrieveApplication
public static Application retrieveApplication(BigDecimal id)
retrieveApplication
public static Application retrieveApplication(OID oid)
retrieveApplication
public static Application retrieveApplication(DataObject dobj)
getContainingApplication
public static final Application getContainingApplication(ACSObject obj)
retrieveApplicationForSiteNode
public static Application retrieveApplicationForSiteNode(SiteNode siteNode)
retrieveApplicationForPath
public static Application retrieveApplicationForPath(String path)
getApplicationType
public ApplicationType getApplicationType()
setApplicationType
protected void setApplicationType(ApplicationType applicationType)
getPackageType
public PackageType getPackageType()
getParentApplication
public Application getParentApplication()
getAncestorApplications
public List getAncestorApplications()
setParentApplication
public void setParentApplication(Application application)
getChildApplications
public ApplicationCollection getChildApplications()
getChildApplicationsForType
public ApplicationCollection getChildApplicationsForType(String applicationType)
getSiteNode
public SiteNode getSiteNode()
getCurrentApplication
public static Application getCurrentApplication(javax.servlet.http.HttpServletRequest req)
- Deprecated. Use
WebContext.getApplication()
instead.
getPrimaryURL
public String getPrimaryURL()
- Deprecated. Use
getPath()
instead.
- Returns the path to this application through the dispatcher.
This path ends in a slash. Returns
null
if the
application has no path.
getPath
public final String getPath()
- Returns the path to this application through the dispatcher.
The path does not end in a slash. This method will not return
null.
setPath
public final void setPath(String path)
- Sets the dispatcher path of this application. The
getRelevantPrivileges
public Collection getRelevantPrivileges()
retrieveAllApplications
public static ApplicationCollection retrieveAllApplications()
isInstalled
public static boolean isInstalled(String applicationObjectType,
String path)
getCanonicalURL
public static String getCanonicalURL(String url)
- Returns a canonical application URL. This is a utility method
that constructs a URL fragment (just the path relative to the
protocol and server) by trimming the with both leading and
trailing slashes.
getContextPath
public String getContextPath()
getServletPath
public String getServletPath()
getStylesheetPath
public String getStylesheetPath()
beforeSave
protected void beforeSave()
- Overrides:
beforeSave
in class Resource
afterDelete
public void afterDelete()
- Overrides:
afterDelete
in class DomainObject
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC