Class PageVariablesAction
- 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
-
- com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
-
- com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
-
- com.atlassian.confluence.pages.actions.AbstractCreatePageAction
-
- com.atlassian.confluence.pages.actions.CreatePageAction
-
- com.atlassian.confluence.pages.actions.PageVariablesAction
-
- All Implemented Interfaces:
Beanable
,PageAware
,TinyUrlAware
,WebInterface
,CaptchaAware
,Spaced
,BreadcrumbAware
,MessageHolderAware
,com.opensymphony.xwork2.Action
,com.opensymphony.xwork2.interceptor.ValidationAware
,com.opensymphony.xwork2.LocaleProvider
,com.opensymphony.xwork2.TextProvider
,com.opensymphony.xwork2.Validateable
,Serializable
public class PageVariablesAction extends CreatePageAction
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.confluence.pages.actions.CreatePageAction
CreatePageAction.SimplePageProvider
-
-
Field Summary
Fields Modifier and Type Field Description static String
HTML_MACRO_XHTML_MODULE_KEY
-
Fields inherited from class com.atlassian.confluence.pages.actions.CreatePageAction
pageProvider
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractCreatePageAction
attachmentManager, breadcrumbGenerator, contextProvider, INPUT_VARIABLES, originalReferrer, space, themeManager
-
Fields inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
ACTIVITY_UNAVAILABLE, captchaManager, collaborativeEditingHelper, draftManager, draftService, draftsTransitionHelper, heartbeatManager, LOCKED, movePageCommandHelper, newSpaceKey, notificationManager, pageService, parentPage, parentPageId, parentPageSpaceKey, parentPageString, parentPageTitle, targetId, USER_LIMIT_REACHED
-
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
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 PageVariablesAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
doEnter()
String
execute()
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
getRenderedTemplateContent()
get rendered template content 1) manually injected script in renderedTemplateContent will be removed to avoid XSS 2) script from html macro will be parsed according to the specified template ID and will be added to renderedTemplateContentList
getTemplateVariables()
DefaultWebInterfaceContext
getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.boolean
isPermitted()
This action is being used to set up the content for the CreatePageAction, so the permissions test is not needed (and doesn't work, as the final space the page will be created in hasn't been chosen yet)boolean
isTemplateApplied()
void
setEditorFormatService(EditorFormatService editorFormatService)
Deprecated.since 5.10.void
setFormatConverter(FormatConverter formatConverter)
void
setRenderedContentCleaner(RenderedContentCleaner renderedContentCleaner)
void
setRenderedTemplateContent(String renderedTemplateContent)
void
setTemplateApplied(boolean templateApplied)
void
setXhtmlContent(XhtmlContent xhtmlContent)
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.CreatePageAction
assignParentPage, assignSpace, createCommand, createDraft, createPage, doDefault, doTemplateDefault, getCommandActionHelper, getCreatedAbstractPage, getInheritedViewPermissions, getLinkCreation, getPageToCreate, initialiseProvider, populateParentPageTitleField, setEncodedTitle, setLinkCreation
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractCreatePageAction
afterAdd, beforeAdd, doAdd, getAttachmentSourceContent, getBreadcrumb, getCancelRedirectUrl, getCancelResult, getContentBreadcrumb, getContentType, getFromPage, getFromPageId, getNewSpace, getOriginalReferrer, getQueryString, getSpace, getSpaceKey, hasSetPagePermissionsPermission, isPageRequired, populateContextProvider, setAttachmentManager, setBreadcrumbGenerator, setFromPage, setFromPageId, setOriginalReferrer, setQueryString, setSpaceKey, setThemeManager, setTitleWritten, transferDraftAttachments
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
getCaptchaManager, getCollaborativeEditingHelper, getConfluenceRevision, getContentDraft, getContentObject, getCurrentEditPermission, getCurrentViewPermission, getDraft, getDraftAsCEO, getDraftId, getDraftShareId, getEntityId, getExistingDraft, getExistingDraftId, getLabelsString, getMovePageCommand, getNewSpaceKey, getNotificationManager, getParentPage, getParentPageId, getParentPageSpaceKey, getParentPageString, getParentPageTitle, getPermissionTypes, getPosition, getSynchronyRevisionSource, getSyncRev, getTargetId, getTitle, getViewInheritedContentPermissionSets, hasDraftPermission, isCollaborativeContent, isNewAbstractPage, isRestricted, isShowDraftMessage, isUseDraft, setCaptchaManager, setCollaborativeEditingHelper, setDraftId, setDraftManager, setDraftService, setDraftShareId, setDraftsTransitionHelper, setHeartbeatManager, setLabelsString, setLabelsString, setMovePageCommandHelper, setNewSpaceKey, setNotificationManager, setPageService, setParentPageId, setParentPageSpaceKey, setParentPageString, setParentPageTitle, setPermissions, setPosition, setShowDraftMessage, setSpaceService, setSyncRev, setTargetId, setTitle, setUseDraft, startHeartbeatOnDoDefault, 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, getWysiwygContent, getxHtmlContent, setBack, setInPreview, setPreview, setWikiStyleRenderer, setWysiwygContent, updateXHtmlContent
-
Methods inherited from class com.atlassian.confluence.pages.actions.AbstractPageAction
displayDatePath, getAvailableSpaces, getBeanKey, getBlogPost, getEditorVersion, getHelper, getIncomingLinks, getMode, getNextPost, getNumberOfAttachmentsAsString, getNumberOfLabelsAsString, getPermittedChildren, getPostingDate, getPostingDay, getPostingTime, getPreviousPost, getPreviousVersion, getSpaceManager, getSuggestedLabels, getTinyUrl, 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, isLatestVersionRequired, isViewPermissionRequired, setContentPermissionManager, setPage, setSpaceManager
-
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getBootstrapStatusProvider, getCancel, 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, 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.atlassian.confluence.security.CaptchaAware
mustValidateCaptcha
-
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.pages.actions.PageAware
isEditPermissionRequired
-
-
-
-
Field Detail
-
HTML_MACRO_XHTML_MODULE_KEY
public static final String HTML_MACRO_XHTML_MODULE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTemplateVariables
public List getTemplateVariables() throws XhtmlException
- Throws:
XhtmlException
-
execute
@XsrfProtectionExcluded public String execute() throws Exception
- Specified by:
execute
in interfacecom.opensymphony.xwork2.Action
- Overrides:
execute
in classcom.opensymphony.xwork2.ActionSupport
- Throws:
Exception
-
getLabels
protected List<Label> getLabels()
Description copied from class:AbstractCreateAndEditPageAction
Metadata is now retrieved from the existing page, if it exists, otherwise it is stored on the draft (i.e. if the draft has never been published)- Overrides:
getLabels
in classAbstractCreateAndEditPageAction
- Returns:
- List of labels visible to the current user
-
getWebInterfaceContext
public DefaultWebInterfaceContext getWebInterfaceContext()
Description copied from interface:WebInterface
Returns a context which can be passed to web items when rendering them.Typically, Struts actions will implement this to provide extra details in the context such as content objects, and so on.
- Specified by:
getWebInterfaceContext
in interfaceWebInterface
- Overrides:
getWebInterfaceContext
in classAbstractCreateAndEditPageAction
-
getRenderedTemplateContent
public String getRenderedTemplateContent()
get rendered template content 1) manually injected script in renderedTemplateContent will be removed to avoid XSS 2) script from html macro will be parsed according to the specified template ID and will be added to renderedTemplateContent
-
setRenderedTemplateContent
public void setRenderedTemplateContent(String renderedTemplateContent)
-
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 interfaceMessageHolderAware
- Specified by:
validate
in interfacecom.opensymphony.xwork2.Validateable
- Overrides:
validate
in classCreatePageAction
-
isPermitted
public boolean isPermitted()
This action is being used to set up the content for the CreatePageAction, so the permissions test is not needed (and doesn't work, as the final space the page will be created in hasn't been chosen yet)- Overrides:
isPermitted
in classCreatePageAction
-
isTemplateApplied
public boolean isTemplateApplied()
-
setTemplateApplied
public void setTemplateApplied(boolean templateApplied)
-
setEditorFormatService
@Deprecated public void setEditorFormatService(EditorFormatService editorFormatService)
Deprecated.since 5.10. Unused.
-
setXhtmlContent
public void setXhtmlContent(XhtmlContent xhtmlContent)
-
setFormatConverter
public void setFormatConverter(FormatConverter formatConverter)
- Overrides:
setFormatConverter
in classAbstractPreviewPageAction
-
setRenderedContentCleaner
public void setRenderedContentCleaner(RenderedContentCleaner renderedContentCleaner)
-
-