com.atlassian.confluence.pages.actions
Class AbstractCreateAndEditPageAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.confluence.core.ConfluenceActionSupport
          extended by com.atlassian.confluence.pages.actions.AbstractPageAwareAction
              extended by com.atlassian.confluence.pages.actions.AbstractPageAction
                  extended by com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
                      extended by com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
                          extended by com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
All Implemented Interfaces:
PageAware, TinyUrlAware, WebInterface, CaptchaAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, Serializable
Direct Known Subclasses:
AbstractCreatePageAction, AbstractEditPageAction

public abstract class AbstractCreateAndEditPageAction
extends AbstractTemplatePageAction
implements CaptchaAware

See Also:
Serialized Form

Field Summary
protected  CaptchaManager captchaManager
           
protected  DraftManager draftManager
           
protected  DraftService draftService
           
protected  String editPermissionsGroups
           
protected  String editPermissionsUsers
           
protected  String newSpaceKey
           
protected  NotificationManager notificationManager
           
protected  PageService pageService
           
protected  long parentPageId
           
protected  String parentPageSpaceKey
           
protected  String parentPageString
           
protected  String parentPageTitle
           
protected  long targetId
           
protected  String viewPermissionsGroups
           
protected  String viewPermissionsUsers
           
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
pageTemplateManager, templateId
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
back, editConverter, editRenderer, inPreview, preview, storageFormat, wikiStyleRenderer, wysiwygContent
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
incomingLinks, linkManager, pageManager, PREVIEW, RICHTEXT, viewRenderer, wysiwygConverter
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
contentPermissionManager, spaceManager
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, 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
 
Constructor Summary
AbstractCreateAndEditPageAction()
           
 
Method Summary
protected  List<ContentPermission> createEditPermissions()
          Deprecated. since 3.1. Use a PagePermissionsActionHelper in your Action.
protected  List<ContentPermission> createViewPermissions()
          Deprecated. since 3.1. Use a PagePermissionsActionHelper in your Action.
 String doDefault()
          Default webwork action execution method.
 String getCancelResult()
           
 CaptchaManager getCaptchaManager()
           
abstract  String getContentType()
          Returns the content type being created or edited.
 ContentPermission getCurrentEditPermission()
           
 ContentPermission getCurrentViewPermission()
           
 Draft getDraft()
          Return the current draft in use if there is one or null otherwise.
 long getDraftId()
          Return the id of the current draft in use if there is one or 0 otherwise.
 String getEditPermissionsGroups()
           
 String getEditPermissionsSummary()
           
 String getEditPermissionsUsers()
           
 long getEntityId()
           
 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()
           
protected  long getTargetId()
           
 String getTitle()
           
 List getViewInheritedContentPermissionSets()
           
 String getViewPermissionsGroups()
           
 String getViewPermissionsSummary()
           
 String getViewPermissionsUsers()
           
 WebInterfaceContext getWebInterfaceContext()
          Returns a context which can be passed to web items when rendering them.
 boolean hasSetPagePermissionsPermission()
           
 boolean isRestricted()
           
 boolean isShowDraftMessage()
           
 boolean isUseDraft()
           
 void setAutomaticWatchIfRequired()
           
 void setCaptchaManager(CaptchaManager captchaManager)
           
 void setContentChanged(boolean contentChanged)
           
 void setDiscardDraft(boolean discardDraft)
           
 void setDraftId(long draftId)
           
 void setDraftManager(DraftManager draftManager)
           
 void setDraftService(DraftService draftService)
           
 void setEditPermissionsGroups(String editPermissionsGroups)
           
 void setEditPermissionsUsers(String editPermissionsUsers)
           
 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 setShowDraftMessage(boolean showDraftMessage)
           
 void setSpaceService(SpaceService spaceService)
           
 void setTargetId(String targetId)
           
 void setTitle(String title)
           
 void setUseDraft(boolean useDraft)
           
 void setViewPermissionsGroups(String viewPermissionsGroups)
           
 void setViewPermissionsUsers(String viewPermissionsUsers)
           
 void validate()
          Convert the editor content to storageFormat, catching and reporting any problems in the process.
