Class EditorAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- com.atlassian.confluence.core.ConfluenceActionSupport
-
- com.atlassian.confluence.pages.actions.AbstractPageAwareAction
-
- com.atlassian.confluence.pages.actions.AbstractPageAction
-
- com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
-
- com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
-
- com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
-
- com.atlassian.confluence.plugins.editorloader.EditorAction
-
- All Implemented Interfaces:
Beanable,PageAware,TinyUrlAware,WebInterface,CaptchaAware,SpaceAware,Spaced,BreadcrumbAware,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 EditorAction extends AbstractCreateAndEditPageAction implements SpaceAware, BreadcrumbAware
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BreadcrumbGeneratorbreadcrumbGenerator-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
ACTIVITY_UNAVAILABLE, captchaManager, collaborativeEditingHelper, draftManager, draftService, draftsTransitionHelper, heartbeatManager, LOCKED, movePageCommandHelper, newSpaceKey, notificationManager, pageService, parentPage, parentPageId, parentPageSpaceKey, parentPageString, parentPageTitle, targetId, USER_LIMIT_REACHED
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
pageTemplateManager, templateId
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
back, bean, formatConverter, inPreview, preview, storageFormat, wikiStyleRenderer, wysiwygContent
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverter
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
contentPermissionManager, spaceManager
-
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, settingsManager, spacePermissionManager, systemInformationService, userAccessor, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description EditorAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdoDefault()Convenient Action execution method which defaults to returning INPUTBreadcrumbgetBreadcrumb()Returns the breadcrumb to be shown when the action is accessed.StringgetContentType()Returns the content type being created or edited.StringgetMode()SpacegetSpace()StringgetWysiwygContent()Make the wysiwyg content an empty string on editor load a we pull this down from the server if page edit is triggered.booleanisPermitted()Because this page only returns an editor frame we don't need to check permissions for this action .booleanisSpaceRequired()If the action requires that the space be set before being run, then it should return true to this method.booleanisUserWatchingPage()Returns true if the user is watching the current page.booleanisUserWatchingSpace()Returns true if the user is watching the page/blog's space for the respective ContentType.voidsetBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator)voidsetSpace(Space space)IOC method for setting the space on the action.booleanstartHeartbeatOnDoDefault()This method determines whether the current action should start an activity on the HeartbeatManager.-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
createDraft, getCancelResult, getCaptchaManager, getCollaborativeEditingHelper, getConfluenceRevision, getContentDraft, getContentObject, getCurrentEditPermission, getCurrentViewPermission, getDraft, getDraftAsCEO, getDraftId, getDraftShareId, getEntityId, getExistingDraft, getExistingDraftId, getFromPageId, getLabels, getLabelsString, getMovePageCommand, getNewSpaceKey, getNotificationManager, getParentPage, getParentPageId, getParentPageSpaceKey, getParentPageString, getParentPageTitle, getPermissionTypes, getPosition, getSynchronyRevisionSource, getSyncRev, getTargetId, getTitle, getViewInheritedContentPermissionSets, getWebInterfaceContext, hasDraftPermission, hasSetPagePermissionsPermission, isCollaborativeContent, isNewAbstractPage, isRestricted, isShowDraftMessage, isUseDraft, setCaptchaManager, setCollaborativeEditingHelper, setDraftId, setDraftManager, setDraftService, setDraftShareId, setDraftsTransitionHelper, setHeartbeatManager, setLabelsString, setLabelsString, setMovePageCommandHelper, setNewSpaceKey, setNotificationManager, setPageService, setParentPageId, setParentPageSpaceKey, setParentPageString, setParentPageTitle, setPermissions, setPosition, setShowDraftMessage, setSpaceService, setSyncRev, setTargetId, setTitle, setUseDraft, validate, validateDuplicatePageTitle
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
getGlobalPageTemplates, getPageTemplate, getSpacePageTemplates, getTemplateId, isPageTemplatesAvailable, loadTemplates, setPageTemplateManager, setTemplateId
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
getBean, getContentForSaving, getConversionContext, getEditorFormattedContent, getInPreview, getRenderContext, getStorageFormat, getxHtmlContent, setBack, setFormatConverter, setInPreview, setPreview, setWikiStyleRenderer, setWysiwygContent, updateXHtmlContent
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
displayDatePath, getAttachmentSourceContent, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermittedChildren, getPostingDateAsDate, getPostingDay, getPostingTimeAsTime, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setPostingTime, setViewRenderer
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getCustomPageUrl, getFriendlyDateFormatterHelper, getPage, getPageId, getPageUrl, getSpaceKey, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManager
-
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getBootstrapStatusProvider, getCancel, getConfluenceAccessManager, getContentUiSupport, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocBean, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageJs, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUserAccessor, getUserByName, getUserFullName, getUserHasBrowseUsersPermission, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPrintableVersion, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setAccessModeService, setApiDateFormatService, setApiPersonService, setBootstrapManager, setBootstrapStatusProvider, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, useSkipAccessCheck, withServletRequestSupplier
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.security.CaptchaAware
mustValidateCaptcha
-
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.pages.actions.PageAware
isEditPermissionRequired
-
Methods inherited from interface com.atlassian.confluence.spaces.actions.SpaceAware
isViewPermissionRequired
-
-
-
-
Field Detail
-
breadcrumbGenerator
protected BreadcrumbGenerator breadcrumbGenerator
-
-
Method Detail
-
doDefault
public String doDefault() throws Exception
Description copied from class:ConfluenceActionSupportConvenient Action execution method which defaults to returning INPUT- Overrides:
doDefaultin classAbstractCreateAndEditPageAction- Throws:
Exception
-
getWysiwygContent
public String getWysiwygContent()
Make the wysiwyg content an empty string on editor load a we pull this down from the server if page edit is triggered.- Overrides:
getWysiwygContentin classAbstractPreviewPageAction- Returns:
- empty string
-
getSpace
public Space getSpace()
- Specified by:
getSpacein interfaceSpaced- Overrides:
getSpacein classAbstractPageAwareAction
-
setSpace
public void setSpace(Space space)
Description copied from interface:SpaceAwareIOC method for setting the space on the action. This is called from the interceptor- Specified by:
setSpacein interfaceSpaceAware- Parameters:
space- the space that the action will be working on.
-
isSpaceRequired
public boolean isSpaceRequired()
Description copied from interface:SpaceAwareIf the action requires that the space be set before being run, then it should return true to this method. If the action requires a space, but no space is available, then the interceptor will automatically redirect to the 'pagenotfound' result- Specified by:
isSpaceRequiredin interfaceSpaceAware- Returns:
- true if the action requires a space in order to execute
-
getMode
public String getMode()
- Overrides:
getModein classAbstractPageAction
-
isPermitted
public boolean isPermitted()
Because this page only returns an editor frame we don't need to check permissions for this action .- Overrides:
isPermittedin classAbstractPageAwareAction- Returns:
- always returns true
-
isUserWatchingPage
public boolean isUserWatchingPage()
Returns true if the user is watching the current page. Returns false otherwise, or if the user is anonymous.
-
isUserWatchingSpace
public boolean isUserWatchingSpace()
Returns true if the user is watching the page/blog's space for the respective ContentType. For example, if getPage returns a BlogPost and the user is only watching Pages in the Space, this method returns false.
-
getContentType
public String getContentType()
Description copied from class:AbstractCreateAndEditPageActionReturns the content type being created or edited. e.g. "page", "blogpost"- Specified by:
getContentTypein classAbstractCreateAndEditPageAction
-
setBreadcrumbGenerator
public void setBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator)
-
getBreadcrumb
public Breadcrumb getBreadcrumb()
Description copied from interface:BreadcrumbAwareReturns the breadcrumb to be shown when the action is accessed.- Specified by:
getBreadcrumbin interfaceBreadcrumbAware- Returns:
- Breadcrumb
-
startHeartbeatOnDoDefault
@Internal public boolean startHeartbeatOnDoDefault()
Description copied from class:AbstractCreateAndEditPageActionThis method determines whether the current action should start an activity on the HeartbeatManager. In most cases this should be left as true since we would like to track user activity in the editor. Only override this method if you know exactly what you doing.- Overrides:
startHeartbeatOnDoDefaultin classAbstractCreateAndEditPageAction- Returns:
- boolean indicating whether activity should be started via the HeartbeatManager
-
-