|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PageManager
The page manager provides methods for page level operations.
| Method Summary | |
|---|---|
Page |
copy(Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict)
Copies the given page to the new destination |
org.apache.sling.api.resource.Resource |
copy(org.apache.sling.api.resource.Resource resource,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict)
Copies the given resource to the new destination |
Page |
create(String parentPath,
String pageName,
String template,
String title)
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. |
void |
delete(Page page,
boolean shallow)
Deletes the page |
void |
delete(org.apache.sling.api.resource.Resource resource,
boolean shallow)
Deletes the resource |
Collection<Revision> |
getChildRevisions(String parentPath,
Calendar cal)
Return all child revisions of some page. |
Page |
getContainingPage(org.apache.sling.api.resource.Resource resource)
Returns the page that contains this resource. |
Page |
getPage(String path)
Convenience method that returns the page at the given path. |
Collection<Revision> |
getRevisions(String path,
Calendar cal)
Return all revisions of some page. |
Template |
getTemplate(String templatePath)
Returns the template with the given name |
Collection<Template> |
getTemplates(String parentPath)
Returns a collection of all available templates. |
Page |
move(Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
String[] adjustRefs)
Moves the given page to the new destination. |
org.apache.sling.api.resource.Resource |
move(org.apache.sling.api.resource.Resource resource,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
String[] adjustRefs)
Moves the given resource to the new destination. |
void |
order(Page page,
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(org.apache.sling.api.resource.Resource resource,
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. |
Page |
restore(String path,
String revisionId)
Restore a revision of some page. |
Page |
restoreTree(String path,
Calendar date)
Restore a tree. |
| Method Detail |
|---|
Page getPage(String path)
null is returned.
path - path of the page
nullPage getContainingPage(org.apache.sling.api.resource.Resource resource)
resource - resource to find the page for
null if not found.
Page create(String parentPath,
String pageName,
String template,
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 page
WCMException - if an error during this operation occurs.
Page move(Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
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.
org.apache.sling.api.resource.Resource move(org.apache.sling.api.resource.Resource resource,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
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.
Page copy(Page page,
String destination,
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.
org.apache.sling.api.resource.Resource copy(org.apache.sling.api.resource.Resource resource,
String destination,
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.
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 pages
WCMException - if an error during this operation occurs.
void delete(org.apache.sling.api.resource.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 order(Page page,
String beforeName)
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 page
WCMException - if an error during this operation occurs.
void order(org.apache.sling.api.resource.Resource resource,
String beforeName)
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 resource
WCMException - if an error during this operation occurs.Template getTemplate(String templatePath)
templatePath - the name of the template
Collection<Template> getTemplates(String parentPath)
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 for
nullThrows:
WCMException - if an error during this operation occurs.
Collection<Revision> getRevisions(String path,
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 value
WCMException - if an error during this operation occurs.
Collection<Revision> getChildRevisions(String parentPath,
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 value
WCMException - if an error during this operation occurs.
Page restore(String path,
String revisionId)
throws WCMException
path - path to the page or to the parent pagerevisionId - revision id to restore
WCMException - if an error during this operation occurs.
Page restoreTree(String path,
Calendar date)
throws WCMException
path - path to pagedate - calendar date to restore to
WCMException - if an error during this operation occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||