protected  void validateDuplicatePageTitle()
           
 
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
getGlobalPageTemplates, getPageTemplate, getSpacePageTemplates, getTemplateId, isPageTemplatesAvailable, loadTemplates, setPageTemplateManager, setTemplateId
 
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
getContentForSaving, getEditorFormattedContent, getInPreview, getStorageFormat, getWysiwygContent, getxHtmlContent, setBack, setEditConverter, setEditRenderer, 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, 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
getPage, getPageId, getSpace, getSpaceKey, hasViewPagePermission, isLatestVersionRequired, isPageRequired, isPermitted, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManager
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addFieldError, addPermissionTypeTo, addToHistory, formatFriendlyDate, getActionName, getActionName, getBootstrapManager, getContext, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, 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
 

Field Detail

parentPageTitle

protected String parentPageTitle

parentPageSpaceKey

protected String parentPageSpaceKey

parentPageId

protected long parentPageId

viewPermissionsGroups

protected String viewPermissionsGroups

viewPermissionsUsers

protected String viewPermissionsUsers

editPermissionsGroups

protected String editPermissionsGroups

editPermissionsUsers

protected String editPermissionsUsers

newSpaceKey

protected String newSpaceKey

parentPageString

protected 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
Constructor Detail

AbstractCreateAndEditPageAction

public AbstractCreateAndEditPageAction()
Method Detail

setParentPageId

public void setParentPageId(long parentPageId)

getParentPageId

public long getParentPageId()

getParentPage

public Page getParentPage()

getPermissionTypes

protected List<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 com.opensymphony.xwork.Validateable
Overrides:
validate in class AbstractPreviewPageAction

getMovePageCommand

protected MovePageCommand getMovePageCommand()

setShowDraftMessage

public void setShowDraftMessage(boolean showDraftMessage)

getContentType

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


doDefault

public String doDefault()
                 throws Exception
Description copied from class: ConfluenceActionSupport
Default webwork action execution method.

Overrides:
doDefault in class ConfluenceActionSupport
Returns:
the action result
Throws:
Exception - if something goes wrong

setAutomaticWatchIfRequired

public void setAutomaticWatchIfRequired()

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)

getCurrentEditPermission

public ContentPermission getCurrentEditPermission()

getCurrentViewPermission

public ContentPermission getCurrentViewPermission()

hasSetPagePermissionsPermission

public boolean hasSetPagePermissionsPermission()

createViewPermissions

@Deprecated
protected List<ContentPermission> createViewPermissions()
Deprecated. since 3.1. Use a PagePermissionsActionHelper in your Action.


createEditPermissions

@Deprecated
protected List<ContentPermission> createEditPermissions()
Deprecated. since 3.1. Use a PagePermissionsActionHelper in your Action.


getViewInheritedContentPermissionSets

public List getViewInheritedContentPermissionSets()

setLabelsString

public void setLabelsString(String labelsString)

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()

setDiscardDraft

public void setDiscardDraft(boolean discardDraft)

setContentChanged

public void setContentChanged(boolean contentChanged)

setUseDraft

public void setUseDraft(boolean useDraft)

getTitle

public String getTitle()
Overrides:
getTitle in class AbstractPageAwareAction

getDraft

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


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 String getCancelResult()
Overrides:
getCancelResult in class ConfluenceActionSupport

getViewPermissionsGroups

public String getViewPermissionsGroups()

setViewPermissionsGroups

public void setViewPermissionsGroups(String viewPermissionsGroups)

getViewPermissionsUsers

public String getViewPermissionsUsers()

setViewPermissionsUsers

public void setViewPermissionsUsers(String viewPermissionsUsers)

getEditPermissionsGroups

public String getEditPermissionsGroups()

setEditPermissionsGroups

public void setEditPermissionsGroups(String editPermissionsGroups)

getEditPermissionsUsers

public String getEditPermissionsUsers()

setEditPermissionsUsers

public void setEditPermissionsUsers(String editPermissionsUsers)

getViewPermissionsSummary

public String getViewPermissionsSummary()

getEditPermissionsSummary

public String getEditPermissionsSummary()

setPermissions

protected void setPermissions(List<ContentPermission> permissions)

setPosition

public void setPosition(String position)

setTargetId

public void setTargetId(String targetId)

getPosition

protected 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-2011 Atlassian. All Rights Reserved.