org.apache.jetspeed.page
Interface PageManager


public interface PageManager

This service is responsible for loading and saving Pages into the selected persistent store.

Version:
$Id: PageManager.java 989442 2010-08-26 04:43:00Z taylor $

Field Summary
static java.lang.String ALL_PROPERTY_SCOPE
          all standard property scopes
static java.lang.String GLOBAL_PROPERTY_SCOPE
          global standard property scope
static boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED
          group and role standard property scopes enabled flag
static java.lang.String GROUP_PROPERTY_SCOPE
          group standard property scope
static java.lang.String ROLE_PROPERTY_SCOPE
          role standard property scope
static java.lang.String SERVICE_NAME
          The name of the service
static java.lang.String USER_PROPERTY_SCOPE
          user standard property scope
 
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)
          For a given security constraint definition name, and the given action(s), make a constraint check for the current user subject
 void cleanupRequestCache()
          Cleanup request level cache for current thread.
 DynamicPage copyDynamicPage(DynamicPage source, java.lang.String path)
          Copy the source dynamic page creating and returning a new copy of the dynamic page with the same portlet and fragment collection as the source.
 DynamicPage copyDynamicPage(DynamicPage source, java.lang.String path, boolean copyIds)
          Copy the source dynamic page creating and returning a new copy of the dynamic page with the same portlet and fragment collection as the source.
 Folder copyFolder(Folder source, java.lang.String path)
          Copy the source folder creating and returning a new copy of the folder without copying any content from within the folder
 BaseFragmentElement copyFragment(BaseFragmentElement 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
 BaseFragmentElement copyFragment(BaseFragmentElement source, java.lang.String name, boolean copyIds)
          Copy the source fragment creating and returning a new copy of the fragment with the parameter collection as the source
 FragmentDefinition copyFragmentDefinition(FragmentDefinition source, java.lang.String path)
          Copy the source fragment definition creating and returning a new copy of the fragment definition with the same portlet and fragment collection as the source.
 FragmentDefinition copyFragmentDefinition(FragmentDefinition source, java.lang.String path, boolean copyIds)
          Copy the source fragment definition creating and returning a new copy of the fragment definition with the same portlet and fragment collection as the source.
 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.
 Page copyPage(Page source, java.lang.String path, boolean copyIds)
          Copy the source page creating and returning a new copy of the page with the same portlet and fragment collection as the source.
 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.
 PageTemplate copyPageTemplate(PageTemplate source, java.lang.String path)
          Copy the source page template creating and returning a new copy of the page template with the same portlet and fragment collection as the source.
 PageTemplate copyPageTemplate(PageTemplate source, java.lang.String path, boolean copyIds)
          Copy the source page template creating and returning a new copy of the page template with the same portlet and fragment collection as the source.
 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.
 void deepCopyFolder(Folder srcFolder, java.lang.String destinationPath, java.lang.String owner, boolean copyIds)
          Deep copy a folder.
 void deepMergeFolder(Folder srcFolder, java.lang.String destinationPath, java.lang.String owner)
          Deep merges a source folder into a destination folder.
 void deepMergeFolder(Folder srcFolder, java.lang.String destinationPath, java.lang.String owner, boolean copyIds)
          Deep merges a source folder into a destination folder.
 boolean dynamicPageExists(java.lang.String pageName)
          Check if a dynamic page exists for the given page name
 boolean folderExists(java.lang.String folderName)
          Check if a folder exists for the given folder name
 boolean fragmentDefinitionExists(java.lang.String name)
          Check if a fragment definition exists for the given name
 NodeSet getAll(Folder folder)
           getAll
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 DynamicPage getDynamicPage(Folder folder, java.lang.String name)
           getDynamicPage
 DynamicPage getDynamicPage(java.lang.String path)
           getDynamicPage
 NodeSet getDynamicPages(Folder folder)
           getDynamicPages
 Folder getFolder(Folder folder, java.lang.String name)
           getFolder
 Folder getFolder(java.lang.String folderPath)
           getFolder
 NodeSet getFolders(Folder folder)
           getFolders
 FragmentDefinition getFragmentDefinition(Folder folder, java.lang.String name)
           getFragmentDefinition
 FragmentDefinition getFragmentDefinition(java.lang.String path)
           getFragmentDefinition
 NodeSet getFragmentDefinitions(Folder folder)
           getFragmentDefinition
 FragmentPropertyManagement getFragmentPropertyManager()
          Supplemental and optional service supported by Page Managers.
 Link getLink(Folder folder, java.lang.String name)
           getLink
 Link getLink(java.lang.String name)
           getLink
 NodeSet getLinks(Folder folder)
           getLinks
 long getNodeReapingInterval()
          Get node reaping interval.
 Page getPage(Folder folder, java.lang.String name)
           getPage
 Page getPage(java.lang.String path)
           getPage
 NodeSet getPages(Folder folder)
           getPages
 PageSecurity getPageSecurity()
           getPageSecurity
 PageSecurity getPageSecurity(Folder folder)
           getPageSecurity
 PageTemplate getPageTemplate(Folder folder, java.lang.String name)
           getPageTemplate
 PageTemplate getPageTemplate(java.lang.String path)
           getPageTemplate
 NodeSet getPageTemplates(Folder folder)
           getPageTemplates
 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 isDistributed()
          Returns whether the page manager cache is currently part of a distributed cache cluster.
 boolean linkExists(java.lang.String linkName)
          Check if a link exists for the given link name
 DynamicPage newDynamicPage(java.lang.String path)
          Creates a new empty DynamicPage instance
 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
 FragmentDefinition newFragmentDefinition(java.lang.String path)
          Creates a new empty FragmentDefinition instance
 FragmentPreference newFragmentPreference()
          newFragmentPreference - creates a new fragment preference
 FragmentProperty newFragmentProperty()
          newFragmentProperty - creates a new fragment property
 FragmentReference newFragmentReference()
          Creates a new FragmentReference instance
 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
 PageFragment newPageFragment()
          Creates a new PageFragment 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
 PageTemplate newPageTemplate(java.lang.String path)
          Creates a new empty PageTemplate instance
 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
 void notifyUpdatedNode(Node node)
          Notify page manager listeners that node modification was externally detected.
 boolean pageExists(java.lang.String pageName)
          Check if a page exists for the given page name
 boolean pageTemplateExists(java.lang.String pageName)
          Check if a page template exists for the given page name
 void removeDynamicPage(DynamicPage dynamicPage)
          Remove a dynamic page.
 void removeFolder(Folder folder)
          Remove a folder.
 void removeFragmentDefinition(FragmentDefinition fragmentDefinition)
          Remove a fragment definition.
 void removeLink(Link link)
          Remove a link.
 void removeListener(PageManagerEventListener listener)
          removeListener - remove page manager event listener
 void removePage(Page page)
          Remove a page.
 void removePageSecurity(PageSecurity pageSecurity)
          Remove a page security document.
 void removePageTemplate(PageTemplate pageTemplate)
          Remove a page template.
 void reset()
          reset - force subsequent refresh from persistent store
 void shutdown()
          shutdown - gracefully shutdown page manager and disconnect from other singleton components, (e.g.
 void updateDynamicPage(DynamicPage dynamicPage)
          Update a dynamic page in persistent storage
 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 updateFragmentDefinition(FragmentDefinition fragmentDefinition)
          Update a fragment definition in persistent storage
 void updateFragmentProperties(BaseFragmentElement fragment, java.lang.String scope)
          Update fragment properties for specified scope.
 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
 void updatePageTemplate(PageTemplate pageTemplate)
          Update a page template 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
 

Field Detail

SERVICE_NAME

static final java.lang.String SERVICE_NAME
The name of the service

See Also:
Constant Field Values

USER_PROPERTY_SCOPE

static final java.lang.String USER_PROPERTY_SCOPE
user standard property scope

See Also:
Constant Field Values

GROUP_PROPERTY_SCOPE

static final java.lang.String GROUP_PROPERTY_SCOPE
group standard property scope

See Also:
Constant Field Values

ROLE_PROPERTY_SCOPE

static final java.lang.String ROLE_PROPERTY_SCOPE
role standard property scope

See Also:
Constant Field Values

GLOBAL_PROPERTY_SCOPE

static final java.lang.String GLOBAL_PROPERTY_SCOPE
global standard property scope


ALL_PROPERTY_SCOPE

static final java.lang.String ALL_PROPERTY_SCOPE
all standard property scopes

See Also:
Constant Field Values

GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED

static final boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED
group and role standard property scopes enabled flag

See Also:
Constant Field Values
Method Detail

getConstraintsEnabled

boolean getConstraintsEnabled()

getConstraintsEnabled

Returns:
enabled indicator

getPermissionsEnabled

boolean getPermissionsEnabled()

getPermissionsEnabled

Returns:
enabled indicator

getNodeReapingInterval

long getNodeReapingInterval()
Get node reaping interval.

Returns:
reaping interval

newPage

Page newPage(java.lang.String path)
Creates a new empty Page instance

Returns:
a newly created Page object

newPageTemplate

PageTemplate newPageTemplate(java.lang.String path)
Creates a new empty PageTemplate instance

Returns:
a newly created PageTemplate object

newDynamicPage

DynamicPage newDynamicPage(java.lang.String path)
Creates a new empty DynamicPage instance

Returns:
a newly created DynamicPage object

newFragmentDefinition

FragmentDefinition newFragmentDefinition(java.lang.String path)
Creates a new empty FragmentDefinition instance

Returns:
a newly created FragmentDefinition object

newFolder

Folder newFolder(java.lang.String path)
Create a new empty Folder instance

Returns:
a newly created Folder object

newLink

Link newLink(java.lang.String path)
Creates a new empty Link instance

Returns:
a newly created Link object

newPageSecurity

PageSecurity newPageSecurity()
Creates a new empty PageSecurity instance

Returns:
a newly created PageSecurity object

newFragment

Fragment newFragment()
Creates a new empty Layout Fragment instance

Returns:
a newly created Fragment object

newPortletFragment

Fragment newPortletFragment()
Creates a new empty Portlet Fragment instance

Returns:
a newly created Fragment object

newFragmentReference

FragmentReference newFragmentReference()
Creates a new FragmentReference instance

Returns:
a newly created Fragment object

newPageFragment

PageFragment newPageFragment()
Creates a new PageFragment instance

Returns:
a newly created Fragment object

newFolderMenuDefinition

MenuDefinition newFolderMenuDefinition()
newFolderMenuDefinition - creates a new empty menu definition

Returns:
a newly created MenuDefinition object to be used in Folder

newFolderMenuExcludeDefinition

MenuExcludeDefinition newFolderMenuExcludeDefinition()
newFolderMenuExcludeDefinition - creates a new empty menu exclude definition

Returns:
a newly created MenuExcludeDefinition object to be used in Folder

newFolderMenuIncludeDefinition

MenuIncludeDefinition newFolderMenuIncludeDefinition()
newFolderMenuIncludeDefinition - creates a new empty menu include definition

Returns:
a newly created MenuIncludeDefinition object to be used in Folder

newFolderMenuOptionsDefinition

MenuOptionsDefinition newFolderMenuOptionsDefinition()
newFolderMenuOptionsDefinition - creates a new empty menu options definition

Returns:
a newly created MenuOptionsDefinition object to be used in Folder

newFolderMenuSeparatorDefinition

MenuSeparatorDefinition newFolderMenuSeparatorDefinition()
newFolderMenuSeparatorDefinition - creates a new empty menu separator definition

Returns:
a newly created MenuSeparatorDefinition object to be used in Folder

newPageMenuDefinition

MenuDefinition newPageMenuDefinition()
newPageMenuDefinition - creates a new empty menu definition

Returns:
a newly created MenuDefinition object to be used in Page

newPageMenuExcludeDefinition

MenuExcludeDefinition newPageMenuExcludeDefinition()
newPageMenuExcludeDefinition - creates a new empty menu exclude definition

Returns:
a newly created MenuExcludeDefinition object to be used in Page

newPageMenuIncludeDefinition

MenuIncludeDefinition newPageMenuIncludeDefinition()
newPageMenuIncludeDefinition - creates a new empty menu include definition

Returns:
a newly created MenuIncludeDefinition object to be used in Page

newPageMenuOptionsDefinition

MenuOptionsDefinition newPageMenuOptionsDefinition()
newPageMenuOptionsDefinition - creates a new empty menu options definition

Returns:
a newly created MenuOptionsDefinition object to be used in Page

newPageMenuSeparatorDefinition

MenuSeparatorDefinition newPageMenuSeparatorDefinition()
newPageMenuSeparatorDefinition - creates a new empty menu separator definition

Returns:
a newly created MenuSeparatorDefinition object to be used in Page

newSecurityConstraints

SecurityConstraints newSecurityConstraints()
newSecurityConstraints - creates a new empty security constraints definition

Returns:
a newly created SecurityConstraints object

newFolderSecurityConstraint

SecurityConstraint newFolderSecurityConstraint()
newFolderSecurityConstraint - creates a new security constraint definition

Returns:
a newly created SecurityConstraint object to be used in Folder

newPageSecurityConstraint

SecurityConstraint newPageSecurityConstraint()
newPageSecurityConstraint - creates a new security constraint definition

Returns:
a newly created SecurityConstraint object to be used in Page

newFragmentSecurityConstraint

SecurityConstraint newFragmentSecurityConstraint()
newFragmentSecurityConstraint - creates a new security constraint definition

Returns:
a newly created SecurityConstraint object to be used in Fragment

newLinkSecurityConstraint

SecurityConstraint newLinkSecurityConstraint()
newLinkSecurityConstraint - creates a new security constraint definition

Returns:
a newly created SecurityConstraint object to be used in Link

newPageSecuritySecurityConstraint

SecurityConstraint newPageSecuritySecurityConstraint()
newPageSecuritySecurityConstraint - creates a new security constraint definition

Returns:
a newly created SecurityConstraint object to be used in PageSecurity

newSecurityConstraintsDef

SecurityConstraintsDef newSecurityConstraintsDef()
newSecurityConstraintsDef - creates a new security constraints definition

Returns:
a newly created SecurityConstraintsDef object

newFragmentPreference

FragmentPreference newFragmentPreference()
newFragmentPreference - creates a new fragment preference

Returns:
a newly created FragmentPreference

newFragmentProperty

FragmentProperty newFragmentProperty()
newFragmentProperty - creates a new fragment property

Returns:
a newly created FragmentProperty

getPage

Page getPage(java.lang.String path)
             throws PageNotFoundException,
                    NodeException

getPage

Returns a Page based on its path

Parameters:
path -
Throws:
PageNotFoundException - if the page cannot be found
NodeException

getPageTemplate

PageTemplate getPageTemplate(java.lang.String path)
                             throws PageNotFoundException,
                                    NodeException

getPageTemplate

Returns a PageTemplate based on its path

Parameters:
path -
Throws:
PageNotFoundException - if the page cannot be found
NodeException

getDynamicPage

DynamicPage getDynamicPage(java.lang.String path)
                           throws PageNotFoundException,
                                  NodeException

getDynamicPage

Returns a DynamicPage based on its path

Parameters:
path -
Throws:
PageNotFoundException - if the page cannot be found
NodeException

getFragmentDefinition

FragmentDefinition getFragmentDefinition(java.lang.String path)
                                         throws PageNotFoundException,
                                                NodeException

getFragmentDefinition

Returns a FragmentDefinition based on its path

Parameters:
path -
Throws:
PageNotFoundException - if the page cannot be found
NodeException

getLink

Link getLink(java.lang.String name)
             throws DocumentNotFoundException,
                    UnsupportedDocumentTypeException,
                    NodeException

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

PageSecurity getPageSecurity()
                             throws DocumentNotFoundException,
                                    UnsupportedDocumentTypeException,
                                    NodeException

getPageSecurity

Returns the PageSecurity document

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

getFolder

Folder getFolder(java.lang.String folderPath)
                 throws FolderNotFoundException,
                        InvalidFolderException,
                        NodeException

getFolder

Locates a folder for the given path.

Parameters:
folderPath -
Returns:
Folder object represented by the folderPath
Throws:
FolderNotFoundException
NodeException
InvalidFolderException

getFolders

NodeSet getFolders(Folder folder)
                   throws DocumentException

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

Folder getFolder(Folder folder,
                 java.lang.String name)
                 throws FolderNotFoundException,
                        DocumentException

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

NodeSet getPages(Folder folder)
                 throws NodeException

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)

getPageTemplates

NodeSet getPageTemplates(Folder folder)
                         throws NodeException

getPageTemplates

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 PageTemplates referenced by this Folder.
Throws:
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getPageTemplates(org.apache.jetspeed.om.folder.Folder)

getDynamicPages

NodeSet getDynamicPages(Folder folder)
                        throws NodeException

getDynamicPages

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 DynamicPages referenced by this Folder.
Throws:
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getDynamicPages(org.apache.jetspeed.om.folder.Folder)

getFragmentDefinitions

NodeSet getFragmentDefinitions(Folder folder)
                               throws NodeException

getFragmentDefinition

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 FragmentDefinitions referenced by this Folder.
Throws:
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getFragmentDefinition(org.apache.jetspeed.om.folder.Folder)

getPage

Page getPage(Folder folder,
             java.lang.String name)
             throws PageNotFoundException,
                    NodeException

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)

