org.apache.jetspeed.page.impl
Class DatabasePageManager

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
          extended by org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
              extended by org.apache.jetspeed.page.impl.DatabasePageManager
All Implemented Interfaces:
PageManager, org.springframework.beans.factory.InitializingBean

public class DatabasePageManager
extends InitablePersistenceBrokerDaoSupport
implements PageManager

DatabasePageManager

Version:
$Id: $
Author:
David Sean Taylor, Randy Watler

Field Summary
 
Fields inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
repositoryPath
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Fields inherited from interface org.apache.jetspeed.page.PageManager
SERVICE_NAME
 
Constructor Summary
DatabasePageManager(java.lang.String repositoryPath, int cacheSize, int cacheExpiresSeconds, boolean isPermissionsSecurity, boolean isConstraintsSecurity)
           
 
Method Summary
 void addListener(PageManagerEventListener listener)
          addListener - add page manager event listener
 int addPages(Page[] pages)
           
 boolean checkConstraint(java.lang.String securityConstraintName, java.lang.String actions)
          Given a securityConstraintName definition and a set of actions, run a security constraint checks
 Folder copyFolder(Folder source, java.lang.String path)
          Copy the source folder creating and returning a new copy of the folder with the same content as the source All subobjects are created with new ids
 Fragment copyFragment(Fragment source, java.lang.String name)
          Copy the source fragment creating and returning a new copy of the fragment with the parameter collection as the source The fragment is created with a new fragment id
 Link copyLink(Link source, java.lang.String path)
          Copy the source link creating and returning a new copy of the link
 Page copyPage(Page source, java.lang.String path)
          Copy the source page creating and returning a new copy of the page with the same portlet and fragment collection as the source All fragments are created with new fragment ids
 PageSecurity copyPageSecurity(PageSecurity source)
          Copy the source page security (both global constraints and constraint references) creating and returning a new copy of the page security definition.
 void createUserHomePagesFromRoles(javax.security.auth.Subject subject)
          Creates a user's home page from the roles of the current user.
 void deepCopyFolder(Folder srcFolder, java.lang.String destinationPath, java.lang.String owner)
          Deep copy a folder.
 boolean folderExists(java.lang.String folderName)
          Check if a folder exists for the given folder name
 NodeSet getAll(Folder folder)
           getAll
 int getCacheExpiresSeconds()
          getCacheExpiresSeconds
 int getCacheSize()
          getCacheSize
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 ContentPage getContentPage(java.lang.String path)
           ContentPage
 Folder getFolder(Folder folder, java.lang.String name)
           getFolder
 Folder getFolder(java.lang.String folderPath)
           getFolder
 NodeSet getFolders(Folder folder)
           getFolders
 Link getLink(Folder folder, java.lang.String name)
           getLink
 Link getLink(java.lang.String path)
           getLink
 NodeSet getLinks(Folder folder)
           getLinks
 Page getPage(Folder folder, java.lang.String name)
           getPage
 Page getPage(java.lang.String path)
           getPage
 PageManager getPageManagerProxy()
          getPageManagerProxy
 NodeSet getPages(Folder folder)
           getPages
 PageSecurity getPageSecurity()
           getPageSecurity
 PageSecurity getPageSecurity(Folder folder)
           getPageSecurity
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 Folder getUserFolder(java.lang.String userName)
          Retrieve a user's folder
 Page getUserPage(java.lang.String userName, java.lang.String pageName)
          Retrieve a page for the given user name and page name
 boolean linkExists(java.lang.String linkName)
          Check if a link exists for the given link name
 Folder newFolder(java.lang.String path)
          Create a new empty Folder instance
 MenuDefinition newFolderMenuDefinition()
          newFolderMenuDefinition - creates a new empty menu definition
 MenuExcludeDefinition newFolderMenuExcludeDefinition()
          newFolderMenuExcludeDefinition - creates a new empty menu exclude definition
 MenuIncludeDefinition newFolderMenuIncludeDefinition()
          newFolderMenuIncludeDefinition - creates a new empty menu include definition
 MenuOptionsDefinition newFolderMenuOptionsDefinition()
          newFolderMenuOptionsDefinition - creates a new empty menu options definition
 MenuSeparatorDefinition newFolderMenuSeparatorDefinition()
          newFolderMenuSeparatorDefinition - creates a new empty menu separator definition
 SecurityConstraint newFolderSecurityConstraint()
          newFolderSecurityConstraint - creates a new security constraint definition
 Fragment newFragment()
          Creates a new empty Layout Fragment instance
 FragmentPreference newFragmentPreference()
          newFragmentPreference - creates a new fragment preference
 SecurityConstraint newFragmentSecurityConstraint()
          newFragmentSecurityConstraint - creates a new security constraint definition
 Link newLink(java.lang.String path)
          Creates a new empty Link instance
 SecurityConstraint newLinkSecurityConstraint()
          newLinkSecurityConstraint - creates a new security constraint definition
 Page newPage(java.lang.String path)
          Creates a new empty Page instance
 MenuDefinition newPageMenuDefinition()
          newPageMenuDefinition - creates a new empty menu definition
 MenuExcludeDefinition newPageMenuExcludeDefinition()
          newPageMenuExcludeDefinition - creates a new empty menu exclude definition
 MenuIncludeDefinition newPageMenuIncludeDefinition()
          newPageMenuIncludeDefinition - creates a new empty menu include definition
 MenuOptionsDefinition newPageMenuOptionsDefinition()
          newPageMenuOptionsDefinition - creates a new empty menu options definition
 MenuSeparatorDefinition newPageMenuSeparatorDefinition()
          newPageMenuSeparatorDefinition - creates a new empty menu separator definition
 PageSecurity newPageSecurity()
          Creates a new empty PageSecurity instance
 SecurityConstraint newPageSecurityConstraint()
          newPageSecurityConstraint - creates a new security constraint definition
 SecurityConstraint newPageSecuritySecurityConstraint()
          newPageSecuritySecurityConstraint - creates a new security constraint definition
 Fragment newPortletFragment()
          Creates a new empty Portlet Fragment instance
 SecurityConstraints newSecurityConstraints()
          newSecurityConstraints - creates a new empty security constraints definition
 SecurityConstraintsDef newSecurityConstraintsDef()
          newSecurityConstraintsDef - creates a new security constraints definition
 boolean pageExists(java.lang.String pageName)
          Check if a page exists for the given page name
 void removeFolder(Folder folder)
          Remove a folder.
 void removeLink(Link link)
          Remove a link.
 void removeListener(PageManagerEventListener listener)
          removeListener - remove page manager event listener
 void removePage(Page page)
          Remove a document.
 void removePageSecurity(PageSecurity pageSecurity)
          Remove a page security document.
 void reset()
          reset - force subsequent refresh from persistent store
 void setPageManagerProxy(PageManager proxy)
          setPageManagerProxy
 void updateFolder(Folder folder)
          Update a folder and all child folders and documents in persistent storage
 void updateFolder(Folder folder, boolean deep)
          Update a folder in persistent storage
 void updateLink(Link link)
          Update a link in persistent storage
 void updatePage(Page page)
          Update a page in persistent storage
 void updatePageSecurity(PageSecurity pageSecurity)
          Update a page security document in persistent storage
 boolean userFolderExists(java.lang.String userName)
          Check if the root folder exists for a given user
 boolean userPageExists(java.lang.String userName, java.lang.String pageName)
          Check if a page exists for the given user
 
