Class AbstractEditPageAction
- 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.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
- Direct Known Subclasses:
EditBlogPostAction
,EditPageAction
public abstract class AbstractEditPageAction extends AbstractCreateAndEditPageAction implements BreadcrumbAware
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
EDITED_PAGE_CRUMB_CSS
-
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 AbstractEditPageAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected String
afterEdit()
Common processing to be performed by all subclasses after the edit operation.String
doDefault()
Convenient Action execution method which defaults to returning INPUTString
doEdit()
Breadcrumb
getBreadcrumb()
Returns the breadcrumb to be shown when the action is accessed.String
getCancelResult()
int
getConflictingVersion()
String
getContentType()
Returns the content type being created or edited.String
getDiff()
ConfluenceUser
getLastConflictingUser()
Return the user who made the most recent conflicting change.String
getNotifyWatchers()
String
getOldContent()
Deprecated.since 5.3 (but really did nothing for a long time before then)AbstractPage
getOriginalPage()
Deprecated.since 5.3.int
getOriginalVersion()
String
getOverwrite()
Page
getParentPage()
String
getVersionComment()
boolean
isConflictFound()
protected boolean
isContentModified()
boolean
isEditPermissionRequired()
boolean
isMergeRequired()
boolean
isPermitted()
protected boolean
isTitleModified()
Returns true if the page title is not null and not equals the current page titleboolean
isVersionMismatch()
Deprecated.since 5.3.boolean
isViewConflict()
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, 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, 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, getPostingDate, getPostingDay, getPostingTime, 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, getSpace, getSpaceKey, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, 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, 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
-
-
-
-
Field Detail
-
EDITED_PAGE_CRUMB_CSS
public static final String EDITED_PAGE_CRUMB_CSS
- See Also:
- Constant Field Values
-
-
Method Detail
-
isVersionMismatch
@Deprecated public boolean isVersionMismatch()
Deprecated.since 5.3. Not used for some time. You can check whethergetConflictingVersion()
if you need this.
-
setVersionMismatch
@Deprecated public void setVersionMismatch(boolean versionMismatch)
Deprecated.since 5.3. This hasn't actually been used in Confluence since 4.0. This does nothing.
-
getOldContent
@Deprecated public String getOldContent()
Deprecated.since 5.3 (but really did nothing for a long time before then)Not used anywhere.
-
setOldContent
@Deprecated public void setOldContent(String oldContent)
Deprecated.since 5.3 (but really did nothing for a long time before then)Not used anywhere.
-
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 interfacePageAware
- Overrides:
setPage
in classAbstractPageAwareAction
- Parameters:
page
- the page that the action will be working on.
-
getParentPage
public Page 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 interfacecom.opensymphony.xwork2.Validateable
- Overrides:
validate
in classAbstractCreateAndEditPageAction
-
doDefault
public String doDefault() throws Exception
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
public String doEdit()
-
afterEdit
protected String 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 public AbstractPage getOriginalPage()
Deprecated.since 5.3. This hasn't been used for a long time.
-
getCancelResult
public String 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
public String getDiff()
-
getLastConflictingUser
public ConfluenceUser getLastConflictingUser()
Return the user who made the most recent conflicting change.- Returns:
- user who made the most recent conflicting change
-
getOverwrite
public String getOverwrite()
-
setOverwrite
public void setOverwrite(String overwrite)
-
isPermitted
public boolean isPermitted()
- Overrides:
isPermitted
in classAbstractPageAwareAction
-
getNotifyWatchers
public String getNotifyWatchers()
-
setNotifyWatchers
public void setNotifyWatchers(String notifyWatchers)
-
getVersionComment
public String getVersionComment()
-
setVersionComment
public void setVersionComment(String versionComment)
-
isConflictFound
public boolean isConflictFound()
-
isMergeRequired
public boolean isMergeRequired()
-
setViewConflict
public void setViewConflict(boolean viewConflict)
-
isViewConflict
public boolean isViewConflict()
-
getContentType
public String getContentType()
Description copied from class:AbstractCreateAndEditPageAction
Returns the content type being created or edited. e.g. "page", "blogpost"- Specified by:
getContentType
in classAbstractCreateAndEditPageAction
-
setHtmlDiffer
public void setHtmlDiffer(Differ differ)
-
setMergerManager
public void setMergerManager(MergerManager mergerManager)
-
setStorageFormatCleaner
public void setStorageFormatCleaner(StorageFormatCleaner storageFormatCleaner)
-
setBreadcrumbGenerator
public void setBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator)
-
getBreadcrumb
public Breadcrumb getBreadcrumb()
Description copied from interface:BreadcrumbAware
Returns the breadcrumb to be shown when the action is accessed.- Specified by:
getBreadcrumb
in interfaceBreadcrumbAware
- Returns:
- Breadcrumb
-
-