com.atlassian.confluence.content.service
Class DefaultPageService

java.lang.Object
  extended by com.atlassian.confluence.content.service.DefaultPageService
All Implemented Interfaces:
PageService

public class DefaultPageService
extends Object
implements PageService


Constructor Summary
DefaultPageService(PageManager pageManager, PermissionManager permissionManager)
           
 
Method Summary
 PageLocator getIdPageLocator(long pageId)
          Creates a page locator that can locate a page based on an id.
 PageLocator getTitleAndSpaceKeyPageLocator(String spaceKey, String title)
          Creates a page locator that can locate a page based on a space key and title.
 ServiceCommand newDeletePageCommand(PageLocator pageLocator)
          Retrieve a command to remove an existing page
 MovePageCommand newMovePageCommand(PageLocator sourcePageLocator, PageLocator targetPageLocator, String position)
          Retrieve a command to perform a simple move operation.
 MovePageCommand newMovePageCommand(PageLocator sourcePageLocator, SpaceLocator targetSpaceLocator)
          Retrieve a command that performs a move operation of a page to a top level of a target space.
 ServiceCommand newRevertPageCommand(PageLocator pageToRevert, int version, String revertComment, boolean revertTitle)
          Retreive a command to revert a page
 ServiceCommand newRevertPageOrderCommand(PageLocator parentPageLocator)
          Retrieve a command to clear any existing positions for children of the located Page.
 ServiceCommand newSetPageOrderCommand(PageLocator parentPageLocator, List<Long> childPageIds)
          Retrieve a command to set the order of all children for a supplied parent Page locator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPageService

public DefaultPageService(PageManager pageManager,
                          PermissionManager permissionManager)
Method Detail

newMovePageCommand

public MovePageCommand newMovePageCommand(PageLocator sourcePageLocator,
                                          PageLocator targetPageLocator,
                                          String position)
Description copied from interface: PageService
Retrieve a command to perform a simple move operation.

Specified by:
newMovePageCommand in interface PageService
position - the point describing where the source should be moved to in relation to the target, see MovePageCommand
Returns:
an appropriate command instance

newMovePageCommand

public MovePageCommand newMovePageCommand(PageLocator sourcePageLocator,
                                          SpaceLocator targetSpaceLocator)
Description copied from interface: PageService
Retrieve a command that performs a move operation of a page to a top level of a target space.

Specified by:
newMovePageCommand in interface PageService

newSetPageOrderCommand

public ServiceCommand newSetPageOrderCommand(PageLocator parentPageLocator,
                                             List<Long> childPageIds)
Description copied from interface: PageService
Retrieve a command to set the order of all children for a supplied parent Page locator.

Specified by:
newSetPageOrderCommand in interface PageService
Parameters:
parentPageLocator - locator for the parent Page object
childPageIds - a list of child page ids

newRevertPageOrderCommand

public ServiceCommand newRevertPageOrderCommand(PageLocator parentPageLocator)
Description copied from interface: PageService
Retrieve a command to clear any existing positions for children of the located Page.

Specified by:
newRevertPageOrderCommand in interface PageService

newDeletePageCommand

public ServiceCommand newDeletePageCommand(PageLocator pageLocator)
Description copied from interface: PageService
Retrieve a command to remove an existing page

Specified by:
newDeletePageCommand in interface PageService

getIdPageLocator

public PageLocator getIdPageLocator(long pageId)
Description copied from interface: PageService
Creates a page locator that can locate a page based on an id.

Specified by:
getIdPageLocator in interface PageService

getTitleAndSpaceKeyPageLocator

public PageLocator getTitleAndSpaceKeyPageLocator(String spaceKey,
                                                  String title)
Description copied from interface: PageService
Creates a page locator that can locate a page based on a space key and title.

Specified by:
getTitleAndSpaceKeyPageLocator in interface PageService

newRevertPageCommand

public ServiceCommand newRevertPageCommand(PageLocator pageToRevert,
                                           int version,
                                           String revertComment,
                                           boolean revertTitle)
Description copied from interface: PageService
Retreive a command to revert a page

Specified by:
newRevertPageCommand in interface PageService


Copyright © 2003-2010 Atlassian. All Rights Reserved.