Methods inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
init
 
Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
checkDaoConfig, closePersistenceBrokerIfNecessary, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabasePageManager

public DatabasePageManager(java.lang.String repositoryPath,
                           int cacheSize,
                           int cacheExpiresSeconds,
                           boolean isPermissionsSecurity,
                           boolean isConstraintsSecurity)
Method Detail

getCacheSize

public int getCacheSize()
getCacheSize

Returns:
configured cache size

getCacheExpiresSeconds

public int getCacheExpiresSeconds()
getCacheExpiresSeconds

Returns:
configured cache expiration in seconds

getPageManagerProxy

public PageManager getPageManagerProxy()
getPageManagerProxy

Returns:
proxied page manager interface used to inject into Folder instances to provide transaction/interception

setPageManagerProxy

public void setPageManagerProxy(PageManager proxy)
setPageManagerProxy

Parameters:
proxy - proxied page manager interface used to inject into Folder instances to provide transaction/interception

getConstraintsEnabled

public boolean getConstraintsEnabled()
Description copied from interface: PageManager

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface PageManager
Returns:
enabled indicator

getPermissionsEnabled

public boolean getPermissionsEnabled()
Description copied from interface: PageManager

getPermissionsEnabled

Specified by:
getPermissionsEnabled in interface PageManager
Returns:
enabled indicator