getPageTemplate

PageTemplate getPageTemplate(Folder folder,
                             java.lang.String name)
                             throws PageNotFoundException,
                                    NodeException

getPageTemplate

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 template to retrieve.
Returns:
A PageTemplate referenced by this folder.
Throws:
PageNotFoundException - if the PageTemplate requested could not be found.
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getPageTemplate(org.apache.jetspeed.om.folder.Folder,java.lang.String)

getDynamicPage

DynamicPage getDynamicPage(Folder folder,
                           java.lang.String name)
                           throws PageNotFoundException,
                                  NodeException

getDynamicPage

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 dynamic page to retrieve.
Returns:
A DynamicPage referenced by this folder.
Throws:
PageNotFoundException - if the DynamicPage requested could not be found.
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getDynamicPage(org.apache.jetspeed.om.folder.Folder,java.lang.String)

getFragmentDefinition

FragmentDefinition getFragmentDefinition(Folder folder,
                                         java.lang.String name)
                                         throws PageNotFoundException,
                                                NodeException

getFragmentDefinition

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 fragment definition to retrieve.
Returns:
A DynamicPage referenced by this folder.
Throws:
PageNotFoundException - if the FragmentDefinition requested could not be found.
NodeException
See Also:
org.apache.jetspeed.om.folder.Folder#getFragmentDefinition(org.apache.jetspeed.om.folder.Folder,java.lang.String)

