com.atlassian.confluence.pages.actions
Class AbstractCreateAndEditPageAction
java.lang.Object
com.opensymphony.xwork.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.pages.actions.AbstractPageAwareAction
com.atlassian.confluence.pages.actions.AbstractPageAction
com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
- All Implemented Interfaces:
- Beanable, PageAware, TinyUrlAware, WebInterface, CaptchaAware, MessageHolderAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, java.io.Serializable
- Direct Known Subclasses:
- AbstractCreatePageAction, AbstractEditPageAction, EditorAction
public abstract class AbstractCreateAndEditPageAction
- extends AbstractTemplatePageAction
- implements CaptchaAware
- See Also:
- Serialized Form
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 |
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, isPermitted, isViewPermissionRequired, setContentPermissionManager, setPage, 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, 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, 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 |
parentPageTitle
protected java.lang.String parentPageTitle
parentPageSpaceKey
protected java.lang.String parentPageSpaceKey
parentPageId
protected long parentPageId
viewPermissionsGroups
protected java.lang.String viewPermissionsGroups
viewPermissionsUsers
protected java.lang.String viewPermissionsUsers
editPermissionsGroups
protected java.lang.String editPermissionsGroups
editPermissionsUsers
protected java.lang.String editPermissionsUsers
newSpaceKey
protected java.lang.String newSpaceKey
parentPageString
protected java.lang.String parentPageString
draftManager
protected DraftManager draftManager
draftService
protected DraftService draftService
targetId
protected long targetId
captchaManager
protected CaptchaManager captchaManager
notificationManager
protected NotificationManager notificationManager
pageService
protected PageService pageService
DISCARD_CANCEL_RESULT
public static final java.lang.String DISCARD_CANCEL_RESULT
- See Also:
- Constant Field Values
CLOSE_CANCEL_RESULT
public static final java.lang.String CLOSE_CANCEL_RESULT
- See Also:
- Constant Field Values
AbstractCreateAndEditPageAction
public AbstractCreateAndEditPageAction()
setParentPageId
public void setParentPageId(long parentPageId)
getParentPageId
public long getParentPageId()
getParentPage
public Page getParentPage()
getPermissionTypes
protected java.util.List<java.lang.String> getPermissionTypes()
- Overrides:
getPermissionTypes
in class AbstractPageAction
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.xwork.Validateable
- Overrides:
validate
in class AbstractPreviewPageAction
getMovePageCommand
protected MovePageCommand getMovePageCommand()
setShowDraftMessage
public void setShowDraftMessage(boolean showDraftMessage)
getContentType
public abstract java.lang.String getContentType()
- Returns the content type being created or edited.
e.g. "page", "blogpost"
doDefault
public java.lang.String doDefault()
throws java.lang.Exception
- Description copied from class:
ConfluenceActionSupport
- Default webwork action execution method.
- Overrides:
doDefault
in class ConfluenceActionSupport
- Returns:
- the action result
- Throws:
java.lang.Exception
- if something goes wrong
createDraft
protected Draft createDraft()
isNewAbstractPage
public boolean isNewAbstractPage()
setAutomaticWatchIfRequired
public void setAutomaticWatchIfRequired()
setTitle
public void setTitle(java.lang.String title)
getParentPageTitle
public java.lang.String getParentPageTitle()
setParentPageTitle
public void setParentPageTitle(java.lang.String parentPageTitle)
getParentPageSpaceKey
public java.lang.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(java.lang.String parentPageSpaceKey)
getCurrentEditPermission
public ContentPermission getCurrentEditPermission()
getCurrentViewPermission
public ContentPermission getCurrentViewPermission()
hasSetPagePermissionsPermission
public boolean hasSetPagePermissionsPermission()
createViewPermissions
@Deprecated
protected java.util.List<ContentPermission> createViewPermissions()
- Deprecated. since 3.1. Use a
PagePermissionsActionHelper
in your Action.
createEditPermissions
@Deprecated
protected java.util.List<ContentPermission> createEditPermissions()
- Deprecated. since 3.1. Use a
PagePermissionsActionHelper
in your Action.
getViewInheritedContentPermissionSets
public java.util.List getViewInheritedContentPermissionSets()
setLabelsString
public void setLabelsString(java.lang.String labelsString)
setLabelsString
public void setLabelsString(java.util.List<Label> labels)
getLabelsString
public java.lang.String getLabelsString()
getNewSpaceKey
public java.lang.String getNewSpaceKey()
setNewSpaceKey
public void setNewSpaceKey(java.lang.String newSpaceKey)
getParentPageString
public java.lang.String getParentPageString()
setParentPageString
public void setParentPageString(java.lang.String parentPageString)
setDraftManager
public void setDraftManager(DraftManager draftManager)
setDraftService
public void setDraftService(DraftService draftService)
isShowDraftMessage
public boolean isShowDraftMessage()
setUseDraft
public void setUseDraft(boolean useDraft)
getTitle
public java.lang.String getTitle()
- Overrides:
getTitle
in class AbstractPageAwareAction
getDraft
public Draft getDraft()
- 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.
getEntityId
public long getEntityId()
setDraftId
public void setDraftId(long draftId)
getWebInterfaceContext
public WebInterfaceContext getWebInterfaceContext()
- Description copied from interface:
WebInterface
- Returns a context which can be passed to web items when rendering them.
Typically, WebWork actions will implement this to provide extra details in the context such as content objects, and so on.
- Specified by:
getWebInterfaceContext
in interface WebInterface
- Overrides:
getWebInterfaceContext
in class AbstractPageAction
getCancelResult
public java.lang.String getCancelResult()
- Overrides:
getCancelResult
in class ConfluenceActionSupport
getViewPermissionsGroups
public java.lang.String getViewPermissionsGroups()
setViewPermissionsGroups
public void setViewPermissionsGroups(java.lang.String viewPermissionsGroups)
getViewPermissionsUsers
public java.lang.String getViewPermissionsUsers()
setViewPermissionsUsers
public void setViewPermissionsUsers(java.lang.String viewPermissionsUsers)
getEditPermissionsGroups
public java.lang.String getEditPermissionsGroups()
setEditPermissionsGroups
public void setEditPermissionsGroups(java.lang.String editPermissionsGroups)
getEditPermissionsUsers
public java.lang.String getEditPermissionsUsers()
setEditPermissionsUsers
public void setEditPermissionsUsers(java.lang.String editPermissionsUsers)
getViewPermissionsSummary
public java.lang.String getViewPermissionsSummary()
getEditPermissionsSummary
public java.lang.String getEditPermissionsSummary()
setPermissions
protected void setPermissions(java.util.List<ContentPermission> permissions)
setPosition
public void setPosition(java.lang.String position)
setTargetId
public void setTargetId(java.lang.String targetId)
getPosition
protected java.lang.String getPosition()
getTargetId
protected long getTargetId()
getCaptchaManager
public CaptchaManager getCaptchaManager()
setCaptchaManager
public void setCaptchaManager(CaptchaManager captchaManager)
setNotificationManager
public void setNotificationManager(NotificationManager notificationManager)
getNotificationManager
public NotificationManager getNotificationManager()
setPageService
public void setPageService(PageService pageService)
setSpaceService
public void setSpaceService(SpaceService spaceService)
isUseDraft
public boolean isUseDraft()
isRestricted
public boolean isRestricted()
Copyright © 2003-2014 Atlassian. All Rights Reserved.