newPage

public Page newPage(java.lang.String path)
Description copied from interface: PageManager
Creates a new empty Page instance

Specified by:
newPage in interface PageManager
Returns:
a newly created Page object

newFolder

public Folder newFolder(java.lang.String path)
Description copied from interface: PageManager
Create a new empty Folder instance

Specified by:
newFolder in interface PageManager
Returns:
a newly created Folder object

newLink

public Link newLink(java.lang.String path)
Description copied from interface: PageManager
Creates a new empty Link instance

Specified by:
newLink in interface PageManager
Returns:
a newly created Link object

newPageSecurity

public PageSecurity newPageSecurity()
Description copied from interface: PageManager
Creates a new empty PageSecurity instance

Specified by:
newPageSecurity in interface PageManager
Returns:
a newly created PageSecurity object

newFragment

public Fragment newFragment()
Description copied from interface: PageManager
Creates a new empty Layout Fragment instance

Specified by:
newFragment in interface PageManager
Returns:
a newly created Fragment object

newPortletFragment

public Fragment newPortletFragment()
Description copied from interface: PageManager
Creates a new empty Portlet Fragment instance

Specified by:
newPortletFragment in interface PageManager
Returns:
a newly created Fragment object

newFolderMenuDefinition

public MenuDefinition newFolderMenuDefinition()
Description copied from interface: PageManager
newFolderMenuDefinition - creates a new empty menu definition

Specified by:
newFolderMenuDefinition in interface PageManager
Returns:
a newly created MenuDefinition object to be used in Folder

newFolderMenuExcludeDefinition

public MenuExcludeDefinition newFolderMenuExcludeDefinition()
Description copied from interface: PageManager
newFolderMenuExcludeDefinition - creates a new empty menu exclude definition

Specified by:
newFolderMenuExcludeDefinition in interface PageManager
Returns:
a newly created MenuExcludeDefinition object to be used in Folder

newFolderMenuIncludeDefinition

public MenuIncludeDefinition newFolderMenuIncludeDefinition()
Description copied from interface: PageManager
newFolderMenuIncludeDefinition - creates a new empty menu include definition

Specified by:
newFolderMenuIncludeDefinition in interface PageManager
Returns:
a newly created MenuIncludeDefinition object to be used in Folder

newFolderMenuOptionsDefinition

public MenuOptionsDefinition newFolderMenuOptionsDefinition()
Description copied from interface: PageManager
newFolderMenuOptionsDefinition - creates a new empty menu options definition

Specified by:
newFolderMenuOptionsDefinition in interface PageManager
Returns:
a newly created MenuOptionsDefinition object to be used in Folder

newFolderMenuSeparatorDefinition

public MenuSeparatorDefinition newFolderMenuSeparatorDefinition()
Description copied from interface: PageManager
newFolderMenuSeparatorDefinition - creates a new empty menu separator definition

Specified by:
newFolderMenuSeparatorDefinition in interface PageManager
Returns:
a newly created MenuSeparatorDefinition object to be used in Folder

newPageMenuDefinition

public MenuDefinition newPageMenuDefinition()
Description copied from interface: PageManager
newPageMenuDefinition - creates a new empty menu definition

Specified by:
newPageMenuDefinition in interface PageManager
Returns:
a newly created MenuDefinition object to be used in Page

newPageMenuExcludeDefinition

public MenuExcludeDefinition newPageMenuExcludeDefinition()
Description copied from interface: PageManager
newPageMenuExcludeDefinition - creates a new empty menu exclude definition

Specified by:
newPageMenuExcludeDefinition in interface PageManager
Returns:
a newly created MenuExcludeDefinition object to be used in Page

newPageMenuIncludeDefinition

public MenuIncludeDefinition newPageMenuIncludeDefinition()
Description copied from interface: PageManager
newPageMenuIncludeDefinition - creates a new empty menu include definition

Specified by:
newPageMenuIncludeDefinition in interface PageManager
Returns:
a newly created MenuIncludeDefinition object to be used in Page

newPageMenuOptionsDefinition

public MenuOptionsDefinition newPageMenuOptionsDefinition()
Description copied from interface: PageManager
newPageMenuOptionsDefinition - creates a new empty menu options definition

