Interface PageService
- All Known Implementing Classes:
- DefaultPageService
PageManager.- See Also:
- 
Method SummaryModifier and TypeMethodDescriptiongetIdPageLocator(long pageId) Creates a page locator that can locate a page based on an id.getPageVersionLocator(long pageId, int version) getTitleAndSpaceKeyPageLocator(String spaceKey, String title) Creates a page locator that can locate a page based on a space key and title.newConvertPageToBlogPostCommand(PageLocator pageLocator, SpaceLocator targetSpaceLocator) This converts a page into a blogpostnewCreatePageCommand(PageProvider provider, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user) Retrieve a command for creating a new page for the specified user.newCreatePageCommand(PageProvider provider, CreateContextProvider contextProvider, Draft draft, ConfluenceUser user) Retrieve a command for creating a new page for the specified user.newCreatePageCommand(PageProvider provider, CreateContextProvider contextProvider, Page draft, ConfluenceUser user) Retrieve a command for creating a new page for the specified user.newCreatePageCommandFromExisting(PageProvider provider, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page.newCreatePageCommandFromExisting(PageProvider provider, CreateContextProvider contextProvider, Page draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page.newCreatePageCommandFromExisting(PageProvider provider, ContentEntityObject draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page.newCreatePageCommandFromExisting(PageProvider provider, Draft draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page.newDeletePageCommand(PageLocator pageLocator) Retrieve a command to remove an existing pagenewMovePageCommand(PageLocator sourcePageLocator, PageLocator targetPageLocator, String position) Retrieve a command to perform a simple move operation.newMovePageCommand(PageLocator sourcePageLocator, SpaceLocator targetSpaceLocator) Retrieve a command that performs a move operation of a page to a top level of a target space.newRemovePageVersionCommand(PageLocator pageLocator) newRevertPageCommand(PageLocator pageToRevert, int version, String revertComment, boolean revertTitle) Retrieve a command to revert a pagenewRevertPageOrderCommand(PageLocator parentPageLocator) Retrieve a command to clear any existing positions for children of the located Page.newSetPageOrderCommand(PageLocator parentPageLocator, List<Long> childPageIds) Retrieve a command to set the order of all children for a supplied parent Page locator.
- 
Method Details- 
newMovePageCommandMovePageCommand newMovePageCommand(PageLocator sourcePageLocator, PageLocator targetPageLocator, String position) Retrieve a command to perform a simple move operation.- Parameters:
- position- the point describing where the source should be moved to in relation to the target, see- MovePageCommand
- Returns:
- an appropriate command instance
 
- 
newMovePageCommandRetrieve a command that performs a move operation of a page to a top level of a target space.
- 
getIdPageLocatorCreates a page locator that can locate a page based on an id.
- 
getTitleAndSpaceKeyPageLocatorCreates a page locator that can locate a page based on a space key and title.
- 
getPageVersionLocator- Parameters:
- pageId- the id of the original version of the page
- version- a historical version, where 1 refers to version 1.
- Returns:
- a page locator that will locate a historical version of a page.
 
- 
newSetPageOrderCommandRetrieve a command to set the order of all children for a supplied parent Page locator.- Parameters:
- parentPageLocator- locator for the parent Page object
- childPageIds- a list of child page ids
 
- 
newRevertPageOrderCommandRetrieve a command to clear any existing positions for children of the located Page.
- 
newDeletePageCommandRetrieve a command to remove an existing page
- 
newRemovePageVersionCommand- Parameters:
- pageLocator- a page locator that identifies either the historical version of a page directly (e.g.- IdPageLocator) or the page and a version (e.g.- IdAndVersionPageLocator).
- Returns:
- a command to remove a version of a page.
 
- 
newRevertPageCommandServiceCommand newRevertPageCommand(PageLocator pageToRevert, int version, String revertComment, boolean revertTitle) Retrieve a command to revert a page
- 
newCreatePageCommandServiceCommand newCreatePageCommand(PageProvider provider, CreateContextProvider contextProvider, Page draft, ConfluenceUser user) Retrieve a command for creating a new page for the specified user.- Parameters:
- provider- an object that will provide the page to be created.
- contextProvider- an object that can provide a context to be included when publishing the page creation event
- user- the user creating this page
- Returns:
- a CreatePageCommand for creating the specified page.
- Since:
- 10.0
 
- 
newCreatePageCommandServiceCommand newCreatePageCommand(PageProvider provider, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user) Retrieve a command for creating a new page for the specified user.- Parameters:
- provider- an object that will provide the page to be created.
- contextProvider- an object that can provide a context to be included when publishing the page creation event
- user- the user creating this page
- Returns:
- a CreatePageCommand for creating the specified page.
- Since:
- 10.0
 
- 
newCreatePageCommandServiceCommand newCreatePageCommand(PageProvider provider, CreateContextProvider contextProvider, Draft draft, ConfluenceUser user) Retrieve a command for creating a new page for the specified user.- Parameters:
- provider- an object that will provide the page to be created.
- contextProvider- an object that can provide a context to be included when publishing the page creation event
- user- the user creating this page
- Returns:
- a CreatePageCommand for creating the specified page.
- Since:
- 10.0
 
- 
newCreatePageCommandFromExisting@Internal ServiceCommand newCreatePageCommandFromExisting(PageProvider provider, Draft draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page. This method allows creation of a command that implements that difference in logic. Apart from that the command created here will have the same logic as that created by newCreatePageCommand(PageProvider, CreateContextProvider, Draft, ConfluenceUser).This logic in this command originates from CopyPageActionwhich differs from that ofCreatePageAction.I hope that when we get a chance to analyse why CopyPageActionhas different permission and validation logic we will eventually remove this method.- Parameters:
- provider- an object that will provide the page to be created.
- draft- the draft associated with the copy, if present.
- user- the user creating this page
- spaceProvider- provide the space where page will be created.
- Since:
- 10.0
 
- 
newCreatePageCommandFromExisting@Internal ServiceCommand newCreatePageCommandFromExisting(PageProvider provider, ContentEntityObject draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page. This method allows creation of a command that implements that difference in logic. Apart from that the command created here will have the same logic as that created by newCreatePageCommand(PageProvider, CreateContextProvider, Draft, ConfluenceUser).This logic in this command originates from CopyPageActionwhich differs from that ofCreatePageAction.I hope that when we get a chance to analyse why CopyPageActionhas different permission and validation logic we will eventually remove this method.- Parameters:
- provider- an object that will provide the page to be created.
- draft- the draft associated with the copy, if present.
- user- the user creating this page
- spaceProvider- provide the space where page will be created.
- Since:
- 10.0
 
- 
newCreatePageCommandFromExisting@Internal ServiceCommand newCreatePageCommandFromExisting(PageProvider provider, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page. This method allows creation of a command that implements that difference in logic. Apart from that the command created here will have the same logic as that created by newCreatePageCommand(PageProvider, CreateContextProvider, Draft, ConfluenceUser).This logic in this command originates from CopyPageActionwhich differs from that ofCreatePageAction.I hope that when we get a chance to analyse why CopyPageActionhas different permission and validation logic we will eventually remove this method.- Parameters:
- provider- an object that will provide the page to be created.
- contextProvider- an object that provides context for the new page creation
- draft- the draft associated with the copy, if present.
- user- the user creating this page
- spaceProvider- provide the space where page will be created.
- Since:
- 10.0
 
- 
newCreatePageCommandFromExisting@Internal ServiceCommand newCreatePageCommandFromExisting(PageProvider provider, CreateContextProvider contextProvider, Page draft, ConfluenceUser user, SpaceProvider spaceProvider) This is not a public API method! Creating a page from an existing page has different authorisation and validation logic from creating a brand new page. This method allows creation of a command that implements that difference in logic. Apart from that the command created here will have the same logic as that created by newCreatePageCommand(PageProvider, CreateContextProvider, Draft, ConfluenceUser).This logic in this command originates from CopyPageActionwhich differs from that ofCreatePageAction.I hope that when we get a chance to analyse why CopyPageActionhas different permission and validation logic we will eventually remove this method.- Parameters:
- provider- an object that will provide the page to be created.
- contextProvider- an object that provides context for the new page creation
- draft- the draft associated with the copy, if present.
- user- the user creating this page
- spaceProvider- provide the space where page will be created.
- Since:
- 10.0
 
- 
newConvertPageToBlogPostCommandServiceCommand newConvertPageToBlogPostCommand(PageLocator pageLocator, SpaceLocator targetSpaceLocator) This converts a page into a blogpost - Parameters:
- pageLocator- Page locator for the page to be converted
- targetSpaceLocator- Space locator for the destination space
 
 
-