|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PageManagementService
This class offers APIs to create, move and delete pages and page sections.
| Method Summary | |
|---|---|
boolean |
addLeadText(PageModel pageModel)
Adds a lead text to the given PageModel object. |
boolean |
addLeadText(PageVersion pageVersion)
Adds a lead text to this page version. |
boolean |
addRedirect(PageVersion pageVersion)
Adds a redirect to this page version. |
Page |
copyBlock(Page block,
Page targetParentBlock)
Copies a block and assigns the copy under the given target block. |
Page |
copyBlock(PageVersion blockVersion,
Page targetParentBlock)
Copies a block and assigns the copy under the given target block. |
Page |
copyPage(Page page,
Page targetParentPage)
Copies a page and assigns the copy under the given target page. |
Page |
copyPage(Page page,
Page targetPage,
boolean recursive)
Copies the page including subpages to the targetpage. |
Page |
copyPage(PageVersion pageVersion,
Page targetParentPage)
Copies a page and assigns the copy under the given target page. |
PageModel |
copyPageModel(PageModel pageModel)
Not implemented yet. |
PageVersion |
copyPageVersion(PageVersion pageVersion)
Copies a page version. |
PageVersion |
copyPageVersion(PageVersion pageVersion,
Language language)
Copies a page version for the specified language. |
Page |
createAndInsertDatabasePage(Page page,
DatabaseEntity databaseEntity)
Creates a new database page below the given page as last page. |
Page |
createAndInsertPage(Page page)
Creates a new subpage below the given page as last page. |
Page |
createAndInsertPage(Page page,
int position)
Creates a new subpage at the given position into the given page. |
Page |
createAndInsertPageFromPageModel(Page page,
PageModel pageModel)
Create and insert a new page based on a page model below the given page. |
Page |
createAndInsertPageFromPageModel(Page page,
PageModel pageModel,
int position)
Create and insert a new page based on a page model below the given page at the given position. |
Page |
createAndInsertPageSection(Page page)
Creates a new page section below the given page section as last page section. |
Page |
createAndInsertPageSectionFromPageModel(Page page,
PageModel pageModel)
Create and insert a new page section based on a page model below the given page section. |
Page |
createOrphanPage(Page page)
Creates a new orphan page (page without a parent). |
PageModel |
createPageModel(Website website)
Creates a new page model. |
PageVersion |
createPageVersion(Page page,
Language language)
Creates a new empty version of the specified page. |
PageVersion |
createPageVersion(PageVersion pageVersion,
Language language)
Creates a new version based on the specified page version. |
boolean |
deletePage(Page page,
boolean recursive)
Deletes a page completely, including all its subpages if recursive is true. |
boolean |
deletePageModel(PageModel pageModel)
Deletes an existing page model. |
boolean |
deletePageVersion(PageVersion pageVersion,
boolean recursive)
Deletes a page version, including all its subpages if it is the last version of the page and recursive is true. |
boolean |
movePage(Page page,
Page toPage)
Moves a page to another parent page as last page below that parent page. |
boolean |
movePage(Page page,
Page toPage,
int position)
Moves a page to another location. |
boolean |
moveToOrphanPages(Page page)
Moves the page to the orphanage (orphanage contains all pages without a parent). |
void |
performPostUpdateActions(PageVersion pageVersion)
Tells WebManager a page version has been updated. |
void |
performWorkflowAction(PageVersion pageVersion,
WorkflowAction workflowAction)
Performs the given workflowAction to progress this pageVersion to the next state. |
boolean |
reorderElements(PageModel pageModel,
Element[] elements)
Reorders all the elements of a page model. |
boolean |
reorderElements(PageVersion pageVersion,
Element[] elements)
Reorders all the elements of a page version. |
| Method Detail |
|---|
Page createAndInsertPage(Page page)
page - Page to add the subpage to. May not be null.
null if the page could not be created.
Page createAndInsertPage(Page page,
int position)
page - Page to add the subpage toposition - Position at which the page should be inserted, -1 will add the page as last page below
the parent page, -2 will add the page as orphan page.
null if the page could not be created.Page createOrphanPage(Page page)
page - Page which will be used to base the new page on (for Workflow model and basic
configuration). May not be null.
null if the page could not be created.
PageVersion createPageVersion(Page page,
Language language)
page - Page to create the new page version forlanguage - Language to create the new version in. Specify null to create a new page version in the
current editing language.
PageVersion createPageVersion(PageVersion pageVersion,
Language language)
pageVersion - Page version to create the new page version fromlanguage - Language to create the new version in. Specify null to create a new page version in the
current editing language.
Page createAndInsertPageSection(Page page)
page - Page section to add the sub page section to. May not be null.
null if the page section could not be created.
Page createAndInsertDatabasePage(Page page,
DatabaseEntity databaseEntity)
page - Page to add the sub database page to. May not be null.databaseEntity - Database page type to create the database page from
null if the database page could not be created.
Page createAndInsertPageFromPageModel(Page page,
PageModel pageModel)
page - Page to add the sub page to. May not be null.pageModel - Page model on which the new page is based
null if the page could not be created.
Page createAndInsertPageFromPageModel(Page page,
PageModel pageModel,
int position)
page - Page to add the sub page to. May not be null.pageModel - Page model on which the new page is basedposition - Position at which the database page should be inserted, -1 will add the database page
as last page below the parent page.
null if the page could not be created.
Page createAndInsertPageSectionFromPageModel(Page page,
PageModel pageModel)
page - Page section to add the sub page section to. May not be null.pageModel - Page model on which the new page section is based
null if the page section could not be created.PageModel createPageModel(Website website)
website - Website to create the page model for
DuplicateNameException
HtmlObjectNotFoundException
Page copyPage(Page page,
Page targetParentPage)
throws NoAuthorizationException
If the parentTarget parameter is null then the copy will be assigned to the
same parent as the source page, or if the source page has no parent the copy will be moved to the
orphan pages pool.
Regarding authorization an user needs both CREATE and UPDATE permissions on pages, CREATE permission on page versions, and CREATE permissions on all the page version's elements.
For example, to copy the home page and its most current version as an orphan page:
copyPage(homePage, homePage.getCurrent(), null).
Steps performed:
Event.Type.PRE page event of type EntityEvent.COPY is firedEvent.Type.POST page event of type EntityEvent.CREATE is firedEvent.Type.POST page event of type EntityEvent.COPY is fired
page - The page to copy. May not be null.targetParentPage - The copy will be assigned under this page.
NoAuthorizationException - If user has no rights to copy the page.
Page copyPage(PageVersion pageVersion,
Page targetParentPage)
throws NoAuthorizationException
pageVersion - The pageVersion which page to copy. May not be null.targetParentPage - The copy will be assigned under this page.
NoAuthorizationException - If user has no rights to copy the page.
Page copyBlock(Page block,
Page targetParentBlock)
throws NoAuthorizationException
copyPage(Page, Page).
block - The block to copy. May not be null.targetParentBlock - The copy will be assigned under this block.
NoAuthorizationException - If user has no rights to copy the block.
Page copyBlock(PageVersion blockVersion,
Page targetParentBlock)
throws NoAuthorizationException
copyPage(PageVersion, Page).
blockVersion - The block version for which its block to copy. May not be null.targetParentBlock - The copy will be assigned under this block.
NoAuthorizationException - If user has no rights to copy the block.
PageVersion copyPageVersion(PageVersion pageVersion)
throws NoAuthorizationException
pageVersion - The page version to copy. May not be null.
NoAuthorizationException - If user has no rights to copy the page version.
PageVersion copyPageVersion(PageVersion pageVersion,
Language language)
throws NoAuthorizationException
language parameter is null the copy exists for the same language as the
source page version.
pageVersion - The page version to copy. May not be null.language - The copy will be created for this language.
NoAuthorizationException - If user has no rights to copy the page version.
PageModel copyPageModel(PageModel pageModel)
throws NoAuthorizationException
pageModel - Not implemented yet.
NoAuthorizationException - If user has no rights to copy the page model.
Page copyPage(Page page,
Page targetPage,
boolean recursive)
throws NoAuthorizationException
page - Page that will be copied, the root of the branch.targetPage - Page under which the duplicated branch will be inserted.recursive - Whether the complete subtree of pages should be copied also, or not.
NoAuthorizationException - If user has no rights to copy one of the pages.
boolean movePage(Page page,
Page toPage)
page - Page that will be moved.toPage - Page under which the source page will be inserted.
true if the move succeeded, false otherwiseboolean moveToOrphanPages(Page page)
page - Page to move
true if the move succeeded, false otherwise
boolean movePage(Page page,
Page toPage,
int position)
page - Page that will be movedtoPage - Page under which the source page will be insertedposition - New position at which the page should be moved into
true if the move succeeded, false otherwise
boolean deletePage(Page page,
boolean recursive)
true.
page - Page to deleterecursive - if true then all pages below this page are also deleted, if
false only the page itself is deleted and all its first level subpages are
moved to the orphan pages remaining the lower level structure
true if the delete succeeded, false otherwise
boolean deletePageVersion(PageVersion pageVersion,
boolean recursive)
true.
pageVersion - PageVersion to delete. If this is the only version of the page, the page itself will
also be deleted.recursive - Only applicable if this is the last version of the page. If true then all
pages below this page are also deleted, if false only the page itself is
deleted and all its first level subpages are moved to the orphan pages remaining the lower
level structure
true if the delete succeeded, false otherwiseboolean deletePageModel(PageModel pageModel)
pageModel - Page model to delete
true if the delete succeeded, false otherwiseboolean addLeadText(PageVersion pageVersion)
pageVersion - Page version to add the lead text to
true if adding the lead text succeeded, false otherwiseboolean addLeadText(PageModel pageModel)
PageModel object.
pageModel - PageModel object to add the lead text to.
true if adding the lead text succeeded, false otherwise.boolean addRedirect(PageVersion pageVersion)
pageVersion - Page version to add the redirect to
true if adding the redirect succeeded, false otherwise
boolean reorderElements(PageVersion pageVersion,
Element[] elements)
Before the reordering is applied to the given page version the original elements are checked with the new ordering to determine whether the elements are really reordered. If a reordering is needed then:
Event.Type.POST page version event of type EntityEvent.UPDATE is firedEvent.Type.POST page event of type EntityEvent.UPDATE is fired
pageVersion - The page version which elements should be reordered.elements - Elements that defines the new ordering of the page version's elements.
The size of the elements array should match the number of the page version's elements
true if reorder is successful, false otherwise.#reorderElements(PageModel, Element[])}
boolean reorderElements(PageModel pageModel,
Element[] elements)
pageModel - The page model which elements should be reordered.elements - Elements that defines the new ordering of the page model's elements.
The size of the elements array should match the number of the page version's elements
true if reorder is successful, false otherwise.#reorderElements(PageVersion, Element[])}
void performWorkflowAction(PageVersion pageVersion,
WorkflowAction workflowAction)
throws UnExecutableWorkflowActionException
pageVersion - the pageVersionworkflowAction - the workflowAction
UnExecutableWorkflowActionException - If the given workflow action is invalid.void performPostUpdateActions(PageVersion pageVersion)
Currently the SEO service (Search Engine Optimization) is instructed to update the page version's friendly URL if necessary.
pageVersion - The page version that has been updated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||