Specified by:
newPageMenuOptionsDefinition in interface PageManager
Returns:
a newly created MenuOptionsDefinition object to be used in Page

newPageMenuSeparatorDefinition

public MenuSeparatorDefinition newPageMenuSeparatorDefinition()
Description copied from interface: PageManager
newPageMenuSeparatorDefinition - creates a new empty menu separator definition

Specified by:
newPageMenuSeparatorDefinition in interface PageManager
Returns:
a newly created MenuSeparatorDefinition object to be used in Page

newSecurityConstraints

public SecurityConstraints newSecurityConstraints()
Description copied from interface: PageManager
newSecurityConstraints - creates a new empty security constraints definition

Specified by:
newSecurityConstraints in interface PageManager
Returns:
a newly created SecurityConstraints object

newFolderSecurityConstraint

public SecurityConstraint newFolderSecurityConstraint()
Description copied from interface: PageManager
newFolderSecurityConstraint - creates a new security constraint definition

Specified by:
newFolderSecurityConstraint in interface PageManager
Returns:
a newly created SecurityConstraint object to be used in Folder

newPageSecurityConstraint

public SecurityConstraint newPageSecurityConstraint()
Description copied from interface: PageManager
newPageSecurityConstraint - creates a new security constraint definition

Specified by:
newPageSecurityConstraint in interface PageManager
Returns:
a newly created SecurityConstraint object to be used in Page

newFragmentSecurityConstraint

public SecurityConstraint newFragmentSecurityConstraint()
Description copied from interface: PageManager
newFragmentSecurityConstraint - creates a new security constraint definition

Specified by:
newFragmentSecurityConstraint in interface PageManager
Returns:
a newly created SecurityConstraint object to be used in Fragment

newLinkSecurityConstraint

public SecurityConstraint newLinkSecurityConstraint()
Description copied from interface: PageManager
newLinkSecurityConstraint - creates a new security constraint definition

Specified by:
newLinkSecurityConstraint in interface PageManager
Returns:
a newly created SecurityConstraint object to be used in Link

newPageSecuritySecurityConstraint

public SecurityConstraint newPageSecuritySecurityConstraint()
Description copied from interface: PageManager
newPageSecuritySecurityConstraint - creates a new security constraint definition

Specified by:
newPageSecuritySecurityConstraint in interface PageManager
Returns:
a newly created SecurityConstraint object to be used in PageSecurity

newSecurityConstraintsDef

public SecurityConstraintsDef newSecurityConstraintsDef()
Description copied from interface: PageManager
newSecurityConstraintsDef - creates a new security constraints definition

Specified by:
newSecurityConstraintsDef in interface PageManager
Returns:
a newly created SecurityConstraintsDef object

newFragmentPreference

public FragmentPreference newFragmentPreference()
Description copied from interface: PageManager
newFragmentPreference - creates a new fragment preference

Specified by:
newFragmentPreference in interface PageManager
Returns:
a newly created FragmentPreference

addListener

public void addListener(PageManagerEventListener listener)
Description copied from interface: PageManager
addListener - add page manager event listener

Specified by:
addListener in interface PageManager
Parameters:
listener - page manager event listener

removeListener

public void removeListener(PageManagerEventListener listener)
Description copied from interface: PageManager
removeListener - remove page manager event listener

Specified by:
removeListener in interface PageManager
Parameters:
listener - page manager event listener

reset

public void reset()
Description copied from interface: PageManager
reset - force subsequent refresh from persistent store

Specified by:
reset in interface PageManager

getPage

public Page getPage(java.lang.String path)
             throws PageNotFoundException,
                    NodeException
Description copied from interface: PageManager

getPage

Returns a Page based on its path

Specified by:
getPage in interface PageManager
Throws:
PageNotFoundException - if the page cannot be found
NodeException

getContentPage

public ContentPage getContentPage(java.lang.String path)
                           throws PageNotFoundException,
                                  NodeException
Description copied from interface: PageManager

ContentPage

Returns a PSML document suitable for use in content rendering, for the given key

Specified by:
getContentPage in interface PageManager
Throws:
PageNotFoundException - if the page cannot be found
NodeException
See Also:
ContentPage, Fragment

getLink

public Link getLink(java.lang.String path)
             throws DocumentNotFoundException,
                    NodeException
Description copied from interface: PageManager

getLink

Returns a Link document for the given path

