|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
org.apache.jetspeed.page.impl.DatabasePageManager
public class DatabasePageManager
DatabasePageManager
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 |
---|
public DatabasePageManager(java.lang.String repositoryPath, int cacheSize, int cacheExpiresSeconds, boolean isPermissionsSecurity, boolean isConstraintsSecurity)
Method Detail |
---|
public int getCacheSize()
public int getCacheExpiresSeconds()
public PageManager getPageManagerProxy()
public void setPageManagerProxy(PageManager proxy)
proxy
- proxied page manager interface used to
inject into Folder instances to provide
transaction/interceptionpublic boolean getConstraintsEnabled()
PageManager
getConstraintsEnabled
getConstraintsEnabled
in interface PageManager
public boolean getPermissionsEnabled()
PageManager
getPermissionsEnabled
getPermissionsEnabled
in interface PageManager
public Page newPage(java.lang.String path)
PageManager
newPage
in interface PageManager
public Folder newFolder(java.lang.String path)
PageManager
newFolder
in interface PageManager
public Link newLink(java.lang.String path)
PageManager
newLink
in interface PageManager
public PageSecurity newPageSecurity()
PageManager
newPageSecurity
in interface PageManager
public Fragment newFragment()
PageManager
newFragment
in interface PageManager
public Fragment newPortletFragment()
PageManager
newPortletFragment
in interface PageManager
public MenuDefinition newFolderMenuDefinition()
PageManager
newFolderMenuDefinition
in interface PageManager
public MenuExcludeDefinition newFolderMenuExcludeDefinition()
PageManager
newFolderMenuExcludeDefinition
in interface PageManager
public MenuIncludeDefinition newFolderMenuIncludeDefinition()
PageManager
newFolderMenuIncludeDefinition
in interface PageManager
public MenuOptionsDefinition newFolderMenuOptionsDefinition()
PageManager
newFolderMenuOptionsDefinition
in interface PageManager
public MenuSeparatorDefinition newFolderMenuSeparatorDefinition()
PageManager
newFolderMenuSeparatorDefinition
in interface PageManager
public MenuDefinition newPageMenuDefinition()
PageManager
newPageMenuDefinition
in interface PageManager
public MenuExcludeDefinition newPageMenuExcludeDefinition()
PageManager
newPageMenuExcludeDefinition
in interface PageManager
public MenuIncludeDefinition newPageMenuIncludeDefinition()
PageManager
newPageMenuIncludeDefinition
in interface PageManager
public MenuOptionsDefinition newPageMenuOptionsDefinition()
PageManager
newPageMenuOptionsDefinition
in interface PageManager
public MenuSeparatorDefinition newPageMenuSeparatorDefinition()
PageManager
newPageMenuSeparatorDefinition
in interface PageManager
public SecurityConstraints newSecurityConstraints()
PageManager
newSecurityConstraints
in interface PageManager
public SecurityConstraint newFolderSecurityConstraint()
PageManager
newFolderSecurityConstraint
in interface PageManager
public SecurityConstraint newPageSecurityConstraint()
PageManager
newPageSecurityConstraint
in interface PageManager
public SecurityConstraint newFragmentSecurityConstraint()
PageManager
newFragmentSecurityConstraint
in interface PageManager
public SecurityConstraint newLinkSecurityConstraint()
PageManager
newLinkSecurityConstraint
in interface PageManager
public SecurityConstraint newPageSecuritySecurityConstraint()
PageManager
newPageSecuritySecurityConstraint
in interface PageManager
public SecurityConstraintsDef newSecurityConstraintsDef()
PageManager
newSecurityConstraintsDef
in interface PageManager
public FragmentPreference newFragmentPreference()
PageManager
newFragmentPreference
in interface PageManager
public void addListener(PageManagerEventListener listener)
PageManager
addListener
in interface PageManager
listener
- page manager event listenerpublic void removeListener(PageManagerEventListener listener)
PageManager
removeListener
in interface PageManager
listener
- page manager event listenerpublic void reset()
PageManager
reset
in interface PageManager
public Page getPage(java.lang.String path) throws PageNotFoundException, NodeException
PageManager
getPage
Returns a Page based on its path
getPage
in interface PageManager
PageNotFoundException
- if the page cannot be found
NodeException
public ContentPage getContentPage(java.lang.String path) throws PageNotFoundException, NodeException
PageManager
ContentPage
Returns a PSML document suitable for use in content rendering, for the given key
getContentPage
in interface PageManager
PageNotFoundException
- if the page cannot be found
NodeException
ContentPage
,
Fragment
public Link getLink(java.lang.String path) throws DocumentNotFoundException, NodeException
PageManager
getLink
Returns a Link document for the given path
getLink
in interface PageManager
path
- The path of the document to be retrieved.
PageNotFoundException
- if the page cannot be found
NodeException
DocumentNotFoundException
public boolean checkConstraint(java.lang.String securityConstraintName, java.lang.String actions)
checkConstraint
in interface PageManager
securityConstraintName
- the name of the security constraint definitionactions
- one or more portlet actions (view,edit,help,..)
public PageSecurity getPageSecurity() throws DocumentNotFoundException, NodeException
PageManager
getPageSecurity
Returns the PageSecurity document
getPageSecurity
in interface PageManager
DocumentNotFoundException
- if the document cannot be found
UnsupportedDocumentTypeException
NodeException
public Folder getFolder(java.lang.String folderPath) throws FolderNotFoundException, InvalidFolderException, NodeException
PageManager
getFolder
Locates a folder for the given path.
getFolder
in interface PageManager
Folder
object represented by the folderPath
FolderNotFoundException
InvalidFolderException
NodeException
public NodeSet getFolders(Folder folder) throws DocumentException
PageManager
getFolders
Locates folders within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.
getFolders
in interface PageManager
folder
- The parent folder.
NodeSet
containing all sub-folders
directly under this folder.
DocumentException
org.apache.jetspeed.om.folder.Folder#getFolders(org.apache.jetspeed.om.folder.Folder)
public Folder getFolder(Folder folder, java.lang.String name) throws FolderNotFoundException, DocumentException
PageManager
getFolder
Locates folders within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.
getFolder
in interface PageManager
folder
- The parent folder.name
- The name of folder to retrieve.
FolderNotFoundException
DocumentException
org.apache.jetspeed.om.folder.Folder#getFolder(org.apache.jetspeed.om.folder.Folder,java.lang.String)
public NodeSet getPages(Folder folder) throws NodeException
PageManager
getPages
Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.
getPages
in interface PageManager
folder
- The parent folder.
NodeSet
of all the Pages referenced
by this Folder.
NodeException
org.apache.jetspeed.om.folder.Folder#getPages(org.apache.jetspeed.om.folder.Folder)
public Page getPage(Folder folder, java.lang.String name) throws PageNotFoundException, NodeException
PageManager
getPage
Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.
getPage
in interface PageManager
folder
- The parent folder.name
- The name of page to retrieve.
PageNotFoundException
- if the Page requested could not be found.
NodeException
org.apache.jetspeed.om.folder.Folder#getPage(org.apache.jetspeed.om.folder.Folder,java.lang.String)
public NodeSet getLinks(Folder folder) throws NodeException
PageManager
getLinks
getLinks
in interface PageManager
folder
- The parent folder.
NodeException
Locates documents within a specified parent folder.
Returned documents are filtered according to security
constraints and/or permissions.
public Link getLink(Folder folder, java.lang.String name) throws DocumentNotFoundException, NodeException
PageManager
getLink
Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.
getLink
in interface PageManager
folder
- The parent folder.name
- The name of page to retrieve.
DocumentNotFoundException
- if the document requested could not be found.
NodeException
org.apache.jetspeed.om.folder.Folder#getLink(org.apache.jetspeed.om.folder.Folder,java.lang.String)
public PageSecurity getPageSecurity(Folder folder) throws DocumentNotFoundException, NodeException
PageManager
getPageSecurity
Locates documents within a specified parent folder. Returned documents are filtered according to security constraints and/or permissions.
getPageSecurity
in interface PageManager
folder
- The parent folder.
DocumentNotFoundException
- if the document requested could not be found.
NodeException
org.apache.jetspeed.om.folder.Folder#getPageSecurity(org.apache.jetspeed.om.folder.Folder)
public NodeSet getAll(Folder folder) throws DocumentException
PageManager
getAll
Locates folders and documents within a specified parent folder. Returned folders and documents are filtered according to security constraints and/or permissions.
getAll
in interface PageManager
folder
- The parent folder.
NodeSet
containing all sub-folders
and documents directly under this folder.
DocumentException
org.apache.jetspeed.om.folder.Folder#getAll(org.apache.jetspeed.om.folder.Folder)
public void updatePage(Page page) throws NodeException, PageNotUpdatedException
PageManager
updatePage
in interface PageManager
page
- The page to be updated.
NodeException
PageNotUpdatedException
public void removePage(Page page) throws NodeException, PageNotRemovedException
PageManager
removePage
in interface PageManager
page
- The page to be removed.
NodeException
PageNotRemovedException
public void updateFolder(Folder folder) throws NodeException, FolderNotUpdatedException
PageManager
updateFolder
in interface PageManager
folder
- The folder to be updated.
NodeException
FolderNotUpdatedException
public void updateFolder(Folder folder, boolean deep) throws NodeException, FolderNotUpdatedException
PageManager
updateFolder
in interface PageManager
folder
- The folder to be updated.deep
- Flag to control recursive deep updates.
NodeException
FolderNotUpdatedException
public void removeFolder(Folder folder) throws NodeException, FolderNotRemovedException
PageManager
removeFolder
in interface PageManager
NodeException
FolderNotRemovedException
public void updateLink(Link link) throws NodeException, LinkNotUpdatedException
PageManager
updateLink
in interface PageManager
link
- The link to be updated.
NodeException
LinkNotUpdatedException
public void removeLink(Link link) throws NodeException, LinkNotRemovedException
PageManager
removeLink
in interface PageManager
link
- The link to be removed.
NodeException
LinkNotRemovedException
public void updatePageSecurity(PageSecurity pageSecurity) throws NodeException, FailedToUpdateDocumentException
PageManager
updatePageSecurity
in interface PageManager
pageSecurity
- The document to be updated.
NodeException
FailedToUpdateDocumentException
public void removePageSecurity(PageSecurity pageSecurity) throws NodeException, FailedToDeleteDocumentException
PageManager
removePageSecurity
in interface PageManager
pageSecurity
- The document to be removed.
NodeException
FailedToDeleteDocumentException
public Page copyPage(Page source, java.lang.String path) throws NodeException, PageNotUpdatedException
PageManager
copyPage
in interface PageManager
source
- The source Page object to be copiedpath
- a PSML normalized path to the new page to be created
NodeException
PageNotUpdatedException
public Link copyLink(Link source, java.lang.String path) throws NodeException, LinkNotUpdatedException
PageManager
copyLink
in interface PageManager
source
- The source Link object to be copiedpath
- a PSML normalized path to the new link to be created
NodeException
LinkNotUpdatedException
public Folder copyFolder(Folder source, java.lang.String path) throws NodeException, PageNotUpdatedException
PageManager
copyFolder
in interface PageManager
source
- The source Folder object to be copiedpath
- a PSML normalized path to the new folder to be created
NodeException
PageNotUpdatedException
public Fragment copyFragment(Fragment source, java.lang.String name) throws NodeException, PageNotUpdatedException
PageManager
copyFragment
in interface PageManager
source
- The source Fragment object to be copied
NodeException
PageNotUpdatedException
public PageSecurity copyPageSecurity(PageSecurity source) throws NodeException
PageManager
copyPageSecurity
in interface PageManager
source
- The source PageSecurity definitions
NodeException
public Page getUserPage(java.lang.String userName, java.lang.String pageName) throws PageNotFoundException, NodeException
PageManager
getUserPage
in interface PageManager
PageNotFoundException
NodeException
public Folder getUserFolder(java.lang.String userName) throws FolderNotFoundException, InvalidFolderException, NodeException
PageManager
getUserFolder
in interface PageManager
FolderNotFoundException
InvalidFolderException
NodeException
public boolean folderExists(java.lang.String folderName)
PageManager
folderExists
in interface PageManager
public boolean pageExists(java.lang.String pageName)
PageManager
pageExists
in interface PageManager
public boolean linkExists(java.lang.String linkName)
PageManager
linkExists
in interface PageManager
public boolean userFolderExists(java.lang.String userName)
PageManager
userFolderExists
in interface PageManager
public boolean userPageExists(java.lang.String userName, java.lang.String pageName)
PageManager
userPageExists
in interface PageManager
public void createUserHomePagesFromRoles(javax.security.auth.Subject subject) throws NodeException
PageManager
createUserHomePagesFromRoles
in interface PageManager
subject
- The full user Java Security subject.
NodeException
public void deepCopyFolder(Folder srcFolder, java.lang.String destinationPath, java.lang.String owner) throws NodeException, PageNotUpdatedException
PageManager
deepCopyFolder
in interface PageManager
owner
- set owner of the new folder(s), or null for no owner
NodeException
PageNotUpdatedException
public int addPages(Page[] pages) throws NodeException
addPages
in interface PageManager
NodeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |