com.atlassian.confluence.plugins.templates.actions
Class AbstractPageTemplateAction
java.lang.Object
com.opensymphony.xwork.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.spaces.actions.AbstractSpaceAction
com.atlassian.confluence.plugins.templates.actions.AbstractPageTemplateAction
- All Implemented Interfaces:
- WebInterface, 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
- Direct Known Subclasses:
- AbstractEditPageTemplateAction, EditPageTemplateDescriptionAction, ListPageTemplatesAction, RemovePageTemplateAction, ViewPageTemplateAction
public abstract class AbstractPageTemplateAction
- extends AbstractSpaceAction
- implements BreadcrumbAware
- 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, PREVIEW, 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.spaces.actions.AbstractSpaceAction |
getKey, getPermissionTypes, getSpace, getSpaceKey, getSubscribableName, getThemeManager, hasSpaceIA, isAdminUser, isPersonalSpace, isSuperUser, isUserWatchingSpace, isValidSpaceKey, setKey, setNotificationManager, setSpace, setSpaceManager, setThemeManager, setWikiStyleRenderer |
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getCancel, getCancelResult, getContext, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getHelper, 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, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, 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 |
pageTemplateManager
protected PageTemplateManager pageTemplateManager
pageTemplate
protected PageTemplate pageTemplate
entityId
protected long entityId
originalPageTemplate
protected PageTemplate originalPageTemplate
labelsString
protected java.lang.String labelsString
breadcrumbGenerator
protected BreadcrumbGenerator breadcrumbGenerator
AbstractPageTemplateAction
public AbstractPageTemplateAction()
validate
public void validate()
- Ensure that the size of the labels associated with the template are less than the column
size for storing them (255).
- Specified by:
validate
in interface MessageHolderAware
- Specified by:
validate
in interface com.opensymphony.xwork.Validateable
- Overrides:
validate
in class com.opensymphony.xwork.ActionSupport
setBreadcrumbGenerator
public void setBreadcrumbGenerator(BreadcrumbGenerator breadcrumbGenerator)
setPageTemplateManager
public void setPageTemplateManager(PageTemplateManager pageTemplateManager)
getEntityId
public long getEntityId()
setEntityId
public void setEntityId(long entityId)
getDraftId
public long getDraftId()
setDraftId
public void setDraftId(long draftId)
getPageTemplate
public PageTemplate getPageTemplate()
getPageTemplateByName
public PageTemplate getPageTemplateByName(java.lang.String name)
getLabelsString
public java.lang.String getLabelsString()
- Returns:
- the label String that has been set on the action. If there is none then return the label
String from the pageTemplate if one has been set.
setLabelsString
public void setLabelsString(java.lang.String labelsString)
getLabels
public java.util.List<Label> getLabels()
setLabels
protected void setLabels(java.util.List<Label> labels)
isPermitted
public boolean isPermitted()
- We should really be splitting up each of the template actions (create, edit, list) and getting them to implement
SpaceAdministrative or Administrative to enforce space or global permissions.
We will determine the permission type required based on the type of template being served or modified
If the template id does not exist (ie when we are browsing templates, use the space key to determine permissions
- Overrides:
isPermitted
in class AbstractSpaceAction
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 ConfluenceActionSupport
globalTemplateSuffix
protected java.lang.String globalTemplateSuffix()
- Returns:
- returns "-global" if the spacekey is _not_ set, empty string otherwise.
Use this suffix to create action results that differentiate between global templates and space templates.
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.