com.atlassian.bamboo.configuration
Class AbstractPermissionAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by com.atlassian.bamboo.ww2.BambooActionSupport
          extended by com.atlassian.bamboo.configuration.AbstractPermissionAction
All Implemented Interfaces:
ErrorCollection, BambooSessionAware, NavigationAware, DomainObjectSecurityAware, GlobalReadSecurityAware, ReturnUrlAware, com.atlassian.core.i18n.I18nTextProvider, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable
Direct Known Subclasses:
BulkEditBuildPermissions, ConfigureBuildPermissions, ConfigureDeploymentProjectPermissions, ConfigureEnvironmentPermissions, ConfigureGlobalPermissions, ConfigureGlobalRepositoryPermissions

public abstract class AbstractPermissionAction
extends BambooActionSupport

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
BambooActionSupport.JSONStatus
 
Field Summary
protected  org.acegisecurity.acls.MutableAcl acl
           
protected  HibernateMutableAclService aclService
           
protected  BambooAclUpdateHelper aclUpdateHelper
           
protected  String addGroupPrincipal
           
protected  String addUserPrincipal
           
protected  long entityId
           
protected  List<String> grantedGroups
           
protected  List<String> grantedPermissions
           
protected  List<String> grantedUsers
           
protected  String newGroup
           
protected  String newUser
           
protected  List<String> nonProcessedGrantedPermissions
           
protected  String principalType
           
static String RESULT_EDIT_PERMISSIONS
           
protected  com.atlassian.user.UserManager userManager
           
 
Fields inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
ACCESS_DENIED, administrationConfigurationAccessor, administrationConfigurationManager, administrationConfigurationPersister, AGGREGATE_URL_PATTERN, bambooPermissionManager, bambooUserManager, BUILD_KEY_CONTEXT, buildDefinitionManager, cachedPlanManager, CONFIRM, cookieCutter, dashboardCachingManager, environmentService, featureManager, PAGE_NOT_FOUND, PLAN_KEY_CONTEXT, planExecutionManager, planManager, pluginAccessor, projectManager, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
AbstractPermissionAction()
           
 
Method Summary
protected  void bulkUpdateAcls(org.acegisecurity.acls.MutableAcl acl, List<String> permissions)
           
 String doAddGroupPrincipal()
           
 String doAddUserPrincipal()
           
 String doCreatePrincipal()
           
 String doInputPrincipal()
           
 String doUpdatePermissions()
           
abstract  org.acegisecurity.acls.MutableAcl getAcl()
           
 String getAddGroupPrincipal()
           
 String getAddUserPrincipal()
           
abstract  Map<String,String> getEditablePermissions()
           
 long getEntityId()
           
abstract  String getEntityName()
           
 List<String> getGrantedGroups()
           
 List<String> getGrantedPermissions()
           
 List<String> getGrantedUsers()
           
 Map<String,String> getGrantedUsersDisplayNames()
           
 String getNewGroup()
           
 String getNewUser()
           
 String getPrincipalType()
           
 boolean hasEditPermissionForGroup(String groupName)
           
 boolean hasEditPermissionForUser(BambooUser user)
           
 boolean hasEditPermissionForUserName(String userName)
           
protected  boolean hasParameters()
           
protected  void populatePermissionLists()
           
protected  String save()
           
protected  String saveAllPermissions()
           
 void setAcl(org.acegisecurity.acls.MutableAcl acl)
           
 void setAclService(HibernateMutableAclService aclService)
           
 void setAclUpdateHelper(BambooAclUpdateHelper aclUpdateHelper)
           
 void setAddGroupPrincipal(String addGroupPrincipal)
           
 void setAddUserPrincipal(String addUserPrincipal)
           
 void setEntityId(long entityId)
           
 void setGrantedGroups(List<String> grantedGroups)
           
 void setGrantedPermissions(List<String> grantedPermissions)
           
 void setGrantedUsers(List<String> grantedUsers)
           
 void setNewGroup(String newGroup)
           
 void setNewUser(String newUser)
           
 void setPrincipalType(String principalType)
           
 void setUserManager(com.atlassian.user.UserManager userManager)
           
 boolean showAdminPermissions()
           
