Class RoleBasedAuthorizationStrategy.DescriptorImpl
java.lang.Object
hudson.model.Descriptor<AuthorizationStrategy>
com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy.DescriptorImpl
- Enclosing class:
- RoleBasedAuthorizationStrategy
public static final class RoleBasedAuthorizationStrategy.DescriptorImpl
extends Descriptor<AuthorizationStrategy>
Descriptor used to bind the strategy to the Web forms.
- 
Nested Class SummaryNested classes/interfaces inherited from class hudson.model.DescriptorDescriptor.FormException, Descriptor.PropertyType, Descriptor.Self
- 
Field SummaryFields inherited from class hudson.model.Descriptorclazz
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddoAssignSubmit(net.sf.json.JSONObject json) Called on role assignment form's submission.doCheckForWhitespace(String value) Checks if the value contains whitespace at begin or end.doCheckName(String value) Check the given SID and look it up in the security realm and returns html snippet that will be displayed in the form instead of the plain sid.doCheckPattern(String value) Validate the pattern.voiddoRolesSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Called on role management form's submission.voiddoTemplatesSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Called on role generator form submission.Create PermissionEntry.Get the needed permissions groups.booleanhasAmbiguousEntries(SortedMap<Role, Set<PermissionEntry>> grantedRoles) Returns a String with the permissions that imply the given permission.newInstance(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) Method called on Jenkins Manage panel submission, and plugin specific forms to create theAuthorizationStrategyobject.booleanshowPermission(String type, Permission p) Used from Jelly.Methods inherited from class hudson.model.DescriptoraddHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
- 
Constructor Details- 
DescriptorImplpublic DescriptorImpl()
 
- 
- 
Method Details- 
getDisplayName- Overrides:
- getDisplayNamein class- Descriptor<AuthorizationStrategy>
 
- 
doCheckForWhitespaceChecks if the value contains whitespace at begin or end.- Parameters:
- value- Value to check
- Returns:
- FormValidation
 
- 
doRolesSubmit@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doRolesSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws jakarta.servlet.ServletException, IOException Called on role management form's submission.- Throws:
- jakarta.servlet.ServletException
- IOException
 
- 
doAssignSubmit@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doAssignSubmit(net.sf.json.JSONObject json) throws jakarta.servlet.ServletException, IOException Called on role assignment form's submission.- Throws:
- jakarta.servlet.ServletException
- IOException
 
- 
doTemplatesSubmit@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doTemplatesSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws jakarta.servlet.ServletException, IOException Called on role generator form submission.- Throws:
- jakarta.servlet.ServletException
- IOException
 
- 
newInstancepublic AuthorizationStrategy newInstance(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) Method called on Jenkins Manage panel submission, and plugin specific forms to create theAuthorizationStrategyobject.- Overrides:
- newInstancein class- Descriptor<AuthorizationStrategy>
 
- 
getGroupsGet the needed permissions groups.- Parameters:
- type- Role type
- Returns:
- Groups, which should be displayed for a specific role type. nullif an unsupported type is defined.
 
- 
showPermission@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean showPermission(String type, Permission p) Used from Jelly.- Parameters:
- type- Role type
- p- Permission
- Returns:
- true if permission should be shown
 
- 
impliedByList@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String impliedByList(Permission p) Returns a String with the permissions that imply the given permission.- Parameters:
- p- Permission
- Returns:
- String with implying permission
 
- 
entryFor@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public PermissionEntry entryFor(String type, String sid) Create PermissionEntry.- Parameters:
- type- AuthorizationType
- sid- SID
- Returns:
- PermissionEntry
 
- 
doCheckPattern@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckPattern(@QueryParameter String value) Validate the pattern.- Parameters:
- value- Pattern to validate
- Returns:
- FormValidation object with result
 
- 
doCheckNameCheck the given SID and look it up in the security realm and returns html snippet that will be displayed in the form instead of the plain sid.When the name matches an existing user the users full name will be shown, otherwise it will be just the sid. For Existing users and groups, the corresponding icon will be used. - Parameters:
- value- Name to validate
- Returns:
- FormValidation object
 
- 
hasAmbiguousEntries@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean hasAmbiguousEntries(SortedMap<Role, Set<PermissionEntry>> grantedRoles) 
 
-