Class PageNotFoundAction

java.lang.Object
org.apache.struts2.ActionSupport
com.opensymphony.xwork2.ActionSupport
All Implemented Interfaces:
WebInterface, Spaced, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public class PageNotFoundAction extends ConfluenceActionSupport implements Spaced
Redirect to this action if you ever find yourself in a "page not found" situation, it deals with possible alternative pages, and so on.
See Also:
  • Constructor Details

    • PageNotFoundAction

      public PageNotFoundAction()
  • Method Details

    • getSpaceKey

      public String getSpaceKey()
    • setSpaceKey

      public void setSpaceKey(String spaceKey)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • setSpaceManager

      public void setSpaceManager(SpaceManager spaceManager)
    • setPageManager

      public void setPageManager(PageManager pageManager)
    • setThemeManager

      public void setThemeManager(ThemeManager themeManager)
    • getThemeManager

      public ThemeManager getThemeManager()
    • getSpace

      public Space getSpace()
      Specified by:
      getSpace in interface Spaced
    • execute

      @XsrfProtectionExcluded public String execute() throws IOException
      Tries to find a potential match for the missing page, and if found sets status to 404 and return SUCCESS to show the possible pages. Otherwise, return ERROR to delegate to FourOhFourAction.
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
      Throws:
      IOException
    • getPossibleAlternativesElsewhere

      public List<AbstractPage> getPossibleAlternativesElsewhere()
    • getPossibleAlternativesInSpace

      public List<AbstractPage> getPossibleAlternativesInSpace()
    • getPossibleAlternativesInTrash

      public List<AbstractPage> getPossibleAlternativesInTrash()
    • getPossibleAlternativesInSpaceSearch

      public List<AbstractPage> getPossibleAlternativesInSpaceSearch()
    • isSpaceAdminUser

      public boolean isSpaceAdminUser()
    • stripToPlainText

      public String stripToPlainText(String html)
      Strip a supplied String of HTML, removing tags and making it suitable for display as a summary. The string will be truncated to a maximum of 255 characters.
      Parameters:
      html -
      Returns:
      a summary of the supplied html parameter
    • setXhtmlSummariser

      public void setXhtmlSummariser(Summariser xhtmlSummariser)