com.arsdigita.portalserver
Class PortalSite

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.web.Application
                      extended bycom.arsdigita.portalserver.PortalSite
Direct Known Subclasses:
PersonalPortal

public class PortalSite
extends com.arsdigita.web.Application

A PortalSite is a mountable Portal instance, complete with URL. A PortalSite is made up of one or more PortalTabs. A PortalTab is in turn comprised of zero or more Portlets.

A PortalSite presents what the User considers to be a "Portal". For the sake of clarity, however, in the source code side of things, a Portal is actually a domain class in CCM Core, used as a foundation class by PortalSite.

Version:
$Id: //portalserver/dev/src/com/arsdigita/portalserver/PortalSite.java#18 $
Author:
Justin Ross, Archit Shah, Jim Parsons

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
 
Fields inherited from class com.arsdigita.web.Application
PRIMARY_URL, 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 PortalSite(com.arsdigita.persistence.DataObject dataObject)
          Constructor for PortalSite.
 
Method Summary
 void addMember(com.arsdigita.kernel.Party member)
          add a participant as a member, the party should not already be a participant.
 void addParticipant(com.arsdigita.kernel.Party participant)
          Adds participant and grants participant read privilege on the workspace.
 void addParticipant(com.arsdigita.kernel.Party participant, boolean addDefaultPriv)
          Adds participant and optionally grants participant read privilege on the PortalSite.
 void addPortalTab(PortalTab ptab)
           
 void addRelatedPortalSite(PortalSite portalsite)
           
protected  void afterSave()
           
 void archive()
           
 void archiveRecurse()
           
protected  void beforeDelete()
           
protected  void beforeSave()
           
static PortalSite createPortalSite(String urlName, String title, PortalSite parent)
           
static PortalSite createPortalSite(String urlName, String title, PortalSite parent, boolean inheritPermissions)
           
static PortalSite createSubPortal(PortalSite ps, com.arsdigita.kernel.User user)
           
 PortalSiteCollection getAllChildPortalSites()
           
 PortalSiteCollection getAllRelatedPortalSites()
           
static PortalSiteCollection getAllRootPortalSites()
           
 Date getArchiveDate()
           
protected  String getBaseDataObjectType()
           
 PortalSiteCollection getChildPortalSites()
           
 Date getCreationDate()
           
