com.atlassian.confluence.pages.templates.actions
Class AbstractPageTemplateAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.confluence.core.ConfluenceActionSupport
          extended by com.atlassian.confluence.spaces.actions.AbstractSpaceAction
              extended by com.atlassian.confluence.pages.templates.actions.AbstractPageTemplateAction
All Implemented Interfaces:
WebInterface, Spaced, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, Serializable
Direct Known Subclasses:
AbstractEditPageTemplateAction, ListPageTemplatesAction, RemovePageTemplateAction, ViewPageTemplateAction

public abstract class AbstractPageTemplateAction
extends AbstractSpaceAction

Version:
Revision: 1.1.1.1 $
Author:
Ara Abrahamian (ara_e_w@yahoo.com)
See Also:
Serialized Form

Field Summary
protected  String labelsString
           
protected  PageTemplate originalPageTemplate
           
protected  PageTemplate pageTemplate
           
protected  long pageTemplateId
           
protected  PageTemplateManager pageTemplateManager
           
 
Fields inherited from class com.atlassian.confluence.spaces.actions.AbstractSpaceAction
key, notificationManager, originalSpace, space, spaceManager, wikiStyleRenderer
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, 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
 
Constructor Summary
AbstractPageTemplateAction()
           
 
Method Summary
 String getLabelsString()
           
 PageTemplate getPageTemplate()
           
 PageTemplate getPageTemplateByName(String name)
           
 long getPageTemplateId()
           
 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.
 void setLabelsString(String labelsString)
           
 void setPageTemplateId(long pageTemplateId)
           
 void setPageTemplateManager(PageTemplateManager pageTemplateManager)
           
 void validate()
          Ensure that the size of the labels associated with the template are less than the column size for storing them (255).
 
Methods inherited from class com.atlassian.confluence.spaces.actions.AbstractSpaceAction
getKey, getPermissionTypes, getSpace, getSpaceKey, getSubscribableName, isAdminUser, isPersonalSpace, isSuperUser, isUserWatchingSpace, isValidSpaceKey, setKey, setNotificationManager, setSpace, setSpaceManager, setWikiStyleRenderer
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getActionName, getBootstrapManager, getCancelResult, getContext, getDateFormatter, getDefaultResourceBundle, getDocLink, getEventManager, getFriendlyDateFormatter, getGlobalSettings, getHelper, 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, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermittedAsString, isPrintableVersion, isSharedMode, isUserStatusPluginEnabled, isUsingHSQL, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, 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

pageTemplateManager

protected PageTemplateManager pageTemplateManager

pageTemplate

protected PageTemplate pageTemplate

pageTemplateId

protected long pageTemplateId

originalPageTemplate

protected PageTemplate originalPageTemplate

labelsString

protected String labelsString
Constructor Detail

AbstractPageTemplateAction

public AbstractPageTemplateAction()
Method Detail

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

setPageTemplateManager

public void setPageTemplateManager(PageTemplateManager pageTemplateManager)

getPageTemplateId

public long getPageTemplateId()

setPageTemplateId

public void setPageTemplateId(long pageTemplateId)

getPageTemplate

public PageTemplate getPageTemplate()

getPageTemplateByName

public PageTemplate getPageTemplateByName(String name)

getLabelsString

public 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(String labelsString)

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


Copyright © 2003-2011 Atlassian. All Rights Reserved.