com.atlassian.confluence.pages.actions
Class AbstractEditPageAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.confluence.core.ConfluenceActionSupport
          extended by com.atlassian.confluence.pages.actions.AbstractPageAwareAction
              extended by com.atlassian.confluence.pages.actions.AbstractPageAction
                  extended by com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
                      extended by com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
                          extended by com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
                              extended by com.atlassian.confluence.pages.actions.AbstractEditPageAction
All Implemented Interfaces:
Beanable, PageAware, TinyUrlAware, WebInterface, CaptchaAware, BreadcrumbAware, MessageHolderAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, Serializable
Direct Known Subclasses:
EditBlogPostAction, EditPageAction

public abstract class AbstractEditPageAction
extends AbstractCreateAndEditPageAction
implements BreadcrumbAware

See Also:
Serialized Form

Field Summary
static String EDITED_PAGE_CRUMB_CSS
           
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
captchaManager, CLOSE_CANCEL_RESULT, DISCARD_CANCEL_RESULT, draftManager, draftService, editPermissionsGroups, editPermissionsUsers, newSpaceKey, notificationManager, pageService, parentPageId, parentPageSpaceKey, parentPageString, parentPageTitle, sharedDraftsDarkFeatureHelper, targetId, viewPermissionsGroups, viewPermissionsUsers
 
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
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, pluginAccessor, 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
 
Constructor Summary
AbstractEditPageAction()
           
 
Method Summary
protected  String afterEdit()
          Common processing to be performed by all subclasses after the edit operation.
 String doDefault()
          Default webwork action execution method.
 String doEdit()
           
 String doSaveEditPageBean()
          Deprecated. 
 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()
           
 DiffChunkRenderer getDiffRenderer()
          Deprecated. since 5.3 should no longer be used.
 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. This hasn't been used for a long time.
 int getOriginalVersion()
           
 String getOverwrite()
           
 String getVersionComment()
           
 boolean isConflictFound()
           
protected  boolean isContentModified()
           
 boolean isMergeRequired()
           
 boolean isPermitted()
           
protected  boolean isTitleModified()
          Returns true if the page title is not null and not equals the current page title
 boolean isVersionMismatch()
          Deprecated. since 5.3. Not used for some time. You can check whether getConflictingVersion() if you need this.
 boolean isViewConflict()
           
 void setBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator)
           
 void setConflictingVersion(int conflictingVersion)
           
 void setHeartbeatManager(HeartbeatManager heartbeatManager)
           
 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. This hasn't actually been used in Confluence since 4.0. This does nothing.
 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, createEditPermissions, createViewPermissions, getCaptchaManager, getCurrentEditPermission, getCurrentViewPermission, getDraft, getDraftId, getDraftShareId, getEditPermissionsGroups, getEditPermissionsSummary, getEditPermissionsUsers, getEntityId, getExistingDraft, getExistingDraftId, getLabelsString, getMovePageCommand, getNewSpaceKey, getNotificationManager, getParentPage, getParentPageId, getParentPageSpaceKey, getParentPageString, getParentPageTitle, getPermissionTypes, getPosition, getSharedDraftsDarkFeatureHelper, getTargetId, getTitle, getViewInheritedContentPermissionSets, getViewPermissionsGroups, getViewPermissionsSummary, getViewPermissionsUsers, getWebInterfaceContext, hasDraftPermission, hasSetPagePermissionsPermission, isNewAbstractPage, isRestricted, isShowDraftMessage, isUseDraft, setAutomaticWatchIfRequired, setCaptchaManager, setDraftId, setDraftManager, setDraftService, setDraftShareId, setEditPermissionsGroups, setEditPermissionsUsers, setLabelsString, setLabelsString, setNewSpaceKey, setNotificationManager, setPageService, setParentPageId, setParentPageSpaceKey, setParentPageString, setParentPageTitle, setPermissions, setPosition, setSharedDraftsDarkFeatureHelper, setShowDraftMessage, setSpaceService, setTargetId, setTitle, setUseDraft, setViewPermissionsGroups, setViewPermissionsUsers, 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, getLabels, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermittedChildren, getPostingDate, getPostingDay, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setViewRenderer
 
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getFriendlyDateFormatterHelper, getPage, getPageId, getSpace, getSpaceKey, hasViewPagePermission, isLatestVersionRequired, isPageRequired, isViewPermissionRequired, setContentPermissionManager, setSpaceManager
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, formatFriendlyDate, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getCancel, getContext, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserByName, getUserFullName, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, setApiDateFormatService, setBootstrapManager, setCancel, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionCheck, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDITED_PAGE_CRUMB_CSS

public static final String EDITED_PAGE_CRUMB_CSS
See Also:
Constant Field Values
Constructor Detail

AbstractEditPageAction

public AbstractEditPageAction()
Method Detail

isVersionMismatch

@Deprecated
public boolean isVersionMismatch()
Deprecated. since 5.3. Not used for some time. You can check whether getConflictingVersion() 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 interface PageAware
Overrides:
setPage in class AbstractPageAwareAction
Parameters:
page - the page that the action will be working on.

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 interface MessageHolderAware
Specified by:
validate in interface com.opensymphony.xwork.Validateable
Overrides:
validate in class AbstractCreateAndEditPageAction

doDefault

public String doDefault()
                 throws Exception
Description copied from class: ConfluenceActionSupport
Default webwork action execution method.

Overrides:
doDefault in class AbstractCreateAndEditPageAction
Returns:
the action result
Throws:
Exception - if something goes wrong

doEdit

public String doEdit()
              throws Exception
Throws:
Exception

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.

doSaveEditPageBean

@Deprecated
public String doSaveEditPageBean()
Deprecated. 


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 class AbstractCreateAndEditPageAction

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

getDiffRenderer

@Deprecated
public DiffChunkRenderer getDiffRenderer()
Deprecated. since 5.3 should no longer be used.

Used by velocity to render the diff in html

Returns:
an Html Chunk Renderer

getOverwrite

public String getOverwrite()

setOverwrite

public void setOverwrite(String overwrite)

isPermitted

public boolean isPermitted()
Overrides:
isPermitted in class AbstractPageAwareAction

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 class AbstractCreateAndEditPageAction

setHeartbeatManager

public void setHeartbeatManager(HeartbeatManager heartbeatManager)

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 interface BreadcrumbAware
Returns:
Breadcrumb


Copyright © 2003–2015 Atlassian. All rights reserved.