org.apache.jetspeed.page
Class DelegatingPageManager

java.lang.Object
  extended by org.apache.jetspeed.page.AbstractPageManager
      extended by org.apache.jetspeed.page.DelegatingPageManager
All Implemented Interfaces:
PageManager

public class DelegatingPageManager
extends AbstractPageManager

DelegatingPageManager

Version:
$Id: $
Author:
David Sean Taylor

Field Summary
 
Fields inherited from class org.apache.jetspeed.page.AbstractPageManager
folderClass, folderMenuDefinitionClass, folderMenuExcludeDefinitionClass, folderMenuIncludeDefinitionClass, folderMenuOptionsDefinitionClass, folderMenuSeparatorDefinitionClass, folderSecurityConstraintClass, fragmentClass, fragmentPreferenceClass, fragmentSecurityConstraintClass, linkClass, linkSecurityConstraintClass, pageClass, pageMenuDefinitionClass, pageMenuExcludeDefinitionClass, pageMenuIncludeDefinitionClass, pageMenuOptionsDefinitionClass, pageMenuSeparatorDefinitionClass, pageSecurityClass, pageSecurityConstraintClass, pageSecuritySecurityConstraintClass, propertyClass, securityConstraintsClass, securityConstraintsDefClass
 
Fields inherited from interface org.apache.jetspeed.page.PageManager
SERVICE_NAME
 
Constructor Summary
DelegatingPageManager(boolean isPermissionsSecurity, boolean isConstraintsSecurity, java.util.Map modelClasses)
           
 
Method Summary
 int addPages(Page[] pages)
           
 boolean checkConstraint(java.lang.String securityConstraintName, java.lang.String actions)
          For a given security constraint definition name, and the given action(s), make a constraint check for the current user subject
 NodeSet getAll(Folder folder)
           getAll
 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 name)
           getLink
 NodeSet getLinks(Folder folder)
           getLinks
 Page getPage(Folder folder, java.lang.String name)
           getPage
 Page getPage(java.lang.String id)
           getPage
 NodeSet getPages(Folder folder)
           getPages
 PageSecurity getPageSecurity()
           getPageSecurity
 PageSecurity getPageSecurity(Folder folder)
           getPageSecurity
 void removeFolder(Folder folder)
          Remove a folder.
 void removeLink(Link link)
          Remove a link.
 void removePage(Page page)
          Remove a document.
 void removePageSecurity(PageSecurity pageSecurity)
          Remove a page security document.
 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
 
Methods inherited from class org.apache.jetspeed.page.AbstractPageManager
addListener, copyConstraint, copyFolder, copyFragment, copyLink, copyMenuDefinitions, copyMenuElement, copyPage, copyPageSecurity, copySecurityConstraints, createUserHomePagesFromRoles, deepCopyFolder, folderExists, getConstraintsEnabled, getPermissionsEnabled, getUserFolder, getUserPage, linkExists, newFolder, newFolderMenuDefinition, newFolderMenuExcludeDefinition, newFolderMenuIncludeDefinition, newFolderMenuOptionsDefinition, newFolderMenuSeparatorDefinition, newFolderSecurityConstraint, newFragment, newFragmentPreference, newFragmentSecurityConstraint, newLink, newLinkSecurityConstraint, newPage, newPageMenuDefinition, newPageMenuExcludeDefinition, newPageMenuIncludeDefinition, newPageMenuOptionsDefinition, newPageMenuSeparatorDefinition, newPageSecurity, newPageSecurityConstraint, newPageSecuritySecurityConstraint, newPortletFragment, newSecurityConstraints, newSecurityConstraintsDef, notifyNewNode, notifyRemovedNode, notifyUpdatedNode, pageExists, removeListener, reset, userFolderExists, userPageExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingPageManager

public DelegatingPageManager(boolean isPermissionsSecurity,
                             boolean isConstraintsSecurity,
                             java.util.Map modelClasses)
Method Detail

getPage

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

getPage

Returns a Page based on its path

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

Throws:
PageNotFoundException - if the page cannot be found
NodeException
See Also:
ContentPage, Fragment

getLink

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

getLink

Returns a Link document for the given path

Parameters:
name - The path of the document to be retrieved.
Throws:
PageNotFoundException - if the page cannot be found
NodeException
DocumentNotFoundException
UnsupportedDocumentTypeException

getPageSecurity

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

getPageSecurity

Returns the PageSecurity document

Throws:
DocumentNotFoundException - if the document cannot be found
UnsupportedDocumentTypeException
NodeException

checkConstraint

public boolean checkConstraint(java.lang.String securityConstraintName,
                               java.lang.String actions)
Description copied from interface: PageManager
For a given security constraint definition name, and the given action(s), make a constraint check for the current user subject

Parameters:
securityConstraintName - the name of the security constraint definition
actions - one or more portlet actions (view,edit,help,..)
Returns:

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.

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.

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.

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.

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.

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

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.

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.

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.

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

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.

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

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

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.

Throws:
NodeException
FolderNotRemovedException

updateLink

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

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.

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

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.

Parameters:
pageSecurity - The document to be removed.
Throws:
NodeException
FailedToDeleteDocumentException

addPages

public int addPages(Page[] pages)
             throws NodeException
Returns:
Throws:
NodeException


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