Specified by:
getLink in interface PageManager
Parameters:
path - The path of the document to be retrieved.
Throws:
PageNotFoundException - if the page cannot be found
NodeException
DocumentNotFoundException

checkConstraint

public boolean checkConstraint(java.lang.String securityConstraintName,
                               java.lang.String actions)
Given a securityConstraintName definition and a set of actions, run a security constraint checks

Specified by:
checkConstraint in interface PageManager
Parameters:
securityConstraintName - the name of the security constraint definition
actions - one or more portlet actions (view,edit,help,..)
Returns:

getPageSecurity

public PageSecurity getPageSecurity()
                             throws DocumentNotFoundException,
                                    NodeException
Description copied from interface: PageManager

getPageSecurity

Returns the PageSecurity document

Specified by:
getPageSecurity in interface PageManager
Throws:
DocumentNotFoundException - if the document cannot be found
UnsupportedDocumentTypeException
NodeException

getFolder

public Folder getFolder(java.lang.String folderPath)
                 throws FolderNotFoundException,
                        InvalidFolderException,
                        NodeException
Description copied from interface: PageManager

getFolder

Locates a folder for the given path.

Specified by:
getFolder in interface PageManager
Returns:
Folder object represented by the folderPath
Throws:
FolderNotFoundException
InvalidFolderException
NodeException

getFolders

public NodeSet getFolders(Folder folder)
                   throws DocumentException
Description copied from interface: PageManager

getFolders

Locates folders within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

Specified by:
getFolders in interface PageManager
Parameters:
folder - The parent folder.
Returns:
A NodeSet containing all sub-folders directly under this folder.
Throws:
DocumentException
See Also:
org.apache.jetspeed.om.folder.Folder#getFolders(org.apache.jetspeed.om.folder.Folder)

getFolder

public Folder getFolder(Folder folder,
                        java.lang.String name)
                 throws FolderNotFoundException,
                        DocumentException
Description copied from interface: PageManager

getFolder

Locates folders within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

Specified by:
getFolder in interface PageManager
Parameters:
folder - The parent folder.
name - The name of folder to retrieve.
Returns:
A Folder referenced by this folder.
Throws:
FolderNotFoundException
DocumentException
See Also:
org.apache.jetspeed.om.folder.Folder#getFolder(org.apache.jetspeed.om.folder.Folder,java.lang.String)

getPages

public NodeSet getPages(Folder folder)
                 throws NodeException
Description copied from interface: PageManager

getPages

Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

Specified by:
getPages in interface PageManager
Parameters:
folder - The parent folder.
Returns:
A NodeSet of all the Pages referenced by this Folder.
Throws:
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getPages(org.apache.jetspeed.om.folder.Folder)

getPage

public Page getPage(Folder folder,
                    java.lang.String name)
             throws PageNotFoundException,
                    NodeException
Description copied from interface: PageManager

getPage

Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

Specified by:
getPage in interface PageManager
Parameters:
folder - The parent folder.
name - The name of page to retrieve.
Returns:
A Page referenced by this folder.
Throws:
PageNotFoundException - if the Page requested could not be found.
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getPage(org.apache.jetspeed.om.folder.Folder,java.lang.String)

getLinks

public NodeSet getLinks(Folder folder)
                 throws NodeException
Description copied from interface: PageManager

getLinks

Specified by:
getLinks in interface PageManager
Parameters:
folder - The parent folder.
Returns:
NodeSet of all the Links referenced by this Folder.
Throws:
NodeException
See Also:
Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

getLink

public Link getLink(Folder folder,
                    java.lang.String name)
             throws DocumentNotFoundException,
                    NodeException
Description copied from interface: PageManager

getLink

Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

Specified by:
getLink in interface PageManager
Parameters:
folder - The parent folder.
name - The name of page to retrieve.
Returns:
A Link referenced by this folder.
Throws:
DocumentNotFoundException - if the document requested could not be found.
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getLink(org.apache.jetspeed.om.folder.Folder,java.lang.String)

getPageSecurity

public PageSecurity getPageSecurity(Folder folder)
                             throws DocumentNotFoundException,
                                    NodeException
Description copied from interface: PageManager

getPageSecurity

Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.

Specified by:
getPageSecurity in interface PageManager
Parameters:
folder - The parent folder.
Returns:
A PageSecurity referenced by this folder.
Throws:
DocumentNotFoundException - if the document requested could not be found.
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getPageSecurity(org.apache.jetspeed.om.folder.Folder)

