Class AccessPermission
java.lang.Object
ch.tocco.nice2.persist.security.api.AccessPermission
- All Implemented Interfaces:
Permission
,Serializable
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
int
hashCode()
boolean
implies
(Permission permission) Check whether this permission implies another permission.boolean
boolean
static AccessPermission
read()
static AccessPermission
toString()
static AccessPermission
write()
-
Constructor Details
-
AccessPermission
public AccessPermission() -
AccessPermission
-
-
Method Details
-
read
-
write
-
readWrite
-
toString
- Specified by:
toString
in interfacePermission
- Overrides:
toString
in classObject
-
getName
- Specified by:
getName
in interfacePermission
-
equals
- Specified by:
equals
in interfacePermission
- Overrides:
equals
in classObject
-
hashCode
public int hashCode() -
implies
Description copied from interface:Permission
Check whether this permission implies another permission. Be careful when implementing this method on your own permissions because this is basically the core of the whole security concept. A permission implies another permission, if the other permission is a subset of this permission. For example, the permission to access all fields of an entity implies the permission to access the specific field "myField" of the same entity, or the permission to access all files under /my/directory implies the permission to access the file /my/directory/myFile.- Specified by:
implies
in interfacePermission
- Parameters:
permission
- The permission to check.- Returns:
true
, if this permission implies the given permission,false
otherwise.
-
isWritable
public boolean isWritable() -
isReadable
public boolean isReadable()
-