public abstract class AbstractCreateAndEditPageAction extends AbstractTemplatePageAction implements CaptchaAware
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVITY_UNAVAILABLE |
protected CaptchaManager |
captchaManager |
static String |
CLOSE_CANCEL_RESULT
Deprecated.
since 5.7. Cancel submit value is not part of the API so don't rely on them.
|
protected CollaborativeEditingHelper |
collaborativeEditingHelper |
static String |
DISCARD_CANCEL_RESULT
Deprecated.
since 5.7. Cancel submit value is not part of the API so don't rely on them.
|
protected DraftManager |
draftManager |
protected DraftService |
draftService |
protected DraftsTransitionHelper |
draftsTransitionHelper |
protected HeartbeatManager |
heartbeatManager |
static String |
LOCKED |
protected String |
newSpaceKey |
protected NotificationManager |
notificationManager |
protected PageService |
pageService |
protected Page |
parentPage |
protected long |
parentPageId |
protected String |
parentPageSpaceKey |
protected String |
parentPageString |
protected String |
parentPageTitle |
protected long |
targetId |
static String |
USER_LIMIT_REACHED |
pageTemplateManager, templateId
back, bean, formatConverter, inPreview, preview, storageFormat, wikiStyleRenderer, wysiwygContent
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverter
contentPermissionManager, spaceManager
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, pluginAccessor, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
Constructor and Description |
---|
AbstractCreateAndEditPageAction() |
Modifier and Type | Method and Description |
---|---|
protected Draft |
createDraft()
Deprecated.
since 5.10
|
String |
doDefault()
Default webwork action execution method.
|
String |
getCancelResult() |
CaptchaManager |
getCaptchaManager() |
CollaborativeEditingHelper |
getCollaborativeEditingHelper() |
String |
getConfluenceRevision() |
AbstractPage |
getContentDraft()
Return the current draft in use if there is one or null otherwise.
|
protected AbstractPage |
getContentObject() |
abstract String |
getContentType()
Returns the content type being created or edited.
|
ContentPermission |
getCurrentEditPermission() |
ContentPermission |
getCurrentViewPermission() |
Draft |
getDraft()
Deprecated.
since 5.10 use
getDraftAsCEO() |
ContentEntityObject |
getDraftAsCEO()
Deprecated.
since 5.10 only use if still transitioning from legacy drafts, otherwise use
getContentDraft() |
long |
getDraftId()
Return the id of the current draft in use if there is one or 0 otherwise.
|
String |
getDraftShareId() |
long |
getEntityId() |
Draft |
getExistingDraft() |
long |
getExistingDraftId() |
long |
getFromPageId()
Hack to grab the fromPageId in the AbstractCreatePageAction.
|
protected List<Label> |
getLabels()
Metadata is now retrieved from the existing page, if it exists, otherwise it is stored on the
draft (i.e.
|
String |
getLabelsString() |
protected MovePageCommand |
getMovePageCommand() |
String |
getNewSpaceKey() |
NotificationManager |
getNotificationManager() |
Page |
getParentPage() |
long |
getParentPageId() |
String |
getParentPageSpaceKey()
If the parentPageSpaceKey is set, this function will return the parentPageSpaceKey value.
|
String |
getParentPageString() |
String |
getParentPageTitle() |
protected List<String> |
getPermissionTypes() |
protected String |
getPosition() |
String |
getSynchronyRevisionSource() |
String |
getSyncRev() |
protected long |
getTargetId() |
String |
getTitle() |
List |
getViewInheritedContentPermissionSets() |
WebInterfaceContext |
getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.
|
protected boolean |
hasDraftPermission() |
boolean |
hasSetPagePermissionsPermission() |
boolean |
isCollaborativeContent() |
boolean |
isNewAbstractPage() |
boolean |
isRestricted() |
boolean |
isShowDraftMessage() |
boolean |
isUseDraft() |
void |
setAutomaticWatchIfRequired()
Deprecated.
since 5.7.
Calling this is no longer necessary.
In 5.7 - 5.10, AddCreatorOrModifierAsWatcherListener did this on created and updated events..
In 5.10+, ContentEntityObjectManager handles automatic watching
|
void |
setCaptchaManager(CaptchaManager captchaManager) |
void |
setCollaborativeEditingHelper(CollaborativeEditingHelper collaborativeEditingHelper) |
void |
setDraftId(long draftId) |
void |
setDraftManager(DraftManager draftManager) |
void |
setDraftService(DraftService draftService) |
void |
setDraftShareId(String draftShareId) |
void |
setDraftsTransitionHelper(DraftsTransitionHelper draftsTransitionHelper) |
void |
setHeartbeatManager(HeartbeatManager heartbeatManager) |
void |
setLabelsString(List<Label> labels) |
void |
setLabelsString(String labelsString) |
void |
setNewSpaceKey(String newSpaceKey) |
void |
setNotificationManager(NotificationManager notificationManager) |
void |
setPageService(PageService pageService) |
void |
setParentPageId(long parentPageId) |
void |
setParentPageSpaceKey(String parentPageSpaceKey) |
void |
setParentPageString(String parentPageString) |
void |
setParentPageTitle(String parentPageTitle) |
protected void |
setPermissions(List<ContentPermission> permissions) |
void |
setPosition(String position) |
void |
setSharedDraftsDarkFeatureHelper(SharedDraftsDarkFeatureHelper helper)
Deprecated.
since 6.3.0. Use
setCollaborativeEditingHelper(CollaborativeEditingHelper) and
CollaborativeEditingHelper |
void |
setShowDraftMessage(boolean showDraftMessage) |
void |
setSpaceService(SpaceService spaceService) |
void |
setSyncRev(String syncRev) |
void |
setTargetId(String targetId) |
void |
setTitle(String title) |
void |
setUseDraft(boolean useDraft) |
boolean |
startHeartbeatOnDoDefault()
This method determines whether the current action should start an activity on the HeartbeatManager.
|
void |
validate()
Convert the editor content to storageFormat, catching and reporting any problems in the process.
|
protected void |
validateDuplicatePageTitle() |
getGlobalPageTemplates, getPageTemplate, getSpacePageTemplates, getTemplateId, isPageTemplatesAvailable, loadTemplates, setPageTemplateManager, setTemplateId
getBean, getContentForSaving, getConversionContext, getEditorFormattedContent, getInPreview, getRenderContext, getStorageFormat, getWysiwygContent, getxHtmlContent, setBack, setFormatConverter, setInPreview, setPreview, setWikiStyleRenderer, setWysiwygContent, updateXHtmlContent
displayDatePath, getAttachmentSourceContent, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermittedChildren, getPostingDate, getPostingDay, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setViewRenderer
getFriendlyDateFormatterHelper, getPage, getPageId, getSpace, getSpaceKey, hasViewPagePermission, isLatestVersionRequired, isPageRequired, isPermitted, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManager
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, formatFriendlyDate, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getCancel, getConfluenceAccessManager, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserByName, getUserFullName, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPrintableVersion, isSharedMode, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setApiDateFormatService, setBootstrapManager, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSkipAccessCheck, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager
addActionError, addActionMessage, addFieldError, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEditPermissionRequired
public static final String LOCKED
public static final String ACTIVITY_UNAVAILABLE
public static final String USER_LIMIT_REACHED
protected String parentPageTitle
protected String parentPageSpaceKey
protected Page parentPage
protected long parentPageId
protected String newSpaceKey
protected String parentPageString
protected DraftManager draftManager
protected DraftService draftService
protected long targetId
protected CaptchaManager captchaManager
protected NotificationManager notificationManager
protected PageService pageService
protected CollaborativeEditingHelper collaborativeEditingHelper
protected DraftsTransitionHelper draftsTransitionHelper
protected HeartbeatManager heartbeatManager
@Deprecated public static final String DISCARD_CANCEL_RESULT
@Deprecated public static final String CLOSE_CANCEL_RESULT
public void setParentPageId(long parentPageId)
public long getParentPageId()
public Page getParentPage()
protected List<String> getPermissionTypes()
getPermissionTypes
in class AbstractPageAction
protected void validateDuplicatePageTitle()
public void validate()
AbstractPreviewPageAction
validate
in interface MessageHolderAware
validate
in interface com.opensymphony.xwork.Validateable
validate
in class AbstractPreviewPageAction
protected MovePageCommand getMovePageCommand()
public void setShowDraftMessage(boolean showDraftMessage)
public abstract String getContentType()
public long getFromPageId()
@Internal public boolean startHeartbeatOnDoDefault()
public String doDefault() throws Exception
ConfluenceActionSupport
doDefault
in class ConfluenceActionSupport
Exception
- if something goes wrong@Deprecated protected Draft createDraft()
protected boolean hasDraftPermission()
public boolean isNewAbstractPage()
public boolean isCollaborativeContent()
isCollaborativeContent
in class AbstractPageAwareAction
@Deprecated public void setAutomaticWatchIfRequired()
public void setTitle(String title)
public String getParentPageTitle()
public void setParentPageTitle(String parentPageTitle)
public String getParentPageSpaceKey()
public void setParentPageSpaceKey(String parentPageSpaceKey)
public ContentPermission getCurrentEditPermission()
public ContentPermission getCurrentViewPermission()
public boolean hasSetPagePermissionsPermission()
public List getViewInheritedContentPermissionSets()
public void setLabelsString(String labelsString)
public String getLabelsString()
public String getNewSpaceKey()
public void setNewSpaceKey(String newSpaceKey)
public String getParentPageString()
public void setParentPageString(String parentPageString)
public void setDraftManager(DraftManager draftManager)
public void setDraftService(DraftService draftService)
public boolean isShowDraftMessage()
public void setUseDraft(boolean useDraft)
public String getTitle()
getTitle
in class AbstractPageAwareAction
@Deprecated public Draft getDraft()
getDraftAsCEO()
@Deprecated public ContentEntityObject getDraftAsCEO()
getContentDraft()
public AbstractPage getContentDraft()
public Draft getExistingDraft()
public long getExistingDraftId()
public long getDraftId()
public String getDraftShareId()
public void setDraftShareId(String draftShareId)
public String getSyncRev()
public String getConfluenceRevision()
public String getSynchronyRevisionSource()
protected AbstractPage getContentObject()
public void setSyncRev(String syncRev)
public long getEntityId()
public void setDraftId(long draftId)
public WebInterfaceContext getWebInterfaceContext()
WebInterface
Typically, WebWork actions will implement this to provide extra details in the context such as content objects, and so on.
getWebInterfaceContext
in interface WebInterface
getWebInterfaceContext
in class AbstractPageAction
public String getCancelResult()
getCancelResult
in class ConfluenceActionSupport
protected void setPermissions(List<ContentPermission> permissions)
public void setPosition(String position)
public void setTargetId(String targetId)
protected String getPosition()
protected long getTargetId()
public CaptchaManager getCaptchaManager()
public void setCaptchaManager(CaptchaManager captchaManager)
public void setNotificationManager(NotificationManager notificationManager)
public NotificationManager getNotificationManager()
public void setPageService(PageService pageService)
public void setSpaceService(SpaceService spaceService)
public boolean isUseDraft()
public boolean isRestricted()
protected List<Label> getLabels()
getLabels
in class AbstractPageAction
public void setCollaborativeEditingHelper(CollaborativeEditingHelper collaborativeEditingHelper)
@Deprecated public void setSharedDraftsDarkFeatureHelper(SharedDraftsDarkFeatureHelper helper)
setCollaborativeEditingHelper(CollaborativeEditingHelper)
and
CollaborativeEditingHelper
helper
- public CollaborativeEditingHelper getCollaborativeEditingHelper()
public void setDraftsTransitionHelper(DraftsTransitionHelper draftsTransitionHelper)
public void setHeartbeatManager(HeartbeatManager heartbeatManager)
Copyright © 2003–2017 Atlassian. All rights reserved.