Class EditorAction

All Implemented Interfaces:
Beanable, PageAware, TinyUrlAware, WebInterface, CaptchaAware, SpaceAware, Spaced, BreadcrumbAware, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable

public class EditorAction extends AbstractCreateAndEditPageAction implements SpaceAware, BreadcrumbAware
See Also:
  • Field Details

  • Constructor Details

    • EditorAction

      public EditorAction()
  • Method Details

    • 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
    • getWysiwygContent

      public String getWysiwygContent()
      Make the wysiwyg content an empty string on editor load a we pull this down from the server if page edit is triggered.
      Overrides:
      getWysiwygContent in class AbstractPreviewPageAction
      Returns:
      empty string
    • getSpace

      public Space getSpace()
      Specified by:
      getSpace in interface Spaced
      Overrides:
      getSpace in class AbstractPageAwareAction
    • setSpace

      public void setSpace(Space space)
      Description copied from interface: SpaceAware
      IOC method for setting the space on the action. This is called from the interceptor
      Specified by:
      setSpace in interface SpaceAware
      Parameters:
      space - the space that the action will be working on.
    • isSpaceRequired

      public boolean isSpaceRequired()
      Description copied from interface: SpaceAware
      If the action requires that the space be set before being run, then it should return true to this method. If the action requires a space, but no space is available, then the interceptor will automatically redirect to the 'pagenotfound' result
      Specified by:
      isSpaceRequired in interface SpaceAware
      Returns:
      true if the action requires a space in order to execute
    • getMode

      public String getMode()
      Overrides:
      getMode in class AbstractPageAction
    • isPermitted

      public boolean isPermitted()
      Because this page only returns an editor frame we don't need to check permissions for this action .
      Overrides:
      isPermitted in class AbstractPageAwareAction
      Returns:
      always returns true
    • isUserWatchingPage

      public boolean isUserWatchingPage()
      Returns true if the user is watching the current page. Returns false otherwise, or if the user is anonymous.
    • isUserWatchingSpace

      public boolean isUserWatchingSpace()
      Returns true if the user is watching the page/blog's space for the respective ContentType. For example, if getPage returns a BlogPost and the user is only watching Pages in the Space, this method returns false.
    • 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
    • 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
    • startHeartbeatOnDoDefault

      @Internal public boolean startHeartbeatOnDoDefault()
      Description copied from class: AbstractCreateAndEditPageAction
      This method determines whether the current action should start an activity on the HeartbeatManager. In most cases this should be left as true since we would like to track user activity in the editor. Only override this method if you know exactly what you doing.
      Overrides:
      startHeartbeatOnDoDefault in class AbstractCreateAndEditPageAction
      Returns:
      boolean indicating whether activity should be started via the HeartbeatManager