Class Permissions
- java.lang.Object
-
- org.genesys.blocks.security.serialization.Permissions
-
- Direct Known Subclasses:
SidPermissions
public class Permissions extends Object
A simple POJO for object permissions.
-
-
Constructor Summary
Constructors Constructor Description Permissions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissionsgrantAll()Grant all.PermissionsgrantNone()Grant none.booleanisGranting(int mask)Is Permissions granting theBasePermissionby its mask?.booleanisOneGranting()Checks if is one granting.StringtoString()
-
-
-
Field Detail
-
create
public boolean create
Allowed to create.
-
read
public boolean read
Allowed to read.
-
write
public boolean write
Allowed to write/modify.
-
delete
public boolean delete
Allowed to delete.
-
manage
public boolean manage
Allowed to admin/manage.
-
isPublic
public boolean isPublic
Anyone is allowed to read the object
-
-
Method Detail
-
isGranting
public boolean isGranting(int mask)
Is Permissions granting theBasePermissionby its mask?.- Parameters:
mask- int value of Permission mask- Returns:
- true if granting, false otherwise
- Throws:
UnsupportedOperationException- if mask is not understood
-
grantAll
public Permissions grantAll()
Grant all.- Returns:
- the permissions
-
grantNone
public Permissions grantNone()
Grant none.- Returns:
- the permissions
-
isOneGranting
public boolean isOneGranting()
Checks if is one granting.- Returns:
- true, if is one granting
-
-