Class AbstractPreviewPageAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- com.atlassian.confluence.core.ConfluenceActionSupport
-
- com.atlassian.confluence.pages.actions.AbstractPageAwareAction
-
- com.atlassian.confluence.pages.actions.AbstractPageAction
-
- com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
-
- All Implemented Interfaces:
Beanable
,PageAware
,TinyUrlAware
,WebInterface
,MessageHolderAware
,com.opensymphony.xwork2.Action
,com.opensymphony.xwork2.interceptor.ValidationAware
,com.opensymphony.xwork2.LocaleProvider
,com.opensymphony.xwork2.TextProvider
,com.opensymphony.xwork2.Validateable
,Serializable
- Direct Known Subclasses:
AbstractTemplatePageAction
,AddCommentAction
,EditCommentAction
public abstract class AbstractPreviewPageAction extends AbstractPageAction implements Beanable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
back
Deprecated.since 5.3 (and really much much longer)protected Map
bean
protected FormatConverter
formatConverter
protected boolean
inPreview
Deprecated.since 5.3 (and really much much longer)protected String
preview
Deprecated.since 5.3 (and really much much longer)protected String
storageFormat
The current content in storageFormat ready for saving.protected com.atlassian.renderer.WikiStyleRenderer
wikiStyleRenderer
protected String
wysiwygContent
The editor content.-
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
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, settingsManager, spacePermissionManager, systemInformationService, userAccessor, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractPreviewPageAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
getBean()
protected String
getContentForSaving()
Returns the content that has been submitted as part of a user's attempt to add new content or edit existing content.protected ConversionContext
getConversionContext()
String
getEditorFormattedContent(String storageFormat)
boolean
getInPreview()
Deprecated.since 5.3 (and really much much longer)protected com.atlassian.renderer.RenderContext
getRenderContext()
protected String
getStorageFormat()
String
getWysiwygContent()
Either - return the content entered via the editor (in the case of returning to the edit page due to validation failures or things like that).String
getxHtmlContent()
void
setBack(String back)
Deprecated.since 5.3 (and really much much longer)void
setFormatConverter(FormatConverter formatConverter)
void
setInPreview(boolean inPreview)
Deprecated.since 5.3 (and really much much longer)void
setPreview(String preview)
Deprecated.since 5.3 (and really much much longer)void
setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer)
void
setWysiwygContent(String content)
protected void
updateXHtmlContent()
void
validate()
Convert the editor content to storageFormat, catching and reporting any problems in the process.-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
displayDatePath, getAttachmentSourceContent, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getLabels, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermissionTypes, getPermittedChildren, getPostingDate, getPostingDay, getPostingTime, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, getWebInterfaceContext, hasAttachFilePermissions, hasPermittedChildren, isSpaceAdmin, isSuperUser, isUserWatchingOwnContent, setConfluenceWysiwygConverter, setEditorManager, setLinkManager, setMode, setPageManager, setPostingDate, setPostingTime, setViewRenderer
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
getCustomPageUrl, getFriendlyDateFormatterHelper, getPage, getPageId, getPageUrl, getSpace, getSpaceKey, getTitle, isCollaborativeContent, isLatestVersionRequired, isPageRequired, isPermitted, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManager
-
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getBootstrapStatusProvider, getCancel, getCancelResult, getConfluenceAccessManager, getContentUiSupport, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocBean, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getI18n, getInstalledLanguages, getLabelManager, getLanguageJs, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUserAccessor, getUserByName, getUserFullName, getUserHasBrowseUsersPermission, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPrintableVersion, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setAccessModeService, setApiDateFormatService, setApiPersonService, setBootstrapManager, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, useSkipAccessCheck, withServletRequestSupplier
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.pages.actions.PageAware
isEditPermissionRequired
-
-
-
-
Field Detail
-
formatConverter
protected FormatConverter formatConverter
-
wikiStyleRenderer
protected com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer
-
preview
@Deprecated protected String preview
Deprecated.since 5.3 (and really much much longer)This ancient unused field used to do something when there were full page reloads for going to preview/edit/back
-
back
@Deprecated protected String back
Deprecated.since 5.3 (and really much much longer)This ancient unused field used to do something when there were full page reloads for going to preview/edit/back
-
bean
protected Map bean
-
wysiwygContent
protected String wysiwygContent
The editor content.
-
storageFormat
protected String storageFormat
The current content in storageFormat ready for saving. This is set during the validate call on the action. Anything taking place after validation can assume this field to be populated.
-
inPreview
@Deprecated protected boolean inPreview
Deprecated.since 5.3 (and really much much longer)This ancient unused field used to do something when there were full page reloads for going to preview/edit/back
-
-
Method Detail
-
setInPreview
@Deprecated public void setInPreview(boolean inPreview)
Deprecated.since 5.3 (and really much much longer)This ancient unused method used to do something when there were full page reloads for going to preview/edit/back
-
getInPreview
@Deprecated public boolean getInPreview()
Deprecated.since 5.3 (and really much much longer)This ancient unused method used to do something when there were full page reloads for going to preview/edit/back
-
setPreview
@Deprecated public void setPreview(String preview)
Deprecated.since 5.3 (and really much much longer)This ancient unused method used to do something when there were full page reloads for going to preview/edit/back
-
setBack
@Deprecated public void setBack(String back)
Deprecated.since 5.3 (and really much much longer)This ancient unused method used to do something when there were full page reloads for going to preview/edit/back
-
setWysiwygContent
public void setWysiwygContent(String content)
-
getxHtmlContent
public String getxHtmlContent()
-
setWikiStyleRenderer
public void setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer)
-
setFormatConverter
public void setFormatConverter(FormatConverter formatConverter)
-
updateXHtmlContent
protected void updateXHtmlContent()
-
validate
public void validate()
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 interfaceMessageHolderAware
- Specified by:
validate
in interfacecom.opensymphony.xwork2.Validateable
- Overrides:
validate
in classcom.opensymphony.xwork2.ActionSupport
-
getWysiwygContent
public String getWysiwygContent() throws XhtmlException
Either -- return the content entered via the editor (in the case of returning to the edit page due to validation failures or things like that).
- or set the content from the CEO that is being edited.
- Returns:
- the editor formatted content for the CEO being edited.
- Throws:
XhtmlException
-
getEditorFormattedContent
public String getEditorFormattedContent(String storageFormat)
- Parameters:
storageFormat
- the storage data to be converted for editing.- Returns:
- the supplied storage formatted content in editor format
-
getContentForSaving
protected String getContentForSaving() throws XhtmlParsingException, XhtmlException
Returns the content that has been submitted as part of a user's attempt to add new content or edit existing content. The content is returned in storage format ready for saving.- Returns:
- the content that has been submitted as part of a user's attempt to add new content or edit existing content.
- Throws:
XhtmlParsingException
XhtmlException
-
getRenderContext
protected com.atlassian.renderer.RenderContext getRenderContext()
-
getConversionContext
protected ConversionContext getConversionContext()
-
getStorageFormat
protected String getStorageFormat() throws XhtmlException
- Returns:
- the content that a user has submitted from the editor but converted to storage format.
- Throws:
XhtmlException
-
-