public interface PageManager
Modifier and Type | Interface and Description |
---|---|
static class |
PageManager.CopyOptions
Options object used for
copy(CopyOptions) . |
Modifier and Type | Method and Description |
---|---|
Resource |
copy(PageManager.CopyOptions options)
Copies the given page to the new destination.
|
Page |
copy(Page page,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict)
Copies the given page to the new destination and automatically saves the modifications
|
Page |
copy(Page page,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict,
boolean autoSave)
Copies the given page to the new destination
|
Resource |
copy(Resource resource,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict)
Copies the given resource to the new destination and automatically saves the modifications
|
Resource |
copy(Resource resource,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict,
boolean autoSave)
Copies the given resource to the new destination
|
Page |
create(java.lang.String parentPath,
java.lang.String pageName,
java.lang.String template,
java.lang.String title)
Creates a new page at the given path using the provided template as
content template.
|
Page |
create(java.lang.String parentPath,
java.lang.String pageName,
java.lang.String template,
java.lang.String title,
boolean autoSave)
Creates a new page at the given path using the provided template as
content template.
|
Revision |
createRevision(Page page)
Create a revision of some page.
|
Revision |
createRevision(Page page,
java.lang.String label,
java.lang.String comment)
Create a revision of some page.
|
void |
delete(Page page,
boolean shallow)
Deletes the page and saves the change.
|
void |
delete(Page page,
boolean shallow,
boolean autoSave)
Deletes the page.
|
void |
delete(Resource resource,
boolean shallow)
Deletes the resource and saves the change.
|
void |
delete(Resource resource,
boolean shallow,
boolean autoSave)
Deletes the resource.
|
void |
delete(Resource resource,
boolean shallow,
boolean autoSave,
boolean archive)
Deletes the resource.
|
java.util.Collection<Blueprint> |
getBlueprints(java.lang.String parentPath)
Deprecated.
since 5.4 use
com.day.cq.wcm.msm.api.BlueprintManager#getBlueprints() |
java.util.Collection<Revision> |
getChildRevisions(java.lang.String parentPath,
java.util.Calendar cal)
Return all revisions of child pages below the indicated path.
|
java.util.Collection<Revision> |
getChildRevisions(java.lang.String parentPath,
java.util.Calendar cal,
boolean includeNoLocal)
Return all revisions of child pages below the indicated path.
|
java.util.Collection<Revision> |
getChildRevisions(java.lang.String parentPath,
java.lang.String treeRoot,
java.util.Calendar cal)
Return all revisions of child pages below the indicated path.
|
Page |
getContainingPage(Resource resource)
Returns the page that contains this resource.
|
Page |
getContainingPage(java.lang.String path)
Returns the page that contains the resource at the given path.
|
Page |
getPage(java.lang.String path)
Convenience method that returns the page at the given path.
|
java.util.Collection<Revision> |
getRevisions(java.lang.String path,
java.util.Calendar cal)
Return all revisions of the page at the indicated path.
|
java.util.Collection<Revision> |
getRevisions(java.lang.String path,
java.util.Calendar cal,
boolean includeNoLocal)
Return all revisions of the page at the indicated path.
|
Template |
getTemplate(java.lang.String templatePath)
Deprecated.
Use
TemplateManager.getTemplate(String) instead. |
java.util.Collection<Template> |
getTemplates(java.lang.String parentPath)
Deprecated.
|
Page |
move(Page page,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict,
java.lang.String[] adjustRefs)
Moves the given page to the new destination and automatically saves the changes.
|
Page |
move(Page page,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict,
java.lang.String[] adjustRefs,
java.lang.String[] publishRefs)
Moves the given page to the new destination and automatically saves the changes.
|
Resource |
move(Resource resource,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict,
java.lang.String[] adjustRefs)
Moves the given resource to the new destination and automatically saves the changes.
|
Resource |
move(Resource resource,
java.lang.String destination,
java.lang.String beforeName,
boolean shallow,
boolean resolveConflict,
java.lang.String[] adjustRefs,
java.lang.String[] publishRefs)
Moves the given resource to the new destination and automatically saves the changes.
|
void |
order(Page page,
java.lang.String beforeName)
Orders the given page before the one with the name specified by
beforeName if it's null the page is ordered at
the end of its siblings. |
void |
order(Page page,
java.lang.String beforeName,
boolean autoSave)
Orders the given page before the one with the name specified by
beforeName if it's null the page is ordered at
the end of its siblings. |
void |
order(Resource resource,
java.lang.String beforeName)
Orders the given resource before the one with the name specified by
beforeName if it's null the resource is ordered
at the end of its siblings. |
void |
order(Resource resource,
java.lang.String beforeName,
boolean autoSave)
Orders the given resource before the one with the name specified by
beforeName if it's null the resource is ordered
at the end of its siblings. |
Page |
restore(java.lang.String path,
java.lang.String revisionId)
Restore a revision of a page.
|
Page |
restoreTree(java.lang.String path,
java.util.Calendar date)
Restore a tree.
|
Page |
restoreTree(java.lang.String path,
java.util.Calendar date,
boolean preserveNV)
Restore a tree.
|
void |
touch(Node page,
boolean shallow,
java.util.Calendar now,
boolean clearRepl)
Touches the given page by setting the last modified date and user and
clears the replication status.
|
Page getPage(java.lang.String path)
null
is returned.path
- path of the pagenull
Page getContainingPage(Resource resource)
resource
- resource to find the page fornull
if not found.Page getContainingPage(java.lang.String path)
path
- path to find the page fornull
if not found.Page create(java.lang.String parentPath, java.lang.String pageName, java.lang.String template, java.lang.String title) throws WCMException
parentPath
- the path of the parent pagepageName
- the name of the new pagetemplate
- the template for the new pagetitle
- the title of the new pageWCMException
- if an error during this operation occurs.Page create(java.lang.String parentPath, java.lang.String pageName, java.lang.String template, java.lang.String title, boolean autoSave) throws WCMException
parentPath
- the path of the parent pagepageName
- the name of the new pagetemplate
- the template for the new pagetitle
- the title of the new pageautoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.Page move(Page page, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict, java.lang.String[] adjustRefs) throws WCMException
page
- the page to movedestination
- the path of the new destinationbeforeName
- the name of the next page. if null
the page
is ordered at the end.shallow
- if true
only the page content is movedresolveConflict
- if true
resolves name conflict if
destination already exists.adjustRefs
- list of paths to pages that refer to the moved one.
those references will be adjusted.WCMException
- if an error during this operation occurs.Page move(Page page, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict, java.lang.String[] adjustRefs, java.lang.String[] publishRefs) throws WCMException
page
- the page to movedestination
- the path of the new destinationbeforeName
- the name of the next page. if null
the page
is ordered at the end.shallow
- if true
only the page content is movedresolveConflict
- if true
resolves name conflict if
destination already exists.adjustRefs
- list of paths to pages that refer to the moved one.
those references will be adjusted.publishRefs
- list of referencing paths that will be republished.WCMException
- if an error during this operation occurs.Resource move(Resource resource, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict, java.lang.String[] adjustRefs) throws WCMException
resource
- the resource to movedestination
- the path of the new destinationbeforeName
- the name of the next resource. if null
the resource
is ordered at the end.shallow
- if true
only the resource content is moved.
this is currently only supported for pages.resolveConflict
- if true
resolves name conflict if
destination already exists.adjustRefs
- list of paths to pages that refer to the moved one.
those references will be adjusted.WCMException
- if an error during this operation occurs.Resource move(Resource resource, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict, java.lang.String[] adjustRefs, java.lang.String[] publishRefs) throws WCMException
resource
- the resource to movedestination
- the path of the new destinationbeforeName
- the name of the next resource. if null
the resource
is ordered at the end.shallow
- if true
only the resource content is moved.
this is currently only supported for pages.resolveConflict
- if true
resolves name conflict if
destination already exists.adjustRefs
- list of paths to pages that refer to the moved one.
those references will be adjusted.publishRefs
- list of referencing paths that will be republished.WCMException
- if an error during this operation occurs.Resource copy(PageManager.CopyOptions options) throws WCMException
options
- the options for this copy operation. page
or resource
are required
defined, as well as destination
.WCMException
- if an error during this operation occurs.Page copy(Page page, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict) throws WCMException
page
- the page to copydestination
- the destinationbeforeName
- the name of the next page. if null
the page
is ordered at the end.shallow
- if true
a non-recursive copy is performed.resolveConflict
- if true
resolves name conflict if
destination already exists.WCMException
- if an error during this operation occurs.Page copy(Page page, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict, boolean autoSave) throws WCMException
page
- the page to copydestination
- the destinationbeforeName
- the name of the next page. if null
the page
is ordered at the end.shallow
- if true
a non-recursive copy is performed.resolveConflict
- if true
resolves name conflict if
destination already exists.autoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.Resource copy(Resource resource, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict) throws WCMException
resource
- the resource to copydestination
- the destinationbeforeName
- the name of the next resource. if null
the
resource is ordered at the end.shallow
- if true
a non-recursive copy is performed.
this is currently only supported for pages.resolveConflict
- if true
resolves name conflict if
destination already exists.WCMException
- if an error during this operation occurs.Resource copy(Resource resource, java.lang.String destination, java.lang.String beforeName, boolean shallow, boolean resolveConflict, boolean autoSave) throws WCMException
resource
- the resource to copydestination
- the destinationbeforeName
- the name of the next resource. if null
the
resource is ordered at the end.shallow
- if true
a non-recursive copy is performed.
this is currently only supported for pages.resolveConflict
- if true
resolves name conflict if
destination already exists.autoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.void delete(Page page, boolean shallow) throws WCMException
page
- the page to deleteshallow
- if true
only the content of the page is deleted
but not it's child pagesWCMException
- if an error during this operation occurs.void delete(Page page, boolean shallow, boolean autoSave) throws WCMException
page
- the page to deleteshallow
- if true
only the content of the page is deleted
but not it's child pagesautoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.void delete(Resource resource, boolean shallow) throws WCMException
resource
- the resource to deleteshallow
- if true
only the content of the resource is deleted
but not it's child resources. only supported for pages.WCMException
- if an error during this operation occurs.void delete(Resource resource, boolean shallow, boolean autoSave) throws WCMException
resource
- the resource to deleteshallow
- if true
only the content of the resource is deleted
but not it's child resources. only supported for pages.autoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.void delete(Resource resource, boolean shallow, boolean autoSave, boolean archive) throws WCMException
resource
- the resource to deleteshallow
- if true
only the content of the resource is deleted
but not it's child resources. only supported for pages.autoSave
- if true
saves the modifications.archive
- if true
saves the version for deleted resource.WCMException
- if an error during this operation occurs.void order(Page page, java.lang.String beforeName) throws WCMException
beforeName
if it's null
the page is ordered at
the end of its siblings. Changes are automatically saved.page
- the page to orderbeforeName
- the name of the next pageWCMException
- if an error during this operation occurs.void order(Page page, java.lang.String beforeName, boolean autoSave) throws WCMException
beforeName
if it's null
the page is ordered at
the end of its siblings.page
- the page to orderbeforeName
- the name of the next pageautoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.void order(Resource resource, java.lang.String beforeName) throws WCMException
beforeName
if it's null
the resource is ordered
at the end of its siblings. Changes are automatically saved.resource
- the resource to orderbeforeName
- the name of the next resourceWCMException
- if an error during this operation occurs.void order(Resource resource, java.lang.String beforeName, boolean autoSave) throws WCMException
beforeName
if it's null
the resource is ordered
at the end of its siblings.resource
- the resource to orderbeforeName
- the name of the next resourceautoSave
- if true
saves the modifications.WCMException
- if an error during this operation occurs.Template getTemplate(java.lang.String templatePath)
TemplateManager.getTemplate(String)
instead.null
if the template doesn't exist or
the current user does not have read access on the template resource identified by the given path.
This is the case on publish instances using default ACL configuration (anonymous cannot read templates).templatePath
- the name of the templatejava.util.Collection<Template> getTemplates(java.lang.String parentPath)
TemplateManager.getAllTemplates()
or
TemplateManager.getTemplates(org.apache.commons.collections.Predicate)
insteadnull
only those templates are returned that are
allowed to be used as page templates below that path.parentPath
- path of the parent page or null
Template.isAllowed(String)
@Deprecated java.util.Collection<Blueprint> getBlueprints(java.lang.String parentPath)
com.day.cq.wcm.msm.api.BlueprintManager#getBlueprints()
null
only those templates are returned that are
allowed to be used as page templates below that path.parentPath
- path of the parent page or null
Template.isAllowed(String)
Revision createRevision(Page page) throws WCMException
page
- the page to create a revision fornull
if no revision was createdWCMException
- if an error during this operation occurs.Revision createRevision(Page page, java.lang.String label, java.lang.String comment) throws WCMException
page
- the page to create a revision forlabel
- the optional label for the revision. Note that the version label must be unique across all versions.comment
- the optional comment for the revisionnull
if no revision was createdWCMException
- if an error during this operation occurs.java.util.Collection<Revision> getRevisions(java.lang.String path, java.util.Calendar cal) throws WCMException
path
- the path to return revisions forcal
- optional calendar value; if not null
, return
the revision of a page that has the latest creation date
below or equal to this valueWCMException
- if an error during this operation occurs.java.util.Collection<Revision> getRevisions(java.lang.String path, java.util.Calendar cal, boolean includeNoLocal) throws WCMException
includeNoLocal
is true,
revisions that have a prent path not matching the parent of the indicated page are included as well.path
- the path to return revisions forcal
- optional calendar value; if not null
, return the revision of a page that has the latest
creation date below or equal to this valueincludeNoLocal
- if true
revisions that have a prent path not matching the parent of the
indicated page are included as wellWCMException
- if an error during this operation occurs.java.util.Collection<Revision> getChildRevisions(java.lang.String parentPath, java.util.Calendar cal) throws WCMException
parentPath
- the path of the parent pagecal
- optional calendar value; if not null
, return the revision of a page that has the latest
creation date below or equal to this valueWCMException
- if an error during this operation occurs.java.util.Collection<Revision> getChildRevisions(java.lang.String parentPath, java.util.Calendar cal, boolean includeNoLocal) throws WCMException
includeNoLocal
is true, also those revisions are included that where not versioned below the
indicated parent path.parentPath
- the path of the parent pagecal
- optional calendar value; if not null
, return the revision of a page that has the latest
creation date below or equal to this valueincludeNoLocal
- if true
revisions that have a prent path not matching the parent of the
indicated page are included as wellWCMException
- if an error during this operation occurs.java.util.Collection<Revision> getChildRevisions(java.lang.String parentPath, java.lang.String treeRoot, java.util.Calendar cal) throws WCMException
cal
all revisions below the specified treeRoot
are respected. But only those revisions
are returned that match the given parentPath
parentPath
- the path of the parent pagecal
- optional calendar value; if not null
, return the revision of a page that has the latest
creation date below or equal to this valuetreeRoot
- root of the treeWCMException
- if an error during this operation occurs.Page restore(java.lang.String path, java.lang.String revisionId) throws WCMException
path
either addresses that page or its parent page, otherwise
a WCMException is thrown.
If the page does not exist then the a new page is created underneath the specified path
and its content is restored accordingly. If there already exists a page with the same name as
the one recorded in the version then a non-colliding name is generated.path
- path to the page or to the parent pagerevisionId
- revision id to restoreWCMException
- if an error during this operation occurs.Page restoreTree(java.lang.String path, java.util.Calendar date) throws WCMException
path
- path to pagedate
- calendar date to restore toWCMException
- if an error during this operation occurs.Page restoreTree(java.lang.String path, java.util.Calendar date, boolean preserveNV) throws WCMException
path
- path to pagedate
- calendar date to restore topreserveNV
- if true
non versionable nodes are preservedWCMException
- if an error during this operation occurs.void touch(Node page, boolean shallow, java.util.Calendar now, boolean clearRepl) throws WCMException
now
is null
the last modified status is not changed. if clearRepl
is
false
the replication status is not changed.page
- the page to touchshallow
- if true
not recursionnow
- current dateclearRepl
- flag indicates if replication status is to be clearedWCMException
- if an error occurs"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"