com.atlassian.confluence.pages
Class AlternativePagesLocator

java.lang.Object
  extended by com.atlassian.confluence.pages.AlternativePagesLocator

public class AlternativePagesLocator
extends Object

Finds possible content matches for a supplied title and space.

Alternatives are found in the following fashion: 1. If a page with the title and space has been trashed. 2a. If a page had the title in the given space it may have been renamed. 2b. If a page had or has the title in another space it may have been moved. 2c. If a page in the same space has a similar name the user may have mistyped it.

If the page is found in the trash no further searching is done.


Constructor Summary
AlternativePagesLocator(PageManager pageManager, PermissionManager permissionManager, Space space, String title)
           
 
Method Summary
 boolean foundInTrash()
           
 List<AbstractPage> getPagesInOtherSpaces()
          Returns pages in other spaces that have or had the required title the page may have been moved and potentially renamed.
 List<AbstractPage> getPagesWithSimilarTitleInSpace()
          Returns pages in the space that have similar titles to the one requested.
 List<AbstractPage> getPossiblesInTrash()
          Returns any pages in Trash with the given space and title.
 List<AbstractPage> getRenamedPagesInSpace()
          Returns pages in the space that had the required title but have been renamed.
 boolean hasAlternatives()
          Returns true if at least one alternative page can be found for the supplied title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlternativePagesLocator

public AlternativePagesLocator(PageManager pageManager,
                               PermissionManager permissionManager,
                               Space space,
                               String title)
Method Detail

hasAlternatives

public boolean hasAlternatives()
Returns true if at least one alternative page can be found for the supplied title.


foundInTrash

public boolean foundInTrash()

getPossiblesInTrash

public List<AbstractPage> getPossiblesInTrash()
Returns any pages in Trash with the given space and title.


getPagesInOtherSpaces

public List<AbstractPage> getPagesInOtherSpaces()
Returns pages in other spaces that have or had the required title the page may have been moved and potentially renamed.

Note that many pages may have the same title in different spaces, e.g. "Home".


getRenamedPagesInSpace

public List<AbstractPage> getRenamedPagesInSpace()
Returns pages in the space that had the required title but have been renamed.


getPagesWithSimilarTitleInSpace

public List<AbstractPage> getPagesWithSimilarTitleInSpace()
Returns pages in the space that have similar titles to the one requested.



Copyright © 2003-2012 Atlassian. All Rights Reserved.