getLinks

NodeSet getLinks(Folder folder)
                 throws NodeException

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

Link getLink(Folder folder,
             java.lang.String name)
             throws DocumentNotFoundException,
                    NodeException

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

PageSecurity getPageSecurity(Folder folder)
                             throws DocumentNotFoundException,
                                    NodeException

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

NodeSet getAll(Folder folder)
               throws DocumentException

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

void updatePage(Page page)
                throws NodeException,
                       PageNotUpdatedException
Update a page in persistent storage

Parameters:
page - The page to be updated.
Throws:
NodeException
PageNotUpdatedException

removePage

void removePage(Page page)
                throws NodeException,
                       PageNotRemovedException
Remove a page.

Parameters:
page - The page to be removed.
Throws:
NodeException
PageNotRemovedException

updatePageTemplate

void updatePageTemplate(PageTemplate pageTemplate)
                        throws NodeException,
                               PageNotUpdatedException
Update a page template in persistent storage

Parameters:
pageTemplate - The page template to be updated.
Throws:
NodeException
PageNotUpdatedException

removePageTemplate

void removePageTemplate(PageTemplate pageTemplate)
                        throws NodeException,
                               PageNotRemovedException
Remove a page template.

Parameters:
pageTemplate - The page template to be removed.
Throws:
NodeException
PageNotRemovedException

