Class PermissionWrapper
java.lang.Object
io.jenkins.plugins.folderauth.misc.PermissionWrapper
- All Implemented Interfaces:
Comparable<PermissionWrapper>
@ParametersAreNonnullByDefault
public final class PermissionWrapper
extends Object
implements Comparable<PermissionWrapper>
A wrapper for efficient serialization of a
Permission
when stored as a part of an AbstractRole
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PermissionWrapper other) boolean
getId()
Get the permission corresponding to thisPermissionWrapper
int
hashCode()
static Set<PermissionWrapper>
wrapPermissions
(Permission... permissions) Convenience method to wrapPermission
s intoPermissionWrapper
s.static Set<PermissionWrapper>
wrapPermissions
(Collection<Permission> permissions) Convenience method to wrapPermission
s intoPermissionWrapper
s.
-
Field Details
-
DANGEROUS_PERMISSIONS
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final Set<Permission> DANGEROUS_PERMISSIONS
-
-
Constructor Details
-
PermissionWrapper
Constructor.- Parameters:
id
- the id of the permission thisPermissionWrapper
contains.
-
-
Method Details
-
getId
-
getPermission
Get the permission corresponding to thisPermissionWrapper
- Returns:
- the permission corresponding to this
PermissionWrapper
-
equals
-
hashCode
public int hashCode() -
wrapPermissions
Convenience method to wrapPermission
s intoPermissionWrapper
s.- Parameters:
permissions
- permissions to be wrapped up- Returns:
- a set containing a
PermissionWrapper
for each permission inpermissions
-
wrapPermissions
Convenience method to wrapPermission
s intoPermissionWrapper
s.- Parameters:
permissions
- permissions to be wrapped up- Returns:
- a set containing a
PermissionWrapper
for each permission inpermissions
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PermissionWrapper>
-