Package jmri
Interface Permission
-
- All Superinterfaces:
java.util.Comparator<PermissionValue>
- All Known Subinterfaces:
BooleanPermission,EnumPermission<E>
- All Known Implementing Classes:
EditorPermissions.EditorPermission,LoadAndStorePermissionOwner.LoadXmlFilePermission,LoadAndStorePermissionOwner.StoreXmlFilePermission,PermissionsProgrammer.PermissionProgrammingOnMain,PermissionsProgrammer.PermissionProgrammingTrack,PermissionsSystemAdmin.PermissionEditOwnPassword,PermissionsSystemAdmin.PermissionEditPermissions,PermissionsSystemAdmin.PermissionEditPreferences
public interface Permission extends java.util.Comparator<PermissionValue>
Defines a permission.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PermissionValuegetDefaultPermission()Get the default permission if the user has no role.PermissionValuegetDefaultPermission(Role role)Get the default permission for a role.java.lang.StringgetName()Get the name of the permissionPermissionOwnergetOwner()Get the ownerjava.lang.StringgetValue(PermissionValue value)PermissionValuevalueOf(java.lang.String value)
-
-
-
Method Detail
-
getOwner
@Nonnull PermissionOwner getOwner()
Get the owner- Returns:
- the owner
-
getValue
java.lang.String getValue(PermissionValue value)
-
valueOf
PermissionValue valueOf(java.lang.String value)
-
getDefaultPermission
PermissionValue getDefaultPermission()
Get the default permission if the user has no role.- Returns:
- the default
-
getDefaultPermission
PermissionValue getDefaultPermission(Role role)
Get the default permission for a role.- Parameters:
role- the role- Returns:
- the default
-
-