updateDynamicPage

void updateDynamicPage(DynamicPage dynamicPage)
                       throws NodeException,
                              PageNotUpdatedException
Update a dynamic page in persistent storage

Parameters:
dynamicPage - The dynamic page to be updated.
Throws:
NodeException
PageNotUpdatedException

removeDynamicPage

void removeDynamicPage(DynamicPage dynamicPage)
                       throws NodeException,
                              PageNotRemovedException
Remove a dynamic page.

Parameters:
dynamicPage - The dynamic page to be removed.
Throws:
NodeException
PageNotRemovedException

updateFragmentDefinition

void updateFragmentDefinition(FragmentDefinition fragmentDefinition)
                              throws NodeException,
                                     PageNotUpdatedException
Update a fragment definition in persistent storage

Parameters:
fragmentDefinition - The fragment definition to be updated.
Throws:
NodeException
PageNotUpdatedException

removeFragmentDefinition

void removeFragmentDefinition(FragmentDefinition fragmentDefinition)
                              throws NodeException,
                                     PageNotRemovedException
Remove a fragment definition.

Parameters:
fragmentDefinition - The fragment definition to be removed.
Throws:
NodeException
PageNotRemovedException

updateFragmentProperties

void updateFragmentProperties(BaseFragmentElement fragment,
                              java.lang.String scope)
                              throws NodeException,
                                     PageNotUpdatedException
