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 219577 2005-07-18 22:19:05Z taylor $

Field Summary
static String SERVICE_NAME
          The name of the service
 
Method Summary
 void addListener(PageManagerEventListener listener)
          addListener - add page manager event listener
 Page clonePage(Page source, String path)
          Clone the source page creating and returning a new cloned page with the same portlet and fragment collection as the source All fragments are created with new fragment ids
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 ContentPage getContentPage(String path)
           ContentPage
 Folder getFolder(String folderPath)
           getFolder
 Link getLink(String name)
           getLink
 Page getPage(String id)
           getPage
 PageSecurity getPageSecurity()
           getPageSecurity
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 Folder newFolder(String path)
          Create a new empty Folder instance
 Fragment newFragment()
          Creates a new empty Fragment instance
 Link newLink(String path)
          Creates a new empty Link instance
 MenuDefinition newMenuDefinition()
          newMenuDefinition - creates a new empty menu definition
 MenuExcludeDefinition newMenuExcludeDefinition()
          newMenuExcludeDefinition - creates a new empty menu exclude definition
 MenuIncludeDefinition newMenuIncludeDefinition()
          newMenuIncludeDefinition - creates a new empty menu include definition
 MenuOptionsDefinition newMenuOptionsDefinition()
          newMenuOptionsDefinition - creates a new empty menu options definition
 MenuSeparatorDefinition newMenuSeparatorDefinition()
          newMenuSeparatorDefinition - creates a new empty menu separator definition
 Page newPage(String path)
          Creates a new empty Page instance
 Property newProperty()
          Creates a new empty Property instance
 SecurityConstraint newSecurityConstraint()
          newSecurityConstraint - creates a new security constraint definition
 SecurityConstraints newSecurityConstraints()
          newSecurityConstraints - creates a new empty security constraints definition
 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 updateFolder(Folder folder)
          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
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
The name of the service

See Also:
Constant Field Values
Method Detail

getConstraintsEnabled

public boolean getConstraintsEnabled()

getConstraintsEnabled

Returns:
enabled indicator

getPermissionsEnabled

public boolean getPermissionsEnabled()

getPermissionsEnabled

Returns:
enabled indicator

newPage

public Page newPage(String path)
Creates a new empty Page instance

Returns:
a newly created Page object

newFolder

public Folder newFolder(String path)
Create a new empty Folder instance

Returns:
a newly created Folder object

newLink

public Link newLink(String path)
Creates a new empty Link instance

Returns:
a newly created Link object

newFragment

public Fragment newFragment()
Creates a new empty Fragment instance

Returns:
a newly created Fragment object

newProperty

public Property newProperty()
Creates a new empty Property instance

Returns:
a newly created Property object

newMenuDefinition

public MenuDefinition newMenuDefinition()
newMenuDefinition - creates a new empty menu definition

Returns:
a newly created MenuDefinition object

newMenuExcludeDefinition

public MenuExcludeDefinition newMenuExcludeDefinition()
newMenuExcludeDefinition - creates a new empty menu exclude definition

Returns:
a newly created MenuExcludeDefinition object

newMenuIncludeDefinition

public MenuIncludeDefinition newMenuIncludeDefinition()
newMenuIncludeDefinition - creates a new empty menu include definition

Returns:
a newly created MenuIncludeDefinition object

newMenuOptionsDefinition

public MenuOptionsDefinition newMenuOptionsDefinition()
newMenuOptionsDefinition - creates a new empty menu options definition

Returns:
a newly created MenuOptionsDefinition object

newMenuSeparatorDefinition

public MenuSeparatorDefinition newMenuSeparatorDefinition()
newMenuSeparatorDefinition - creates a new empty menu separator definition

Returns:
a newly created MenuSeparatorDefinition object

newSecurityConstraints

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

Returns:
a newly created SecurityConstraints object

newSecurityConstraint

public SecurityConstraint newSecurityConstraint()
newSecurityConstraint - creates a new security constraint definition

Returns:
a newly created SecurityConstraint object

getPage

public Page getPage(String id)
             throws PageNotFoundException,
                    NodeException

getPage

Returns a PSML document for the given key

Throws:
PageNotFoundException - if the page cannot be found
NodeException

getContentPage

public ContentPage getContentPage(String path)
                           throws PageNotFoundException,
                                  NodeException

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(String name)
             throws DocumentNotFoundException,
                    UnsupportedDocumentTypeException,
                    FolderNotFoundException,
                    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
FolderNotFoundException

getPageSecurity

public PageSecurity getPageSecurity()
                             throws DocumentNotFoundException,
                                    UnsupportedDocumentTypeException,
                                    FolderNotFoundException,
                                    NodeException

getPageSecurity

Returns the PageSecurity document

Throws:
PageNotFoundException - if the page cannot be found
NodeException
DocumentNotFoundException
UnsupportedDocumentTypeException
FolderNotFoundException

getFolder

public Folder getFolder(String folderPath)
                 throws FolderNotFoundException,
                        InvalidFolderException,
                        NodeException

getFolder

Locates a folder for the given path.

Parameters:
folderPath -
Returns:
Folder object represented by the folderPath or null if no such folder exists.
Throws:
DocumentException
FolderNotFoundException
NodeException
InvalidFolderException

updatePage

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

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

removePage

public void removePage(Page page)
                throws JetspeedException,
                       PageNotRemovedException
Remove a document.

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

updateFolder

public void updateFolder(Folder folder)
                  throws JetspeedException,
                         FolderNotUpdatedException
Update a folder in persistent storage

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

removeFolder

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

Throws:
JetspeedException
FolderNotRemovedException

updateLink

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

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

removeLink

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

Throws:
JetspeedException
LinkNotRemovedException

addListener

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

Parameters:
listener - page manager event listener

removeListener

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

Parameters:
listener - page manager event listener

clonePage

public Page clonePage(Page source,
                      String path)
               throws JetspeedException,
                      PageNotUpdatedException
Clone the source page creating and returning a new cloned 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 cloned
path - a PSML normalized path to the new page to be created
Returns:
a new Page object cloned from the source, with new fragment ids
Throws:
JetspeedException
PageNotUpdatedException


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