Class AbstractCreateAndEditPageAction

    • Constructor Detail

      • AbstractCreateAndEditPageAction

        public AbstractCreateAndEditPageAction()
    • Method Detail

      • setParentPageId

        public void setParentPageId​(long parentPageId)
      • getParentPageId

        public long getParentPageId()
      • getParentPage

        public Page getParentPage()
      • validateDuplicatePageTitle

        protected void validateDuplicatePageTitle()
      • 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.xwork2.Validateable
        validate in class AbstractPreviewPageAction
      • setShowDraftMessage

        public void setShowDraftMessage​(boolean showDraftMessage)
      • getContentType

        public abstract String getContentType()
        Returns the content type being created or edited. e.g. "page", "blogpost"
      • getFromPageId

        public long getFromPageId()
        Hack to grab the fromPageId in the AbstractCreatePageAction. This is required so that we can create shared drafts with the correct parent page. This method is overridden in AbstractCreatePageAction which is the only place where fromPageId should be defined.
        The page referenced by the fromPageId provided in the action call
      • startHeartbeatOnDoDefault

        public boolean startHeartbeatOnDoDefault()
        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.
        boolean indicating whether activity should be started via the HeartbeatManager
      • createDraft

        protected Draft createDraft()
        since 5.10
      • hasDraftPermission

        protected boolean hasDraftPermission()
      • isNewAbstractPage

        public boolean isNewAbstractPage()
      • setTitle

        public void setTitle​(String title)
      • getParentPageTitle

        public String getParentPageTitle()
      • setParentPageTitle

        public void setParentPageTitle​(String parentPageTitle)
      • getParentPageSpaceKey

        public String getParentPageSpaceKey()
        If the parentPageSpaceKey is set, this function will return the parentPageSpaceKey value. Otherwise it will return the spaceKey of the current Page.
      • setParentPageSpaceKey

        public void setParentPageSpaceKey​(String parentPageSpaceKey)
      • hasSetPagePermissionsPermission

        public boolean hasSetPagePermissionsPermission()
      • getViewInheritedContentPermissionSets

        public List getViewInheritedContentPermissionSets()
      • setLabelsString

        public void setLabelsString​(String labelsString)
      • setLabelsString

        public void setLabelsString​(List<Label> labels)
      • getLabelsString

        public String getLabelsString()
      • getNewSpaceKey

        public String getNewSpaceKey()
      • setNewSpaceKey

        public void setNewSpaceKey​(String newSpaceKey)
      • getParentPageString

        public String getParentPageString()
      • setParentPageString

        public void setParentPageString​(String parentPageString)
      • setDraftManager

        public void setDraftManager​(DraftManager draftManager)
      • setDraftService

        public void setDraftService​(DraftService draftService)
      • isShowDraftMessage

        public boolean isShowDraftMessage()
      • setUseDraft

        public void setUseDraft​(boolean useDraft)
      • getDraft

        public Draft getDraft()
        since 5.10 use getDraftAsCEO()
        Return the current draft in use if there is one or null otherwise.
      • getDraftAsCEO

        public ContentEntityObject getDraftAsCEO()
        since 5.10 only use if still transitioning from legacy drafts, otherwise use getContentDraft()
        Return the current draft in use if there is one or null otherwise.
      • getContentDraft

        public AbstractPage getContentDraft()
        Return the current draft in use if there is one or null otherwise.
      • getExistingDraft

        public Draft getExistingDraft()
      • getExistingDraftId

        public long getExistingDraftId()
      • getDraftId

        public long getDraftId()
        Return the id of the current draft in use if there is one or 0 otherwise.
      • getDraftShareId

        public String getDraftShareId()
      • setDraftShareId

        public void setDraftShareId​(String draftShareId)
      • getSyncRev

        public String getSyncRev()
      • getConfluenceRevision

        public String getConfluenceRevision()
      • getSynchronyRevisionSource

        public String getSynchronyRevisionSource()
      • getContentObject

        protected AbstractPage getContentObject()
      • setSyncRev

        public void setSyncRev​(String syncRev)
      • getEntityId

        public long getEntityId()
      • setDraftId

        public void setDraftId​(long draftId)
      • setPosition

        public void setPosition​(String position)
      • setTargetId

        public void setTargetId​(String targetId)
      • getPosition

        protected String getPosition()
      • getTargetId

        protected long getTargetId()
      • setCaptchaManager

        public void setCaptchaManager​(CaptchaManager captchaManager)
      • setNotificationManager

        public void setNotificationManager​(NotificationManager notificationManager)
      • setPageService

        public void setPageService​(PageService pageService)
      • setSpaceService

        public void setSpaceService​(SpaceService spaceService)
      • isUseDraft

        public boolean isUseDraft()
      • isRestricted

        public boolean isRestricted()
      • getLabels

        protected List<Label> getLabels()
        Metadata is now retrieved from the existing page, if it exists, otherwise it is stored on the draft (i.e. if the draft has never been published)
        getLabels in class AbstractPageAction
        List of labels visible to the current user
      • setCollaborativeEditingHelper

        public void setCollaborativeEditingHelper​(CollaborativeEditingHelper collaborativeEditingHelper)
      • setDraftsTransitionHelper

        public void setDraftsTransitionHelper​(DraftsTransitionHelper draftsTransitionHelper)
      • setHeartbeatManager

        public void setHeartbeatManager​(HeartbeatManager heartbeatManager)