Update fragment properties for specified scope. Implementation may not be able to update fragment properties without updating entire page. Edit page security constraints will not be checked in these cases if the specified scope is user; this effectively circumvents security checks, so this method should only be used in places where the edits will be restricted to user fragment properties.

Parameters:
fragment - owner of fragment properties to update.
scope - fragment property scope to update, (user, group, role, global, or all).
Throws:
NodeException
PageNotUpdatedException

updateFolder

void updateFolder(Folder folder)
                  throws NodeException,
                         FolderNotUpdatedException
Update a folder and all child folders and documents in persistent storage

Parameters:
folder - The folder to be updated.
Throws:
NodeException
FolderNotUpdatedException

updateFolder

void updateFolder(Folder folder,
                  boolean deep)
                  throws NodeException,
                         FolderNotUpdatedException
Update a folder in persistent storage

Parameters:
folder - The folder to be updated.
deep - Flag to control recursive deep updates.
Throws:
NodeException
FolderNotUpdatedException

removeFolder

void removeFolder(Folder folder)
                  throws NodeException,
                         FolderNotRemovedException
Remove a folder.

Parameters:
page - The folder to be removed.
Throws:
NodeException
FolderNotRemovedException

updateLink

void updateLink(Link link)
                throws NodeException,
                       LinkNotUpdatedException
