Class AbstractEditPageAction
java.lang.Object
org.apache.struts2.ActionSupport
com.atlassian.confluence.core.AbstractI18nActionSupport
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.pages.actions.AbstractEditPageAction
- All Implemented Interfaces:
Beanable,PageAware,TinyUrlAware,WebInterface,CaptchaAware,BreadcrumbAware,MessageHolderAware,Serializable,org.apache.struts2.action.Action,org.apache.struts2.interceptor.ValidationAware,org.apache.struts2.locale.LocaleProvider,org.apache.struts2.text.TextProvider,org.apache.struts2.Validateable
- Direct Known Subclasses:
EditBlogPostAction,EditPageAction
public abstract class AbstractEditPageAction
extends AbstractCreateAndEditPageAction
implements BreadcrumbAware
- See Also:
-
Field Summary
FieldsFields 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_REACHEDFields inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
pageTemplateManager, templateIdFields inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
back, bean, formatConverter, inPreview, preview, storageFormat, wikiStyleRenderer, wysiwygContentFields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverterFields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
contentPermissionManager, spaceManagerFields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, confluenceAccessManager, contentUiSupport, eventPublisher, formatSettingsManager, globalSettingsManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, localeManager, loginManager, messageHolder, permissionManager, pluginAccessor, request, response, spacePermissionManager, strutsHelper, systemInformationService, userAccessor, webInterfaceManagerFields inherited from class org.apache.struts2.ActionSupport
containerFields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringCommon processing to be performed by all subclasses after the edit operation.Convenient Action execution method which defaults to returning INPUTdoEdit()Returns the breadcrumb to be shown when the action is accessed.intReturns the content type being created or edited.getDiff()Return the user who made the most recent conflicting change.Deprecated.since 5.3 (but really did nothing for a long time before then)Deprecated.since 5.3.intbooleanprotected booleanfinal booleanbooleanbooleanConsulted byPermissionCheckInterceptor.protected booleanReturns true if the page title is not null and not equals the current page titlebooleanDeprecated.since 5.3.booleanvoidsetBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator) voidsetConflictingVersion(int conflictingVersion) voidsetHtmlDiffer(Differ differ) voidsetMergerManager(MergerManager mergerManager) voidsetNotifyWatchers(String notifyWatchers) voidsetOldContent(String oldContent) Deprecated.since 5.3 (but really did nothing for a long time before then)voidsetOriginalVersion(int originalVersion) voidsetOverwrite(String overwrite) voidsetPage(AbstractPage page) IOC method for setting the page on the action.voidsetStorageFormatCleaner(StorageFormatCleaner storageFormatCleaner) voidsetVersionComment(String versionComment) voidsetVersionMismatch(boolean versionMismatch) Deprecated.since 5.3.voidsetViewConflict(boolean viewConflict) voidvalidate()Convert the editor content to storageFormat, catching and reporting any problems in the process.Methods inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
createDraft, getCaptchaManager, getCollaborativeEditingHelper, getConfluenceRevision, getContentDraft, getContentObject, getCurrentEditPermission, getCurrentViewPermission, getDraft, getDraftAsCEO, getDraftId, getDraftShareId, getEntityId, getExistingDraft, getExistingDraftId, getFromPageId, getLabels, getLabelsString, getMovePageCommand, getNewSpaceKey, getNotificationManager, getParentPageId, getParentPageSpaceKey, getParentPageString, getParentPageTitle, getPermissionTypes, getPosition, getSynchronyRevisionSource, getSyncRev, getTargetId, getTitle, getViewInheritedContentPermissionSets, getWebInterfaceContext, getXsrfToken, 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, setXsrfTokenGenerator, startHeartbeatOnDoDefault, validateDuplicatePageTitleMethods inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
getGlobalPageTemplates, getPageTemplate, getSpacePageTemplates, getTemplateId, isPageTemplatesAvailable, loadTemplates, setPageTemplateManager, setTemplateIdMethods inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
getBean, getContentForSaving, getConversionContext, getEditorFormattedContent, getInPreview, getRenderContext, getStorageFormat, getWysiwygContent, getxHtmlContent, setBack, setFormatConverter, setInPreview, setPreview, setWikiStyleRenderer, setWysiwygContent, updateXHtmlContentMethods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
displayDatePath, getAttachmentSourceContent, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermittedChildren, getPostingDateAsDate, getPostingDay, getPostingTimeAsTime, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setPostingTime, setViewRendererMethods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getCustomPageUrl, getPage, getPageId, getPageUrl, getSpace, getSpaceKey, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, setSpaceManagerMethods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, getActionErrors, getActionMessages, getActionName, getActiveRequest, getActiveResponse, getAuthenticatedUser, getBootstrapStatusProvider, getDateFormatter, getDefaultTimeZone, getFieldErrors, getGlobalSettings, getI18n, getLocale, getMessageHolder, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getTimeZone, getUserByName, getUserInterfaceState, isAnonymousUser, isEmailVisible, setAccessModeService, setBootstrapStatusProvider, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventPublisher, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setStrutsHelper, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManagerMethods inherited from class com.atlassian.confluence.core.AbstractI18nActionSupport
getText, getText, getText, getText, getText, getText, getText, getText, getTextStrictMethods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getContainer, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocaleMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.security.CaptchaAware
mustValidateCaptcha
-
Field Details
-
EDITED_PAGE_CRUMB_CSS
- See Also:
-
-
Constructor Details
-
AbstractEditPageAction
public AbstractEditPageAction()
-
-
Method Details
-
isVersionMismatch
Deprecated.since 5.3. Not used for some time. You can check whethergetConflictingVersion()if you need this. -
setVersionMismatch
Deprecated.since 5.3. This hasn't actually been used in Confluence since 4.0. This does nothing. -
getOldContent
Deprecated.since 5.3 (but really did nothing for a long time before then)Not used anywhere. -
setOldContent
Deprecated.since 5.3 (but really did nothing for a long time before then)Not used anywhere. -
setPage
Description copied from interface:PageAwareIOC method for setting the page on the action. This is called from the interceptor- Specified by:
setPagein interfacePageAware- Overrides:
setPagein classAbstractPageAwareAction- Parameters:
page- the page that the action will be working on.
-
getParentPage
- Overrides:
getParentPagein classAbstractCreateAndEditPageAction
-
validate
public void validate()Description copied from class:AbstractPreviewPageActionConvert the editor content to storageFormat, catching and reporting any problems in the process. On successful validation, the storageFormat field will be populated with a storage format representation of the editor content, ready for saving.- Specified by:
validatein interfaceMessageHolderAware- Specified by:
validatein interfaceorg.apache.struts2.Validateable- Overrides:
validatein classAbstractCreateAndEditPageAction
-
doDefault
Description copied from class:ConfluenceActionSupportConvenient Action execution method which defaults to returning INPUT- Overrides:
doDefaultin classAbstractCreateAndEditPageAction- Throws:
Exception
-
isEditPermissionRequired
public final boolean isEditPermissionRequired()- Specified by:
isEditPermissionRequiredin interfacePageAware
-
doEdit
-
afterEdit
Common processing to be performed by all subclasses after the edit operation.- Returns:
Action.SUCCESSif successful. Any other return value means a failure.
-
isContentModified
protected boolean isContentModified() -
isTitleModified
protected boolean isTitleModified()Returns true if the page title is not null and not equals the current page title -
getOriginalPage
Deprecated.since 5.3. This hasn't been used for a long time. -
getCancelResult
- Overrides:
getCancelResultin classAbstractCreateAndEditPageAction
-
getOriginalVersion
public int getOriginalVersion() -
setOriginalVersion
public void setOriginalVersion(int originalVersion) -
getConflictingVersion
public int getConflictingVersion() -
setConflictingVersion
public void setConflictingVersion(int conflictingVersion) -
getDiff
-
getLastConflictingUser
Return the user who made the most recent conflicting change.- Returns:
- user who made the most recent conflicting change
-
getOverwrite
-
setOverwrite
-
isPermitted
public boolean isPermitted()Description copied from class:ConfluenceActionSupportConsulted byPermissionCheckInterceptor.- Overrides:
isPermittedin classAbstractPageAwareAction
-
getNotifyWatchers
-
setNotifyWatchers
-
getVersionComment
-
setVersionComment
-
isConflictFound
public boolean isConflictFound() -
isMergeRequired
public boolean isMergeRequired() -
setViewConflict
public void setViewConflict(boolean viewConflict) -
isViewConflict
public boolean isViewConflict() -
getContentType
Description copied from class:AbstractCreateAndEditPageActionReturns the content type being created or edited. e.g. "page", "blogpost"- Specified by:
getContentTypein classAbstractCreateAndEditPageAction
-
setHtmlDiffer
-
setMergerManager
-
setStorageFormatCleaner
-
setBreadcrumbGenerator
-
getBreadcrumb
Description copied from interface:BreadcrumbAwareReturns the breadcrumb to be shown when the action is accessed.- Specified by:
getBreadcrumbin interfaceBreadcrumbAware- Returns:
- Breadcrumb
-