com.arsdigita.portal
Class Portal

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.kernel.Resource
                  extended bycom.arsdigita.portal.Portal

public class Portal
extends Resource

A domain class for portals. A Portal has a set of Portlets.

A Portal is a Persistence-backed framework for aggregating content from multiple web applications/content sources. The com.arsdigita.portal package is an infrastructural package that can be used to quickly implement a basic portal server, but is primarily intended as a foundation for the development of more sophisticated Portal systems such as workspaces that feature multiple portals as named tabs within the workspace.

Containment properties of Portals, such as versioning, permissioning, and searchability are available within Portal's parent class Resource.

Version:
$Id: //core-platform/dev/src/com/arsdigita/portal/Portal.java#20 $
Author:
Justin Ross, James Parsons

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String versionId
           
 
Fields inherited from class com.arsdigita.kernel.Resource
CHILD_RESOURCE, DESCRIPTION, PARENT_RESOURCE, RESOURCE_TYPE, TIMESTAMP, TITLE
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
protected Portal(DataObject dataObject)
           
  Portal(OID oid)
           
protected Portal(String dataObjectType)
           
 
Method Summary
 void addPortlet(Portlet portlet, int cellNumber)
          Add a portlet to this portal or portal template.
protected  void beforeSave()
           
 void clearPortlets()
          Deletes all portlets on the portal
static Portal create(String title, Resource parent)
          Create a new portal.
static Portal create(String dataobj, String title, Resource parent)
           
static Portal createTemplate(String title)
          Create a new portal template.
protected  String getBaseDataObjectType()
          Returns the base data object type for this domain object class.
 PortletCollection getPortlets()
          Return all of this Portal's Portlets, ordered by cell number then sort key.
 PortletCollection getPortletsForCell(int cellNumber)
          Return all of this Portal's Portlets for the given cell.
 String getTitle()
           
 boolean isTemplate()
           
 void movePortletToHead(Portlet portlet)
           
 void movePortletToTail(Portlet portlet)
           
static Portal retrieve(BigDecimal portalID)
          Retrieve an existing portal based on a portal ID.
static Portal retrieve(DataObject dataObject)
          Retrieve an existing portal based on a portal data object.
static Portal retrieve(OID oid)
          Retrieve an existing portal based on an OID.
static PortalCollection retrieveAll()
           
protected  void setTemplate(boolean isTemplate)
           
 void setTitle(String title)
           
 void swapPortletWithNext(Portlet portlet)
           
 void swapPortletWithPrevious(Portlet portlet)
           
 
Methods inherited from class com.arsdigita.kernel.Resource
afterSave, createResource, createResource, getChildResources, getContainer, getContainingResource, getDescription, getDisplayName, getParentResource, getResourceType, getTimestamp, isContainerModified, retrieveAllResources, retrieveResource, retrieveResource, retrieveResource, setDescription, setParentResource, setResourceType
 
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.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, 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
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

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

Portal

protected Portal(DataObject dataObject)

Portal

protected Portal(String dataObjectType)

Portal

public Portal(OID oid)
       throws DataObjectNotFoundException
Method Detail

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

createTemplate

public static Portal createTemplate(String title)
Create a new portal template.

Parameters:
title - the default title of the portal template.
Returns:
a new portal template.

create

public static Portal create(String title,
                            Resource parent)
Create a new portal.

Parameters:
title - the default title of the portal template.
Returns:
a new portal template.

create

public static Portal create(String dataobj,
                            String title,
                            Resource parent)

retrieve

public static Portal retrieve(BigDecimal portalID)
Retrieve an existing portal based on a portal ID.

Parameters:
portalID - the ID of the portal to retrieve.
Returns:
an existing portal. Note that the return value may be null if no portal of this ID exists.

retrieve

public static Portal retrieve(OID oid)
Retrieve an existing portal based on an OID.

Parameters:
oid - the OID of the portal to retrieve.
Returns:
an existing portal. Note that the return value may be null if no portal data object for this ID exists.

retrieve

public static Portal retrieve(DataObject dataObject)
Retrieve an existing portal based on a portal data object.

Parameters:
dataObject - the data object of the portal to retrieve.
Returns:
an existing portal. Note that the return value may be null if no portal data object for this ID exists.

retrieveAll

public static PortalCollection retrieveAll()

clearPortlets

public void clearPortlets()
Deletes all portlets on the portal


getTitle

public String getTitle()
Overrides:
getTitle in class Resource

setTitle

public void setTitle(String title)
Overrides:
setTitle in class Resource

isTemplate

public boolean isTemplate()

setTemplate

protected void setTemplate(boolean isTemplate)

addPortlet

public void addPortlet(Portlet portlet,
                       int cellNumber)
Add a portlet to this portal or portal template. Portlets will sort in the order in which they are added to a given cell.

Parameters:
portlet - the portlet instance to add.
cellNumber - the cell in which to place this portlet. cellNumber's value must be greater than or equal to 1.

getPortlets

public PortletCollection getPortlets()
Return all of this Portal's Portlets, ordered by cell number then sort key.

Returns:
a set of Portlets in a PortletCollection.

getPortletsForCell

public PortletCollection getPortletsForCell(int cellNumber)
Return all of this Portal's Portlets for the given cell.

Returns:
a set of Portlets in a PortletCollection.

swapPortletWithPrevious

public void swapPortletWithPrevious(Portlet portlet)
                             throws PersistenceException
Throws:
PersistenceException

swapPortletWithNext

public void swapPortletWithNext(Portlet portlet)
                         throws PersistenceException
Throws:
PersistenceException

movePortletToHead

public void movePortletToHead(Portlet portlet)
                       throws PersistenceException
Throws:
PersistenceException

movePortletToTail

public void movePortletToTail(Portlet portlet)
                       throws PersistenceException
Throws:
PersistenceException

beforeSave

protected void beforeSave()
Overrides:
beforeSave in class Resource


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