Update a link in persistent storage

Parameters:
link - The link to be updated.
Throws:
NodeException
LinkNotUpdatedException

removeLink

void removeLink(Link link)
                throws NodeException,
                       LinkNotRemovedException
Remove a link.

Parameters:
link - The link to be removed.
Throws:
NodeException
LinkNotRemovedException

updatePageSecurity

void updatePageSecurity(PageSecurity pageSecurity)
                        throws NodeException,
                               FailedToUpdateDocumentException
Update a page security document in persistent storage

Parameters:
pageSecurity - The document to be updated.
Throws:
NodeException
FailedToUpdateDocumentException

removePageSecurity

void removePageSecurity(PageSecurity pageSecurity)
                        throws NodeException,
                               FailedToDeleteDocumentException
Remove a page security document.

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

addListener

void addListener(PageManagerEventListener listener)
addListener - add page manager event listener

Parameters:
listener - page manager event listener

removeListener

void removeListener(PageManagerEventListener listener)
removeListener - remove page manager event listener

Parameters:
listener - page manager event listener

reset

void reset()
reset - force subsequent refresh from persistent store


shutdown

void shutdown()
shutdown - gracefully shutdown page manager and disconnect from other singleton components, (e.g. shared caches)


copyPage

Page copyPage(Page source,
              java.lang.String path)
              throws NodeException
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.

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

copyPage

Page copyPage(Page source,
              java.lang.String path,
              boolean copyIds)
              throws NodeException
Copy the source page creating and returning a new copy of the page with the same portlet and fragment collection as the source.

Parameters:
source - The source Page object to be copied
path - a PSML normalized path to the new page to be created
copyIds - flag indicating whether to use new or copied ids
Returns:
a new Page object copied from the source
Throws:
NodeException

copyPageTemplate

PageTemplate copyPageTemplate(PageTemplate source,
                              java.lang.String path)
                              throws NodeException
Copy the source page template creating and returning a new copy of the page template with the same portlet and fragment collection as the source. All fragments are created with new fragment ids.

Parameters:
source - The source PageTemplate object to be copied
path - a PSML normalized path to the new page template to be created
Returns:
a new PageTemplate object copied from the source, with new fragment ids
Throws:
NodeException

copyPageTemplate

PageTemplate copyPageTemplate(PageTemplate source,
                              java.lang.String path,
                              boolean copyIds)
                              throws NodeException