getAll

public NodeSet getAll(Folder folder)
               throws DocumentException
Description copied from interface: PageManager

getAll

Locates folders and documents within a specified parent folder. Returned folders and documents are filtered according to security constraints and/or permissions.

Specified by:
getAll in interface PageManager
Parameters:
folder - The parent folder.
Returns:
A NodeSet containing all sub-folders and documents directly under this folder.
Throws:
DocumentException
See Also:
org.apache.jetspeed.om.folder.Folder#getAll(org.apache.jetspeed.om.folder.Folder)

updatePage

public void updatePage(Page page)
                throws NodeException,
                       PageNotUpdatedException
Description copied from interface: PageManager
Update a page in persistent storage

Specified by:
updatePage in interface PageManager
Parameters:
page - The page to be updated.
Throws:
NodeException
PageNotUpdatedException

removePage

public void removePage(Page page)
                throws NodeException,
                       PageNotRemovedException
Description copied from interface: PageManager
Remove a document.

Specified by:
removePage in interface PageManager
Parameters:
page - The page to be removed.
Throws:
NodeException
PageNotRemovedException

updateFolder

public void updateFolder(Folder folder)
                  throws NodeException,
                         FolderNotUpdatedException
Description copied from interface: PageManager
Update a folder and all child folders and documents in persistent storage

Specified by:
updateFolder in interface PageManager
Parameters:
folder - The folder to be updated.
Throws:
NodeException
FolderNotUpdatedException

updateFolder

public void updateFolder(Folder folder,
                         boolean deep)
                  throws NodeException,
                         FolderNotUpdatedException
Description copied from interface: PageManager
Update a folder in persistent storage

Specified by:
updateFolder in interface PageManager
Parameters:
folder - The folder to be updated.
deep - Flag to control recursive deep updates.
Throws:
NodeException
FolderNotUpdatedException

removeFolder

public void removeFolder(Folder folder)
                  throws NodeException,
                         FolderNotRemovedException
Description copied from interface: PageManager
Remove a folder.

Specified by:
removeFolder in interface PageManager
Throws:
NodeException
FolderNotRemovedException

updateLink

public void updateLink(Link link)
                throws NodeException,
                       LinkNotUpdatedException
Description copied from interface: PageManager
Update a link in persistent storage

Specified by:
updateLink in interface PageManager
Parameters:
link - The link to be updated.
Throws:
NodeException
LinkNotUpdatedException

removeLink

public void removeLink(Link link)
                throws NodeException,
                       LinkNotRemovedException
Description copied from interface: PageManager
Remove a link.

Specified by:
removeLink in interface PageManager
Parameters:
link - The link to be removed.
Throws:
NodeException
LinkNotRemovedException

updatePageSecurity

public void updatePageSecurity(PageSecurity pageSecurity)
                        throws NodeException,
                               FailedToUpdateDocumentException
Description copied from interface: PageManager
Update a page security document in persistent storage

Specified by:
updatePageSecurity in interface PageManager
Parameters:
pageSecurity - The document to be updated.
Throws:
NodeException
FailedToUpdateDocumentException

removePageSecurity

public void removePageSecurity(PageSecurity pageSecurity)
                        throws NodeException,
                               FailedToDeleteDocumentException
Description copied from interface: PageManager
Remove a page security document.

Specified by:
removePageSecurity in interface PageManager
Parameters:
pageSecurity - The document to be removed.
Throws:
NodeException
FailedToDeleteDocumentException

copyPage

public Page copyPage(Page source,
                     java.lang.String path)
              throws NodeException,
                     PageNotUpdatedException
Description copied from interface: PageManager
Copy the source page creating and returning a new copy of the page with the same portlet and fragment collection as the source All fragments are created with new fragment ids

Specified by:
copyPage in interface PageManager
Parameters:
source - The source Page object to be copied
path - a PSML normalized path to the new page to be created
Returns:
a new Page object copied from the source, with new fragment ids
Throws:
NodeException
PageNotUpdatedException

copyLink

public Link copyLink(Link source,
                     java.lang.String path)
              throws NodeException,
                     LinkNotUpdatedException
Description copied from interface: PageManager
Copy the source link creating and returning a new copy of the link

