Package jmri.jmrit.permission
Class DefaultRole
- java.lang.Object
-
- jmri.jmrit.permission.DefaultRole
-
- All Implemented Interfaces:
Role
public class DefaultRole extends java.lang.Object implements Role
A role in the permission system.
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultRole
ROLE_ADMIN
static DefaultRole
ROLE_GUEST
static DefaultRole
ROLE_REMOTE_GUEST
static DefaultRole
ROLE_STANDARD_USER
-
Constructor Summary
Constructors Constructor Description DefaultRole(java.lang.String name)
DefaultRole(java.lang.String name, int priority, java.lang.String systemName)
DefaultRole(DefaultRole r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
java.util.Map<Permission,PermissionValue>
getPermissions()
PermissionValue
getPermissionValue(Permission permission)
int
getPriority()
java.lang.String
getSystemName()
boolean
isAdminRole()
boolean
isGuestRole()
boolean
isStandardUserRole()
boolean
isSystemRole()
void
setPermission(Permission permission, PermissionValue value)
(package private) void
setPermissionWithoutCheck(Permission permission, PermissionValue value)
-
-
-
Field Detail
-
ROLE_GUEST
public static final DefaultRole ROLE_GUEST
-
ROLE_REMOTE_GUEST
public static final DefaultRole ROLE_REMOTE_GUEST
-
ROLE_STANDARD_USER
public static final DefaultRole ROLE_STANDARD_USER
-
ROLE_ADMIN
public static final DefaultRole ROLE_ADMIN
-
-
Constructor Detail
-
DefaultRole
public DefaultRole(DefaultRole r)
-
DefaultRole
public DefaultRole(java.lang.String name)
-
DefaultRole
public DefaultRole(java.lang.String name, int priority, java.lang.String systemName)
-
-
Method Detail
-
isSystemRole
public boolean isSystemRole()
- Specified by:
isSystemRole
in interfaceRole
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfaceRole
-
getSystemName
public java.lang.String getSystemName()
- Specified by:
getSystemName
in interfaceRole
-
getPermissions
public java.util.Map<Permission,PermissionValue> getPermissions()
- Specified by:
getPermissions
in interfaceRole
-
getPermissionValue
public PermissionValue getPermissionValue(Permission permission)
- Specified by:
getPermissionValue
in interfaceRole
-
setPermission
public void setPermission(Permission permission, PermissionValue value)
- Specified by:
setPermission
in interfaceRole
-
setPermissionWithoutCheck
void setPermissionWithoutCheck(Permission permission, PermissionValue value)
-
isGuestRole
public boolean isGuestRole()
- Specified by:
isGuestRole
in interfaceRole
-
isStandardUserRole
public boolean isStandardUserRole()
- Specified by:
isStandardUserRole
in interfaceRole
-
isAdminRole
public boolean isAdminRole()
- Specified by:
isAdminRole
in interfaceRole
-
-