com.atlassian.confluence.pages.actions
Class AbstractPageAction
java.lang.Object
com.opensymphony.xwork.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.pages.actions.AbstractPageAction
- All Implemented Interfaces:
- com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, PageAware, Serializable, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware
- Direct Known Subclasses:
- AbstractPageChangeAction, AbstractPreviewPageAction, AddPageNotificationAction, ChildrenAction, DownloadAllAttachmentsOnPageAction, ExportPageAction, ExportWordPageAction, GallerySlideshowAction, PageNotPermittedAction, RemoveCommentAction, RemovePageAction, RemovePageNotificationAction, RevertPageBackToVersionAction, ViewAttachmentsAction, ViewPageAction, ViewPreviousVersionsAction
- public abstract class AbstractPageAction
- extends ConfluenceActionSupport
- implements PageAware
- See Also:
- Serialized Form
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, log, permissionManager, permitted, 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 |
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
addActionError, addPermissionTypeTo, addToHistory, doDefault, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEditorLanguage, getEventManager, getGlobalHelper, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setUserAccessor, setWebInterfaceManager |
Methods inherited from class com.opensymphony.xwork.ActionSupport |
addActionError, addActionMessage, addFieldError, execute, 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 |
pageManager
protected PageManager pageManager
spaceManager
protected SpaceManager spaceManager
captchaManager
protected CaptchaManager captchaManager
postingDay
protected String postingDay
linkManager
protected LinkManager linkManager
contentPermissionManager
protected ContentPermissionManager contentPermissionManager
incomingLinks
protected List incomingLinks
expertView
protected Boolean expertView
isXHtml
protected boolean isXHtml
wysiwygConverter
protected ConfluenceWysiwygConverter wysiwygConverter
RICHTEXT
public static String RICHTEXT
MARKUP
public static String MARKUP
PREVIEW
public static String PREVIEW
AbstractPageAction
public AbstractPageAction()
getSpaceKey
public String getSpaceKey()
getTitle
public String getTitle()
getPostingDay
public String getPostingDay()
getPostingYear
public String getPostingYear()
getPostingMonth
public String getPostingMonth()
getPostingMonthNumeric
public String getPostingMonthNumeric()
getPostingDayOfMonth
public String getPostingDayOfMonth()
getPage
public AbstractPage getPage()
- Specified by:
getPage
in interface PageAware
- Returns:
- page the page that the action worked on
getBlogPost
public BlogPost getBlogPost()
getSpace
public Space getSpace()
setPageManager
public void setPageManager(PageManager pageManager)
setSpaceManager
public void setSpaceManager(SpaceManager spaceManager)
setLinkManager
public void setLinkManager(LinkManager linkManager)
getIncomingLinks
public List getIncomingLinks()
- returns list of "unique" incoming links to this page
getSubscribableName
public String getSubscribableName()
getPermissionTypes
protected List getPermissionTypes()
- Overrides:
getPermissionTypes
in class ConfluenceActionSupport
isPermitted
public boolean isPermitted()
- Overrides:
isPermitted
in class ConfluenceActionSupport
hasViewPagePermission
protected boolean hasViewPagePermission()
hasInvalidTitleCharacters
protected boolean hasInvalidTitleCharacters(String str)
getPostingDate
public Date getPostingDate()
getNextPost
public BlogPost getNextPost()
getPreviousPost
public BlogPost getPreviousPost()
getTinyUrl
public String getTinyUrl()
setPage
public void setPage(AbstractPage page)
- Description copied from interface:
PageAware
- IOC method for setting the page on the action. This is called from the interceptor
- Specified by:
setPage
in interface PageAware
- Parameters:
page
- the page that the action will be working on.
isPageRequired
public boolean isPageRequired()
- Description copied from interface:
PageAware
- If the action requires that the page be set before being run, then it should
return true to this method. If the action requires a page, but no page is available,
then the interceptor will automatically redirect to the 'pagenotfound' result
- Specified by:
isPageRequired
in interface PageAware
- Returns:
- true if the action requires a page in order to execute
isLatestVersionRequired
public boolean isLatestVersionRequired()
- Description copied from interface:
PageAware
- If the action can only work on the most recent version of a page, this will cause the
interceptor to silently replace the version that it looks up with the most recent
version, if necessary.
- Specified by:
isLatestVersionRequired
in interface PageAware
- Returns:
- true if the action requires the most recent version of a page
isViewPermissionRequired
public boolean isViewPermissionRequired()
- Specified by:
isViewPermissionRequired
in interface PageAware
- Returns:
- true if the action requires a check on the view page level permissions on this page
getPageId
public long getPageId()
isSpaceAdmin
protected boolean isSpaceAdmin()
hasSetPagePermissionsPermission
public boolean hasSetPagePermissionsPermission()
getExpertView
public Boolean getExpertView()
getAvailableSpaces
public List getAvailableSpaces()
getPreviousVersion
public AbstractPage getPreviousVersion(int version)
getBeanKey
protected Object getBeanKey()
extractSpaceKey
protected String extractSpaceKey(String pageString)
- This method extracts the SpaceKey from a String which should look like Spacekey:Pagename
This method is used as a helper method to parse the String given by the PagePicker which
is used by the parentPage form field as well as the moveAttachment.
- Parameters:
pageString
-
- Returns:
- The space name parsed from the input String if defined
otherwise the function returns null
extractPageTitle
protected String extractPageTitle(String pageString)
- To extract the PageName from a String like Spacekey:Pagename, the extractPageTitle Method can be used.
- Parameters:
pageString
-
- Returns:
- The page name parsed from the input String
generateAncestryBreadcrumbs
public String generateAncestryBreadcrumbs()
setContentPermissionManager
public void setContentPermissionManager(ContentPermissionManager contentPermissionManager)
getHelper
public ThemeHelper getHelper()
- Overrides:
getHelper
in class ConfluenceActionSupport
getPermittedChildren
public List getPermittedChildren()
hasPermittedChildren
public boolean hasPermittedChildren()
hasAttachFilePermissions
public boolean hasAttachFilePermissions()
setXhtml
public void setXhtml(boolean XHtml)
getXhtml
public boolean getXhtml()
setConfluenceWysiwygConverter
public void setConfluenceWysiwygConverter(ConfluenceWysiwygConverter wysiwygConverter)
getUseWysiwyg
public boolean getUseWysiwyg()
getSupportWysiwyg
public boolean getSupportWysiwyg()
getShowMarkup
public boolean getShowMarkup()
getMode
public String getMode()
getSuggestedLabels
public List getSuggestedLabels()
setMode
public void setMode(String mode)
setBreadcrumbsManager
public void setBreadcrumbsManager(BreadcrumbsManager breadcrumbsManager)
getRICHTEXT
public static String getRICHTEXT()
getMARKUP
public static String getMARKUP()
getPREVIEW
public static String getPREVIEW()
getSpaceManager
public SpaceManager getSpaceManager()
getCaptchaManager
public CaptchaManager getCaptchaManager()
setCaptchaManager
public void setCaptchaManager(CaptchaManager captchaManager)
getCaptchaId
public String getCaptchaId()
setCaptchaId
public void setCaptchaId(String captchaId)
getEditor
public Editor getEditor()
setEditorManager
public void setEditorManager(EditorManager editorManager)