Class AbstractEditPageAction
java.lang.Object
org.apache.struts2.ActionSupport
com.opensymphony.xwork2.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
,com.opensymphony.xwork2.Action
,com.opensymphony.xwork2.interceptor.ValidationAware
,com.opensymphony.xwork2.LocaleProvider
,com.opensymphony.xwork2.TextProvider
,com.opensymphony.xwork2.Validateable
,Serializable
,org.apache.struts2.action.Action
,org.apache.struts2.interceptor.ValidationAware
,org.apache.struts2.Validateable
- Direct Known Subclasses:
EditBlogPostAction
,EditPageAction
public abstract class AbstractEditPageAction
extends AbstractCreateAndEditPageAction
implements BreadcrumbAware
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.opensymphony.xwork2.interceptor.ValidationAware
com.opensymphony.xwork2.interceptor.ValidationAware.LegacyAdapter
-
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_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, confluenceAccessManager, contentUiSupport, eventPublisher, formatSettingsManager, globalSettingsManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, localeManager, loginManager, messageHolder, permissionManager, pluginAccessor, request, response, spacePermissionManager, strutsHelper, systemInformationService, userAccessor, webInterfaceManager
Fields inherited from class org.apache.struts2.ActionSupport
container
Fields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Common 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.int
Returns 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.int
boolean
protected boolean
final boolean
boolean
boolean
Consulted byPermissionCheckInterceptor
.protected boolean
Returns true if the page title is not null and not equals the current page titleboolean
Deprecated.since 5.3.boolean
void
setBreadcrumbGenerator
(BreadcrumbGenerator breadcrumbGenerator) void
setConflictingVersion
(int conflictingVersion) void
setHtmlDiffer
(Differ differ) void
setMergerManager
(MergerManager mergerManager) void
setNotifyWatchers
(String notifyWatchers) void
setOldContent
(String oldContent) Deprecated.since 5.3 (but really did nothing for a long time before then)void
setOriginalVersion
(int originalVersion) void
setOverwrite
(String overwrite) void
setPage
(AbstractPage page) IOC method for setting the page on the action.void
setStorageFormatCleaner
(StorageFormatCleaner storageFormatCleaner) void
setVersionComment
(String versionComment) void
setVersionMismatch
(boolean versionMismatch) Deprecated.since 5.3.void
setViewConflict
(boolean viewConflict) void
validate()
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, setXsrfTokenGenerator, startHeartbeatOnDoDefault, 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, getWysiwygContent, 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, 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, setViewRenderer
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getCustomPageUrl, getPage, getPageId, getPageUrl, getSpace, getSpaceKey, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, setSpaceManager
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, getActionErrors, getActionMessages, getActionName, getAuthenticatedUser, getBootstrapStatusProvider, getCurrentRequest, getCurrentResponse, 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, setSkipIsPermitted, setSpacePermissionManager, setStrutsHelper, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, shouldSkipIsPermitted
Methods inherited from class com.atlassian.confluence.core.AbstractI18nActionSupport
getText, getText, getText, getText, getText, getText, getText, getText, getTextStrict
Methods 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, toLocale
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.struts2.action.Action
execute
Methods inherited from interface com.atlassian.confluence.security.CaptchaAware
mustValidateCaptcha
Methods inherited from interface org.apache.struts2.interceptor.ValidationAware
addActionError, addActionMessage, addFieldError, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
-
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:PageAware
IOC method for setting the page on the action. This is called from the interceptor- Specified by:
setPage
in interfacePageAware
- Overrides:
setPage
in classAbstractPageAwareAction
- Parameters:
page
- the page that the action will be working on.
-
getParentPage
- Overrides:
getParentPage
in classAbstractCreateAndEditPageAction
-
validate
public void validate()Description copied from class:AbstractPreviewPageAction
Convert 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:
validate
in interfaceMessageHolderAware
- Specified by:
validate
in interfaceorg.apache.struts2.Validateable
- Overrides:
validate
in classAbstractCreateAndEditPageAction
-
doDefault
Description copied from class:ConfluenceActionSupport
Convenient Action execution method which defaults to returning INPUT- Overrides:
doDefault
in classAbstractCreateAndEditPageAction
- Throws:
Exception
-
isEditPermissionRequired
public final boolean isEditPermissionRequired()- Specified by:
isEditPermissionRequired
in interfacePageAware
-
doEdit
-
afterEdit
Common processing to be performed by all subclasses after the edit operation.- Returns:
Action.SUCCESS
if 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:
getCancelResult
in 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:ConfluenceActionSupport
Consulted byPermissionCheckInterceptor
.- Overrides:
isPermitted
in 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:AbstractCreateAndEditPageAction
Returns the content type being created or edited. e.g. "page", "blogpost"- Specified by:
getContentType
in classAbstractCreateAndEditPageAction
-
setHtmlDiffer
-
setMergerManager
-
setStorageFormatCleaner
-
setBreadcrumbGenerator
-
getBreadcrumb
Description copied from interface:BreadcrumbAware
Returns the breadcrumb to be shown when the action is accessed.- Specified by:
getBreadcrumb
in interfaceBreadcrumbAware
- Returns:
- Breadcrumb
-