protected  void updateAcl(org.acegisecurity.acls.MutableAcl acl)
           
protected  void validateSaveAllPermissions(List<String> permissions)
           
 
Methods inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
addActionError, addActionWarning, addError, addError, addErrorCollection, addErrorMessage, addErrorMessage, addErrorMessages, addErrors, addFieldErrors, addHelpPanel, addIllegalArgumentException, areCheckBoxesEmpty, buildJsonObject, buildWebPanelContext, checkFieldXssSafety, createFieldValidator, doDefault, doesHelpLinkHaveMatchingTitle, doesLabelKeyHaveMatchingDescription, doExecute, doInput, execute, forceRelativeReturnUrl, getActionWarnings, getAdministrationConfiguration, getBamboo, getBambooLicenseManager, getBambooPermissionManager, getBambooSession, getBambooUrl, getBambooUserManager, getBaseUrl, getBestBaseUrl, getBootstrapManager, getBreadCrumbs, getChainEquiv, getConcurrentBuildsEnabled, getConglomerateCookieValue, getCookieCutter, getCookieValue, getCurrentFormTheme, getCurrentSystemTime, getCurrentUrl, getDefaultPersister, getDeploymentProject, getDescriptionFromLabelKey, getElasticConfig, getFeatureManager, getFieldErrorAccessTracker, getFieldErrors, getFlushedErrorMessages, getFormattedActionErrors, getFormattedActionMessages, getFormattedActionWarnings, getHelpPanels, getInstanceName, getJobEquiv, getJsonObject, getNavigationContext, getNavigationUrl, getNumberOfCurrentlyBuildingPlans, getPlan, getPlanManager, getPluginAccessor, getReturnUrl, getSecuredDomainObject, getServerLifecycleState, getSessionUser, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, getTextWithArgs, getTotalErrors, getUser, getValidatorContext, getWebFragmentsContextMap, getWebItemsForSection, getWebPanelContext, getWebSectionsForLocation, hasActionWarnings, hasAdminPermission, hasAnyErrors, hasBuilds, hasEntityPermission, hasGlobalAdminPermission, hasGlobalPermission, hasGlobalPermission, hasKey, hasLinkedDeployments, hasPlanPermission, hasPlanPermission, hasRestrictedAdminPermission, input, isCheckboxSetInAction, isEc2ConfigurationWarningRequired, isEnableJavascript, isEnableSignup, isInlineDialog, isRestrictedAdminEnabled, isSelectFieldAndNull, isViewContactDetailsEnabled, renderFreemarkerTemplate, setAdministrationConfigurationAccessor, setAdministrationConfigurationManager, setAdministrationConfigurationPersister, setAuthenticationContext, setBambooLicenseManager, setBambooPermissionManager, setBambooUserManager, setBuildDefinitionManager, setCachedPlanManager, setChainEquiv, setCheckBoxFields, setCookieCutter, setCurrentFormTheme, setDashboardCachingManager, setDecorator, setEnableJavascript, setEnvironmentService, setErrorMessages, setFeatureManager, setI18nBeanFactory, setJobEquiv, setJsonator, setLinkedDeploymentProjectCacheService, setNavigationContext, setPlanExecutionManager, setPlanManager, setPluginAccessor, setProfile, setProjectManager, setReturnUrl, setServerLifecycleProvider, setWebInterfaceManager, toJson, toJson
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFormatted, getLocale, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection
getErrorMessages, getErrors
 
Methods inherited from interface com.opensymphony.xwork2.ValidationAware
addActionMessage, addFieldError, getActionErrors, getActionMessages, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
 

Field Detail

RESULT_EDIT_PERMISSIONS

public static final String RESULT_EDIT_PERMISSIONS
See Also:
Constant Field Values

aclService

protected HibernateMutableAclService aclService

aclUpdateHelper

