Package com.atlassian.confluence.pages
Class AlternativePagesLocator
- java.lang.Object
-
- 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
Constructors Constructor Description AlternativePagesLocator(PageManager pageManager, PermissionManager permissionManager, Space space, String title)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
foundInTrash()
List<AbstractPage>
getBlogsInOtherSpaces()
Returns blog posts in other spaces that have or had the required title.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.
-
-
-
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".
-
getBlogsInOtherSpaces
public List<AbstractPage> getBlogsInOtherSpaces()
Returns blog posts in other spaces that have or had the required title. This should find blogs that have been moved, and possibly renamed after that as well.
-
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.
-
-