Class 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:
  • Field Details

  • Constructor Details

    • AbstractEditPageAction

      public AbstractEditPageAction()
  • Method Details

    • 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.
    • getParentPage

      public Page getParentPage()
      Overrides:
      getParentPage in class AbstractCreateAndEditPageAction
    • 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 org.apache.struts2.Validateable
      Overrides:
      validate in class AbstractCreateAndEditPageAction
    • doDefault

      public String doDefault() throws Exception
      Description copied from class: ConfluenceActionSupport
      Convenient Action execution method which defaults to returning INPUT
      Overrides:
      doDefault in class AbstractCreateAndEditPageAction
      Throws:
      Exception
    • isEditPermissionRequired

      public final boolean isEditPermissionRequired()
      Specified by:
      isEditPermissionRequired in interface PageAware
    • 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 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
    • getOverwrite

      public String getOverwrite()
    • setOverwrite

      public void setOverwrite(String overwrite)
    • isPermitted

      public boolean isPermitted()
      Description copied from class: ConfluenceActionSupport
      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
    • 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