Package jmri.jmrit.display
Class EditorPermissions.EditorPermission
- java.lang.Object
-
- jmri.jmrit.display.EditorPermissions.EditorPermission
-
- All Implemented Interfaces:
java.util.Comparator<PermissionValue>
,EnumPermission<EditorPermissions.EditorPermissionEnum>
,Permission
- Enclosing class:
- EditorPermissions
public static class EditorPermissions.EditorPermission extends java.lang.Object implements EnumPermission<EditorPermissions.EditorPermissionEnum>
-
-
Constructor Summary
Constructors Constructor Description EditorPermission()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(PermissionValue o1, PermissionValue o2)
PermissionValue
getDefaultPermission()
Get the default permission if the user has no role.PermissionValue
getDefaultPermission(Role role)
Get the default permission for a role.java.lang.String
getName()
Get the name of the permissionPermissionOwner
getOwner()
Get the ownerjava.lang.String
getValue(PermissionValue value)
EditorPermissions.EditorPermissionEnum[]
getValues()
Get the values of the enum.PermissionValue
valueOf(java.lang.String value)
-
-
-
Constructor Detail
-
EditorPermission
public EditorPermission()
-
-
Method Detail
-
getValues
public EditorPermissions.EditorPermissionEnum[] getValues()
Description copied from interface:EnumPermission
Get the values of the enum.- Specified by:
getValues
in interfaceEnumPermission<EditorPermissions.EditorPermissionEnum>
- Returns:
- an array of the enums
-
getOwner
public PermissionOwner getOwner()
Description copied from interface:Permission
Get the owner- Specified by:
getOwner
in interfacePermission
- Returns:
- the owner
-
getName
public java.lang.String getName()
Description copied from interface:Permission
Get the name of the permission- Specified by:
getName
in interfacePermission
- Returns:
- the name
-
getValue
public java.lang.String getValue(PermissionValue value)
- Specified by:
getValue
in interfacePermission
-
valueOf
public PermissionValue valueOf(java.lang.String value)
- Specified by:
valueOf
in interfacePermission
-
getDefaultPermission
public PermissionValue getDefaultPermission()
Description copied from interface:Permission
Get the default permission if the user has no role.- Specified by:
getDefaultPermission
in interfacePermission
- Returns:
- the default
-
getDefaultPermission
public PermissionValue getDefaultPermission(Role role)
Description copied from interface:Permission
Get the default permission for a role.- Specified by:
getDefaultPermission
in interfacePermission
- Parameters:
role
- the role- Returns:
- the default
-
compare
public int compare(PermissionValue o1, PermissionValue o2)
- Specified by:
compare
in interfacejava.util.Comparator<PermissionValue>
-
-