com.atlassian.confluence.pages.actions
Class PageNotFoundAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.confluence.core.ConfluenceActionSupport
          extended by com.atlassian.confluence.pages.actions.PageNotFoundAction
All Implemented Interfaces:
WebInterface, Spaced, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, java.io.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

Field Summary
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, log, permissionManager, permitted, pluginAccessor, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
PageNotFoundAction()
           
 
Method Summary
 java.lang.String execute()
          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.
 java.util.List getPossibleAlternativesElsewhere()
           
 java.util.List getPossibleAlternativesInSpace()
          If the page doesn't exist, we look for pages that it may have been renamed to.
 java.util.List getPossibleAlternativesInSpaceSearch()
           
 java.util.List getPossibleAlternativesInTrash()
           
 Space getSpace()
           
 java.lang.String getSpaceKey()
           
 java.lang.String getTitle()
           
 void setPageManager(PageManager pageManager)
           
 void setSpaceKey(java.lang.String spaceKey)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEventManager, getFriendlyDateFormatter, getGlobalHelper, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermitted, isPermittedAsString, isPrintableVersion, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setUserAccessor, setWebInterfaceManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageNotFoundAction

public PageNotFoundAction()
Method Detail

getSpaceKey

public java.lang.String getSpaceKey()

setSpaceKey

public void setSpaceKey(java.lang.String spaceKey)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setPageManager

public void setPageManager(PageManager pageManager)

getSpace

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

execute

public java.lang.String execute()
                         throws java.io.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.xwork.Action
Overrides:
execute in class com.opensymphony.xwork.ActionSupport
Throws:
java.io.IOException

getPossibleAlternativesElsewhere

public java.util.List getPossibleAlternativesElsewhere()

getPossibleAlternativesInSpace

public java.util.List getPossibleAlternativesInSpace()
If the page doesn't exist, we look for pages that it may have been renamed to.


getPossibleAlternativesInTrash

public java.util.List getPossibleAlternativesInTrash()

getPossibleAlternativesInSpaceSearch

public java.util.List getPossibleAlternativesInSpaceSearch()


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.