Class RoleDefinition
java.lang.Object
org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition
- All Implemented Interfaces:
Comparable<RoleDefinition>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class RoleDefinition
extends Object
implements Comparable<RoleDefinition>
Role definition. Used for custom formatting
- Since:
- 2.11
- Author:
- Oleg Nenashev
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Maps a permission entry to the casc line. -
Field Summary
-
Constructor Summary
ConstructorDescriptionRoleDefinition
(String name, String description, String pattern, Collection<String> permissions) Creates a RoleDefinition. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Deprecated, always returns null.getName()
final Role
getRole()
Returns the corresponding Role object.int
hashCode()
void
setAssignments
(Collection<String> assignments) Deprecated.void
Setter for entries.void
setTemplateName
(String templateName)
-
Field Details
-
LOGGER
-
-
Constructor Details
-
RoleDefinition
@DataBoundConstructor public RoleDefinition(String name, String description, String pattern, Collection<String> permissions) Creates a RoleDefinition.- Parameters:
name
- Role namedescription
- Role descriptionpattern
- Role patternpermissions
- Assigned permissions
-
-
Method Details
-
setAssignments
Deprecated.UsesetEntries(java.util.Collection)
instead.Legacy setter for string based assignments.- Parameters:
assignments
- The assigned sids
-
setEntries
Setter for entries.- Parameters:
entries
- The permission entries
-
getRole
Returns the corresponding Role object.- Returns:
- Role
-
getName
-
getDescription
-
getPattern
-
getTemplateName
-
setTemplateName
-
getPermissions
-
getAssignments
Deprecated, always returns null.- Returns:
- null
-
getEntries
-
compareTo
- Specified by:
compareTo
in interfaceComparable<RoleDefinition>
-
equals
-
hashCode
public int hashCode()
-
setEntries(java.util.Collection)
instead.