Copy the source page template creating and returning a new copy of the page template with the same portlet and fragment collection as the source.

Parameters:
source - The source PageTemplate object to be copied
path - a PSML normalized path to the new page template to be created
copyIds - flag indicating whether to use new or copied ids
Returns:
a new PageTemplate object copied from the source
Throws:
NodeException

copyDynamicPage

DynamicPage copyDynamicPage(DynamicPage source,
                            java.lang.String path)
                            throws NodeException
Copy the source dynamic page creating and returning a new copy of the dynamic page with the same portlet and fragment collection as the source. All fragments are created with new fragment ids.

Parameters:
source - The source DynamicPage object to be copied
path - a PSML normalized path to the new dynamic page to be created
Returns:
a new DynamicPage object copied from the source, with new fragment ids
Throws:
NodeException

copyDynamicPage

DynamicPage copyDynamicPage(DynamicPage source,
                            java.lang.String path,
                            boolean copyIds)
                            throws NodeException
Copy the source dynamic page creating and returning a new copy of the dynamic page with the same portlet and fragment collection as the source.

Parameters:
source - The source DynamicPage object to be copied
path - a PSML normalized path to the new dynamic page to be created
copyIds - flag indicating whether to use new or copied ids
Returns:
a new DynamicPage object copied from the source
Throws:
NodeException

copyFragmentDefinition

FragmentDefinition copyFragmentDefinition(FragmentDefinition source,
                                          java.lang.String path)
                                          throws NodeException
Copy the source fragment definition creating and returning a new copy of the fragment definition with the same portlet and fragment collection as the source. All fragments are created with new fragment ids.

Parameters:
source - The source FragmentDefinition object to be copied
path - a PSML normalized path to the new fragment definition to be created
Returns:
a new FragmentDefinition object copied from the source, with new fragment ids
Throws:
NodeException

copyFragmentDefinition

FragmentDefinition copyFragmentDefinition(FragmentDefinition source,
                                          java.lang.String path,
                                          boolean copyIds)
                                          throws NodeException
Copy the source fragment definition creating and returning a new copy of the fragment definition with the same portlet and fragment collection as the source.

Parameters:
source - The source FragmentDefinition object to be copied
path - a PSML normalized path to the new fragment definition to be created
copyIds - flag indicating whether to use new or copied ids
Returns:
a new FragmentDefinition object copied from the source
Throws:
NodeException

copyLink

Link copyLink(Link source,
              java.lang.String path)
              throws NodeException
Copy the source link creating and returning a new copy of the link

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

copyFolder

Folder copyFolder(Folder source,
                  java.lang.String path)
                  throws NodeException
Copy the source folder creating and returning a new copy of the folder without copying any content from within the folder

Parameters:
source - The source Folder object to be copied
path - a PSML normalized path to the new folder to be created
Returns:
a new empty Folder object copied from the source
Throws:
NodeException

copyFragment

BaseFragmentElement copyFragment(BaseFragmentElement source,
                                 java.lang.String name)
                                 throws NodeException
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

Parameters:
source - The source Fragment object to be copied
name - the new fragment name, can be the same as source fragment name or null to copy existing name
Returns:
a new Fragment object copied from the source
Throws:
NodeException

copyFragment

BaseFragmentElement copyFragment(BaseFragmentElement source,
                                 java.lang.String name,
                                 boolean copyIds)
                                 throws NodeException
Copy the source fragment creating and returning a new copy of the fragment with the parameter collection as the source

Parameters:
source - The source Fragment object to be copied
name - the new fragment name, can be the same as source fragment name or null to copy existing name
copyIds - flag indicating whether to use new or copied ids
Returns:
a new Fragment object copied from the source
Throws:
NodeException

copyPageSecurity

PageSecurity copyPageSecurity(PageSecurity source)
                              throws NodeException
Copy the source page security (both global constraints and constraint references) creating and returning a new copy of the page security definition.

Parameters:
source - The source PageSecurity definitions
Returns:
the new page security object
Throws:
NodeException

deepCopyFolder

void deepCopyFolder(Folder srcFolder,
                    java.lang.String destinationPath,
                    java.lang.String owner)
                    throws NodeException
Deep copy a folder. Copies a folder and all subcontents including other folders, subpages, links, menus, security, fragments.