protected BambooAclUpdateHelper aclUpdateHelper

userManager

protected com.atlassian.user.UserManager userManager

acl

protected org.acegisecurity.acls.MutableAcl acl

grantedPermissions

protected List<String> grantedPermissions

nonProcessedGrantedPermissions

protected List<String> nonProcessedGrantedPermissions

grantedUsers

protected List<String> grantedUsers

grantedGroups

protected List<String> grantedGroups

newUser

protected String newUser

newGroup

protected String newGroup

addUserPrincipal

protected String addUserPrincipal

addGroupPrincipal

protected String addGroupPrincipal

principalType

protected String principalType

entityId

protected long entityId
Constructor Detail

AbstractPermissionAction

public AbstractPermissionAction()
Method Detail

getAcl

@Nullable
public abstract org.acegisecurity.acls.MutableAcl getAcl()

getEntityName

@NotNull
public abstract String getEntityName()

getEditablePermissions

@NotNull
public abstract Map<String,String> getEditablePermissions()

showAdminPermissions

public boolean showAdminPermissions()

populatePermissionLists

protected void populatePermissionLists()

hasParameters

protected boolean hasParameters()

validateSaveAllPermissions

protected void validateSaveAllPermissions(List<String> permissions)

updateAcl

protected void updateAcl(org.acegisecurity.acls.MutableAcl acl)

bulkUpdateAcls

protected void bulkUpdateAcls(org.acegisecurity.acls.MutableAcl acl,
                              List<String> permissions)

saveAllPermissions

protected String saveAllPermissions()

doInputPrincipal

public String doInputPrincipal()
                        throws Exception
Throws:
Exception

doCreatePrincipal

public String doCreatePrincipal()
                         throws Exception
Throws:
Exception

doAddUserPrincipal

public String doAddUserPrincipal()
                          throws Exception
Throws:
Exception

doAddGroupPrincipal

public String doAddGroupPrincipal()
                           throws Exception
Throws:
Exception

save

protected String save()
               throws Exception
Throws:
Exception

doUpdatePermissions

public String doUpdatePermissions()
                           throws Exception
Throws:
Exception

setAclService

public void setAclService(HibernateMutableAclService aclService)

setAclUpdateHelper

public void setAclUpdateHelper(BambooAclUpdateHelper aclUpdateHelper)

setAcl

public void setAcl(org.acegisecurity.acls.MutableAcl acl)

getGrantedPermissions

public List<String> getGrantedPermissions()

setGrantedPermissions

public void setGrantedPermissions(List<String> grantedPermissions)

getGrantedUsers

public List<String> getGrantedUsers()

setGrantedUsers

public void setGrantedUsers(List<String> grantedUsers)

getGrantedUsersDisplayNames

@NotNull
public Map<String,String> getGrantedUsersDisplayNames()

getGrantedGroups

public List<String> getGrantedGroups()

setGrantedGroups

public void setGrantedGroups(List<String> grantedGroups)

getNewUser

public String getNewUser()

setNewUser

public void setNewUser(String newUser)

getNewGroup

public String getNewGroup()

setNewGroup

public void setNewGroup(String newGroup)

getEntityId

public long getEntityId()

setEntityId

public void setEntityId(long entityId)

getAddUserPrincipal

public String getAddUserPrincipal()

setAddUserPrincipal

public void setAddUserPrincipal(String addUserPrincipal)

getAddGroupPrincipal

public String getAddGroupPrincipal()

setAddGroupPrincipal

public void setAddGroupPrincipal(String addGroupPrincipal)

getPrincipalType

public String getPrincipalType()

setPrincipalType

public void setPrincipalType(String principalType)

hasEditPermissionForUserName

public boolean hasEditPermissionForUserName(String userName)

hasEditPermissionForUser

public boolean hasEditPermissionForUser(BambooUser user)

hasEditPermissionForGroup

public boolean hasEditPermissionForGroup(String groupName)

setUserManager

public void setUserManager(com.atlassian.user.UserManager userManager)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.