Class PageNotFoundAction

  • 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

    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:
    Serialized Form
    • Constructor Detail

      • PageNotFoundAction

        public PageNotFoundAction()
    • Method Detail

      • 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)
      • execute

        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 com.opensymphony.xwork2.Action
        execute in class com.opensymphony.xwork2.ActionSupport
      • 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.
        html -
        a summary of the supplied html parameter
      • setXhtmlSummariser

        public void setXhtmlSummariser​(Summariser xhtmlSummariser)