Parameters:
source - source folder
dest - destination folder
owner - set owner of the new folder(s), or null for no owner
Throws:
NodeException - if the root folder already exists

deepCopyFolder

void deepCopyFolder(Folder srcFolder,
                    java.lang.String destinationPath,
                    java.lang.String owner,
                    boolean copyIds)
                    throws NodeException
Deep copy a folder. Copies a folder and all subcontents including other folders, subpages, links, menus, security, fragments.

Parameters:
source - source folder
dest - destination folder
owner - set owner of the new folder(s), or null for no owner
copyIds - flag indicating whether to use new or copied ids
Throws:
NodeException - if the root folder already exists

deepMergeFolder

void deepMergeFolder(Folder srcFolder,
                     java.lang.String destinationPath,
                     java.lang.String owner)
                     throws NodeException
Deep merges a source folder into a destination folder. Copies a folder and all subcontents including other folders, subpages, links, menus, security, fragments. If a destination resource already exists, it is skipped over without error.

Parameters:
source - source folder
dest - destination folder
owner - set owner of the new folder(s), or null for no owner
Throws:
NodeException

deepMergeFolder

void deepMergeFolder(Folder srcFolder,
                     java.lang.String destinationPath,
                     java.lang.String owner,
                     boolean copyIds)
                     throws NodeException
Deep merges a source folder into a destination folder. Copies a folder and all subcontents including other folders, subpages, links, menus, security, fragments. If a destination resource already exists, it is skipped over without error.

Parameters:
source - source folder
dest - destination folder
owner - set owner of the new folder(s), or null for no owner
copyIds - flag indicating whether to use new or copied ids
Throws:
NodeException

getUserPage

Page getUserPage(java.lang.String userName,
                 java.lang.String pageName)
                 throws PageNotFoundException,
                        NodeException
Retrieve a page for the given user name and page name

Parameters:
userName -
pageName -
Returns:
Throws:
PageNotFoundException
NodeException

getUserFolder

Folder getUserFolder(java.lang.String userName)
                     throws FolderNotFoundException,
                            InvalidFolderException,
                            NodeException
Retrieve a user's folder

Parameters:
userName -
Returns:
Throws:
FolderNotFoundException
InvalidFolderException
NodeException

folderExists

boolean folderExists(java.lang.String folderName)
Check if a folder exists for the given folder name

Parameters:
folderName -
Returns:

pageExists

boolean pageExists(java.lang.String pageName)
Check if a page exists for the given page name

Parameters:
pageName -
Returns:

pageTemplateExists

boolean pageTemplateExists(java.lang.String pageName)
Check if a page template exists for the given page name

Parameters:
pageName -
Returns:

dynamicPageExists

boolean dynamicPageExists(java.lang.String pageName)
Check if a dynamic page exists for the given page name

Parameters:
pageName -
Returns:

fragmentDefinitionExists

boolean fragmentDefinitionExists(java.lang.String name)
Check if a fragment definition exists for the given name

Parameters:
name -
Returns:

linkExists

boolean linkExists(java.lang.String linkName)
Check if a link exists for the given link name

Parameters:
linkName -
Returns:

userFolderExists

boolean userFolderExists(java.lang.String userName)
Check if the root folder exists for a given user

Parameters:
userName -
Returns:

userPageExists

boolean userPageExists(java.lang.String userName,
                       java.lang.String pageName)
Check if a page exists for the given user

Parameters:
userName -
pageName -
Returns:

createUserHomePagesFromRoles

void createUserHomePagesFromRoles(javax.security.auth.Subject subject)
                                  throws NodeException
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.

Parameters:
subject - The full user Java Security subject.
Throws:
NodeException

addPages

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

checkConstraint

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

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

isDistributed

boolean isDistributed()
Returns whether the page manager cache is currently part of a distributed cache cluster.

Returns:
distributed flag

notifyUpdatedNode

void notifyUpdatedNode(Node node)
Notify page manager listeners that node modification was externally detected.

Parameters:
node - updated managed node if known

cleanupRequestCache

void cleanupRequestCache()
Cleanup request level cache for current thread.


getFragmentPropertyManager

FragmentPropertyManagement getFragmentPropertyManager()
Supplemental and optional service supported by Page Managers. Fragment Property lists can be manipulated with this interface



Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.