static PortalSite getCurrentPortalSite(javax.servlet.http.HttpServletRequest request)
           
 RoleCollection getDirectRolesFor(com.arsdigita.kernel.Party p)
           
 com.arsdigita.web.ApplicationCollection getFullPagePortalSiteApplications()
           
 Role getMemberRole()
          Returns the member role.
 String getMission()
          Returns the Mission statement for the Portal
 com.arsdigita.kernel.PartyCollection getNonParticipants()
           
 long getParticipantCount()
           
 Iterator getParticipantInitials()
          Get a list of all the distinct "initials" of participants in a Portal Site.
 com.arsdigita.kernel.PartyCollection getParticipants()
           
 com.arsdigita.kernel.PartyCollection getParticipantsWithInitial(String initial)
          Get a collection of all participants in the Portal Site whose initial (see getParticipantInitials for a definition of a participant's initial) is the specified value.
static PortalSite getPortalSiteForApplication(com.arsdigita.web.Application app)
           
static PortalSite getPortalSiteForAppPortlet(com.arsdigita.portal.apportlet.AppPortlet portlet)
           
 PortalSiteCollection getRelatedPortalSites()
           
 RoleCollection getRoles()
          Returns the collection of roles in this portal site.
 RoleCollection getRolesFor(com.arsdigita.kernel.Party p)
          Returns the collection of roles in this workspace that the specified party is contained in.
static PortalSiteCollection getRootPortalSites()
           
 PortalTabCollection getTabsForPortalSite()
           
 Theme getTheme()
          Returns the Theme object for this Portal
protected  void initialize()
           
 boolean isAppTypeInPortalSite(com.arsdigita.web.ApplicationType appType)
          This method is used by portlet create and app create form flow to determine if an apptype is already present for a PortalSite.
 boolean isArchived()
           
 boolean isDirectMember(com.arsdigita.kernel.Party party)
           
 boolean isDirectParticipant(com.arsdigita.kernel.Party party)
           
 boolean isDraft()
           
 boolean isMember(com.arsdigita.kernel.Party party)
           
 boolean isParticipant(com.arsdigita.kernel.Party party)
           
 boolean isPersonalizable()
           
 boolean isReady()
           
 boolean isSubPortal()
           
 void moveTabToHead(PortalTab ptab)
           
 void moveTabToTail(PortalTab ptab)
           
 void normalizeTabSortKeys()
           
 void removeParticipant(com.arsdigita.kernel.Party participant)
          remove a participant or member from workspace and revoke privileges on the Portal Site
 void removePortalTab(PortalTab ptab)
           
 void removeRelatedPortalSite(PortalSite portalsite)
           
static PortalSiteCollection retrieveAll()
          Deprecated. Use PortalSite.retrieveAllPortalSites().
static PortalSiteCollection retrieveAllActivePortalSites()
          Returns a collection of all active PortalSite's currently mounted on the server.
static PortalSiteCollection retrieveAllPortalSites()
          Returns a collection of all PortalSite's currently mounted on the server.
static PortalSite retrievePortalSite(BigDecimal id)
           
static PortalSite retrievePortalSite(com.arsdigita.persistence.DataObject dataObject)
           
static PortalSite retrievePortalSite(com.arsdigita.persistence.OID oid)
           
static PortalSite retrievePortalSiteForSiteNode(com.arsdigita.kernel.SiteNode siteNode)
           
 void setArchived()
           
 void setArchiveDate()
           
 void setArchiveDate(Date adate)
           
 void setCreationDate()
           
 void setCreationDate(Date cdate)
           
 void setDraft(boolean isDraft)
           
 void setIsSubPortal(boolean issubportal)
           
 void setMission(String mission)
          Set's the mission statement for a Portal.
 void setPersonalizable(boolean isPersonalizable)
           
 void setReady(boolean isReady)
           
 void setTheme(Theme theme)
          Associates a Theme object with this Portal.
 void setUnarchived()
           
 void swapTabWithNext(PortalTab ptab)
           
 void swapTabWithPrevious(PortalTab ptab)
           
 void unarchive()
           
 
Methods inherited from class com.arsdigita.web.Application
afterDelete, createApplication, createApplication, createRootApplication, getAncestorApplications, getApplicationType, getCanonicalURL, getChildApplications, getChildApplicationsForType, getContainingApplication, getContextPath, getCurrentApplication, getPackageType, getParentApplication, getPath, getPrimaryURL, getRelevantPrivileges, getServletPath, getSiteNode, getStylesheetPath, isInstalled, retrieveAllApplications, retrieveApplication, retrieveApplication, retrieveApplication, retrieveApplicationForPath, retrieveApplicationForSiteNode, setApplicationType, setParentApplication, setPath
 
Methods inherited from class com.arsdigita.kernel.Resource
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, setID, setID
 
Methods inherited from class com.arsdigita.domain.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, 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

BASE_DATA_OBJECT_TYPE

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

PortalSite

protected PortalSite(com.arsdigita.persistence.DataObject dataObject)
Constructor for PortalSite. Access is protected. Use a createPortalSite() method for a new PortalSite object.

Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()

initialize

protected void initialize()

createPortalSite

public static PortalSite createPortalSite(String urlName,
                                          String title,
                                          PortalSite parent,
                                          boolean inheritPermissions)

createPortalSite

public static PortalSite createPortalSite(String urlName,
                                          String title,
                                          PortalSite parent)

retrieveAll

public static PortalSiteCollection retrieveAll()
Deprecated. Use PortalSite.retrieveAllPortalSites().


retrieveAllPortalSites

public static PortalSiteCollection retrieveAllPortalSites()
Returns a collection of all PortalSite's currently mounted on the server. Cannot return null. The collection returned includes archived portals as well. Most applications will want to call retrieveAllActivePortalSites()


retrieveAllActivePortalSites

public static PortalSiteCollection retrieveAllActivePortalSites()
Returns a collection of all active PortalSite's currently mounted on the server. Cannot return null. The collection returned does not include archived portals.


retrievePortalSiteForSiteNode

public static PortalSite retrievePortalSiteForSiteNode(com.arsdigita.kernel.SiteNode siteNode)

retrievePortalSite

public static PortalSite retrievePortalSite(BigDecimal id)

retrievePortalSite

public static PortalSite retrievePortalSite(com.arsdigita.persistence.OID oid)

retrievePortalSite

public static PortalSite retrievePortalSite(com.arsdigita.persistence.DataObject dataObject)

beforeSave

protected void beforeSave()

afterSave

protected void afterSave()

beforeDelete

protected void beforeDelete()

getFullPagePortalSiteApplications

public com.arsdigita.web.ApplicationCollection getFullPagePortalSiteApplications()

isAppTypeInPortalSite

public boolean isAppTypeInPortalSite(com.arsdigita.web.ApplicationType appType)
This method is used by portlet create and app create form flow to determine if an apptype is already present for a PortalSite.


getChildPortalSites

public PortalSiteCollection getChildPortalSites()

getAllChildPortalSites

public PortalSiteCollection getAllChildPortalSites()

getRelatedPortalSites

public PortalSiteCollection getRelatedPortalSites()

getAllRelatedPortalSites

public PortalSiteCollection getAllRelatedPortalSites()

getPortalSiteForApplication

public static PortalSite getPortalSiteForApplication(com.arsdigita.web.Application app)

getPortalSiteForAppPortlet

public static PortalSite getPortalSiteForAppPortlet(com.arsdigita.portal.apportlet.AppPortlet portlet)

getCurrentPortalSite

public static PortalSite getCurrentPortalSite(javax.servlet.http.HttpServletRequest request)

getRootPortalSites

public static PortalSiteCollection getRootPortalSites()

getAllRootPortalSites

public static PortalSiteCollection getAllRootPortalSites()

addRelatedPortalSite

public void addRelatedPortalSite(PortalSite portalsite)

removeRelatedPortalSite

public void removeRelatedPortalSite(PortalSite portalsite)

isDirectParticipant

public boolean isDirectParticipant(com.arsdigita.kernel.Party party)

isParticipant

public boolean isParticipant(com.arsdigita.kernel.Party party)

isDirectMember

public boolean isDirectMember(com.arsdigita.kernel.Party party)

isMember

public boolean isMember(com.arsdigita.kernel.Party party)

addMember

public void addMember(com.arsdigita.kernel.Party member)
add a participant as a member, the party should not already be a participant. adds specified party to member group, and makes the specified party a participant


addParticipant

public void addParticipant(com.arsdigita.kernel.Party participant)
Adds participant and grants participant read privilege on the workspace.


addParticipant

public void addParticipant(com.arsdigita.kernel.Party participant,
                           boolean addDefaultPriv)
Adds participant and optionally grants participant read privilege on the PortalSite.

Parameters:
addDefaultPriv - whether or not the read privilege should be granted

removeParticipant

public void removeParticipant(com.arsdigita.kernel.Party participant)
remove a participant or member from workspace and revoke privileges on the Portal Site


getParticipants

public com.arsdigita.kernel.PartyCollection getParticipants()

getParticipantCount

public long getParticipantCount()

getNonParticipants

public com.arsdigita.kernel.PartyCollection getNonParticipants()

getParticipantsWithInitial

public com.arsdigita.kernel.PartyCollection getParticipantsWithInitial(String initial)

Get a collection of all participants in the Portal Site whose initial (see getParticipantInitials for a definition of a participant's initial) is the specified value.

Parameters:
initial - Single-character string, must be uppercase

getMemberRole

public Role getMemberRole()
Returns the member role. This role can be modified directly to change the parties in the role.


getRoles

public RoleCollection getRoles()
Returns the collection of roles in this portal site. The returned roles can be modified directly to change the parties assigned to each role.


getDirectRolesFor

public RoleCollection getDirectRolesFor(com.arsdigita.kernel.Party p)

getRolesFor

public RoleCollection getRolesFor(com.arsdigita.kernel.Party p)
Returns the collection of roles in this workspace that the specified party is contained in.


addPortalTab

public void addPortalTab(PortalTab ptab)

removePortalTab

public void removePortalTab(PortalTab ptab)

getTabsForPortalSite

public PortalTabCollection getTabsForPortalSite()

swapTabWithPrevious

public void swapTabWithPrevious(PortalTab ptab)
                         throws com.arsdigita.persistence.PersistenceException
Throws:
com.arsdigita.persistence.PersistenceException

swapTabWithNext

public void swapTabWithNext(PortalTab ptab)
                     throws com.arsdigita.persistence.PersistenceException
Throws:
com.arsdigita.persistence.PersistenceException

moveTabToHead

public void moveTabToHead(PortalTab ptab)

moveTabToTail

public void moveTabToTail(PortalTab ptab)

normalizeTabSortKeys

public void normalizeTabSortKeys()

isReady

public boolean isReady()

setReady

public void setReady(boolean isReady)

isDraft

public boolean isDraft()

setDraft

public void setDraft(boolean isDraft)

isPersonalizable

public boolean isPersonalizable()

setPersonalizable

public void setPersonalizable(boolean isPersonalizable)

isSubPortal

public boolean isSubPortal()

setIsSubPortal

public void setIsSubPortal(boolean issubportal)

isArchived

public boolean isArchived()

setArchived

public void setArchived()

setUnarchived

public void setUnarchived()

setCreationDate

public void setCreationDate(Date cdate)

setCreationDate

public void setCreationDate()

getCreationDate

public Date getCreationDate()

setArchiveDate

public void setArchiveDate(Date adate)

setArchiveDate

public void setArchiveDate()

getArchiveDate

public Date getArchiveDate()

archive

public void archive()

archiveRecurse

public void archiveRecurse()

unarchive

public void unarchive()

getMission

public String getMission()
Returns the Mission statement for the Portal


setMission

public void setMission(String mission)
Set's the mission statement for a Portal.


setTheme

public void setTheme(Theme theme)
Associates a Theme object with this Portal.


getTheme

public Theme getTheme()
Returns the Theme object for this Portal


getParticipantInitials

public Iterator getParticipantInitials()

Get a list of all the distinct "initials" of participants in a Portal Site.

A participant's initial is defined as the first letter of their family name when the participant is a user (i.e. a person), and the first letter of the group name if the participant is a group.

The returned Iterator contains the initials in increasing alphabetical order.


createSubPortal

public static PortalSite createSubPortal(PortalSite ps,
                                         com.arsdigita.kernel.User user)


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