Specified by:
copyLink in interface PageManager
Parameters:
source - The source Link object to be copied
path - a PSML normalized path to the new link to be created
Returns:
a new Link object copied from the source
Throws:
NodeException
LinkNotUpdatedException

copyFolder

public Folder copyFolder(Folder source,
                         java.lang.String path)
                  throws NodeException,
                         PageNotUpdatedException
Description copied from interface: PageManager
Copy the source folder creating and returning a new copy of the folder with the same content as the source All subobjects are created with new ids

Specified by:
copyFolder in interface PageManager
Parameters:
source - The source Folder object to be copied
path - a PSML normalized path to the new folder to be created
Returns:
a new Folder object copied from the source, with new subobject ids
Throws:
NodeException
PageNotUpdatedException

copyFragment

public Fragment copyFragment(Fragment source,
                             java.lang.String name)
                      throws NodeException,
                             PageNotUpdatedException
Description copied from interface: PageManager
Copy the source fragment creating and returning a new copy of the fragment with the parameter collection as the source The fragment is created with a new fragment id

Specified by:
copyFragment in interface PageManager
Parameters:
source - The source Fragment object to be copied
Returns:
a new Fragment object copied from the source
Throws:
NodeException
PageNotUpdatedException

copyPageSecurity

public PageSecurity copyPageSecurity(PageSecurity source)
                              throws NodeException
Description copied from interface: PageManager
Copy the source page security (both global constraints and constraint references) creating and returning a new copy of the page security definition.

Specified by:
copyPageSecurity in interface PageManager
Parameters:
source - The source PageSecurity definitions
Returns:
the new page security object
Throws:
NodeException

getUserPage

public Page getUserPage(java.lang.String userName,
                        java.lang.String pageName)
                 throws PageNotFoundException,
                        NodeException
Description copied from interface: PageManager
Retrieve a page for the given user name and page name

Specified by:
getUserPage in interface PageManager
Returns:
Throws:
PageNotFoundException
NodeException

getUserFolder

public Folder getUserFolder(java.lang.String userName)
                     throws FolderNotFoundException,
                            InvalidFolderException,
                            NodeException
Description copied from interface: PageManager
Retrieve a user's folder

Specified by:
getUserFolder in interface PageManager
Returns:
Throws:
FolderNotFoundException
InvalidFolderException
NodeException

folderExists

public boolean folderExists(java.lang.String folderName)
Description copied from interface: PageManager
Check if a folder exists for the given folder name

Specified by:
folderExists in interface PageManager
Returns:

pageExists

public boolean pageExists(java.lang.String pageName)
Description copied from interface: PageManager
Check if a page exists for the given page name

Specified by:
pageExists in interface PageManager
Returns:

linkExists

public boolean linkExists(java.lang.String linkName)
Description copied from interface: PageManager
Check if a link exists for the given link name

Specified by:
linkExists in interface PageManager
Returns:

userFolderExists

public boolean userFolderExists(java.lang.String userName)
Description copied from interface: PageManager
Check if the root folder exists for a given user

Specified by:
userFolderExists in interface PageManager
Returns:

userPageExists

public boolean userPageExists(java.lang.String userName,
                              java.lang.String pageName)
Description copied from interface: PageManager
Check if a page exists for the given user

Specified by:
userPageExists in interface PageManager
Returns:

createUserHomePagesFromRoles

public void createUserHomePagesFromRoles(javax.security.auth.Subject subject)
                                  throws NodeException
Description copied from interface: PageManager
Creates a user's home page from the roles of the current user. The use case: when a portal is setup to use shared pages, but then the user attempts to customize. At this point, we create the new page(s) for the user.

Specified by:
createUserHomePagesFromRoles in interface PageManager
Parameters:
subject - The full user Java Security subject.
Throws:
NodeException

deepCopyFolder

public void deepCopyFolder(Folder srcFolder,
                           java.lang.String destinationPath,
                           java.lang.String owner)
                    throws NodeException,
                           PageNotUpdatedException
Description copied from interface: PageManager
Deep copy a folder. Copies a folder and all subcontents including other folders, subpages, links, menus, security, fragments.

Specified by:
deepCopyFolder in interface PageManager
owner - set owner of the new folder(s), or null for no owner
Throws:
NodeException
PageNotUpdatedException

addPages

public int addPages(Page[] pages)
             throws NodeException
Specified by:
addPages in interface PageManager
Returns:
Throws:
NodeException


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.