com.atlassian.confluence.plugins.editorloader
Class EditorAction

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
                              extended by com.atlassian.confluence.plugins.editorloader.EditorAction
All Implemented Interfaces:
Beanable, PageAware, TinyUrlAware, WebInterface, CaptchaAware, SpaceAware, Spaced, BreadcrumbAware, MessageHolderAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, java.io.Serializable

public class EditorAction
extends AbstractCreateAndEditPageAction
implements SpaceAware, BreadcrumbAware

See Also:
Serialized Form

Field Summary
protected  BreadcrumbGenerator breadcrumbGenerator
           
protected  java.lang.String editPermissionsGroups
           
protected  java.lang.String editPermissionsUsers
           
protected  NotificationManager notificationManager
           
protected  java.lang.String viewPermissionsGroups
           
protected  java.lang.String viewPermissionsUsers
           
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
captchaManager, CLOSE_CANCEL_RESULT, DISCARD_CANCEL_RESULT, draftManager, draftService, newSpaceKey, pageService, parentPageId, parentPageSpaceKey, parentPageString, parentPageTitle, targetId
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
pageTemplateManager, templateId
 
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
back, bean, formatConverter, 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, 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
 
Constructor Summary
EditorAction()
           
 
Method Summary
 java.lang.String doDefault()
          Default webwork action execution method.
 Breadcrumb getBreadcrumb()
          Returns the breadcrumb to be shown when the action is accessed.
 java.lang.String getContentType()
          Returns the content type being created or edited.
 java.lang.String getEditPermissionsGroups()
           
 java.lang.String getEditPermissionsUsers()
           
 java.lang.String getMode()
           
 Space getSpace()
           
 java.lang.String getViewPermissionsGroups()
           
 java.lang.String getViewPermissionsUsers()
           
 WebInterfaceContext getWebInterfaceContext()
          Returns a context which can be passed to web items when rendering them.
 java.lang.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.
 boolean isPermitted()
          Because this page only returns an editor frame we don't need to check permissions for this action .
 boolean isRestricted()
           
 boolean isSpaceRequired()
          If the action requires that the space be set before being run, then it should return true to this method.
 boolean isUserWatchingPage()
          Returns true if the user is watching the current page.
 boolean isUserWatchingSpace()
          Returns true if the user is watching the page/blog's space for the respective ContentType.
 void setBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator)
           
 void setEditPermissionsGroups(java.lang.String editPermissionsGroups)
           
 void setEditPermissionsUsers(java.lang.String editPermissionsUsers)
           
 void setNotificationManager(NotificationManager notificationManager)
           
 void setSpace(Space space)
          IOC method for setting the space on the action.
 void setViewPermissionsGroups(java.lang.String viewPermissionsGroups)
           
 void setViewPermissionsUsers(java.lang.String viewPermissionsUsers)
           
 
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
createDraft, createEditPermissions, createViewPermissions, getCancelResult, getCaptchaManager, getCurrentEditPermission, getCurrentViewPermission, getDraft, getDraftId, getEditPermissionsSummary, getEntityId, getExistingDraft, getExistingDraftId, getLabelsString, getMovePageCommand, getNewSpaceKey, getNotificationManager, getParentPage, getParentPageId, getParentPageSpaceKey, getParentPageString, getParentPageTitle, getPermissionTypes, getPosition, getTargetId, getTitle, getViewInheritedContentPermissionSets, getViewPermissionsSummary, hasSetPagePermissionsPermission, isNewAbstractPage, isShowDraftMessage, isUseDraft, setAutomaticWatchIfRequired, setCaptchaManager, setDraftId, setDraftManager, setDraftService, setLabelsString, setLabelsString, setNewSpaceKey, setPageService, setParentPageId, setParentPageSpaceKey, setParentPageString, setParentPageTitle, setPermissions, setPosition, setShowDraftMessage, setSpaceService, setTargetId, setTitle, setUseDraft, validate, 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
getBean, getContentForSaving, getConversionContext, getEditorFormattedContent, getInPreview, getRenderContext, getStorageFormat, 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, 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, getSpaceKey, hasViewPagePermission, isLatestVersionRequired, isPageRequired, 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
 
Methods inherited from interface com.atlassian.confluence.spaces.actions.SpaceAware
isViewPermissionRequired
 

Field Detail

notificationManager

protected NotificationManager notificationManager

viewPermissionsGroups

protected java.lang.String viewPermissionsGroups

viewPermissionsUsers

protected java.lang.String viewPermissionsUsers

editPermissionsGroups

protected java.lang.String editPermissionsGroups

editPermissionsUsers

protected java.lang.String editPermissionsUsers

breadcrumbGenerator

protected BreadcrumbGenerator breadcrumbGenerator
Constructor Detail

EditorAction

public EditorAction()
Method Detail

doDefault

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

Overrides:
doDefault in class AbstractCreateAndEditPageAction
Returns:
the action result
Throws:
java.lang.Exception - if something goes wrong

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 AbstractCreateAndEditPageAction

getWysiwygContent

public java.lang.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

isRestricted

public boolean isRestricted()
Overrides:
isRestricted in class AbstractCreateAndEditPageAction

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 java.lang.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 java.lang.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

setNotificationManager

public void setNotificationManager(NotificationManager notificationManager)
Overrides:
setNotificationManager in class AbstractCreateAndEditPageAction

getViewPermissionsGroups

public java.lang.String getViewPermissionsGroups()
Overrides:
getViewPermissionsGroups in class AbstractCreateAndEditPageAction

setViewPermissionsGroups

public void setViewPermissionsGroups(java.lang.String viewPermissionsGroups)
Overrides:
setViewPermissionsGroups in class AbstractCreateAndEditPageAction

getViewPermissionsUsers

public java.lang.String getViewPermissionsUsers()
Overrides:
getViewPermissionsUsers in class AbstractCreateAndEditPageAction

setViewPermissionsUsers

public void setViewPermissionsUsers(java.lang.String viewPermissionsUsers)
Overrides:
setViewPermissionsUsers in class AbstractCreateAndEditPageAction

getEditPermissionsGroups

public java.lang.String getEditPermissionsGroups()
Overrides:
getEditPermissionsGroups in class AbstractCreateAndEditPageAction

setEditPermissionsGroups

public void setEditPermissionsGroups(java.lang.String editPermissionsGroups)
Overrides:
setEditPermissionsGroups in class AbstractCreateAndEditPageAction

getEditPermissionsUsers

public java.lang.String getEditPermissionsUsers()
Overrides:
getEditPermissionsUsers in class AbstractCreateAndEditPageAction

setEditPermissionsUsers

public void setEditPermissionsUsers(java.lang.String editPermissionsUsers)
Overrides:
setEditPermissionsUsers 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


Copyright © 2003-2014 Atlassian. All Rights Reserved.