Class Permissions
java.lang.Object
org.genesys.blocks.security.serialization.Permissions
- Direct Known Subclasses:
SidPermissions
A simple POJO for object permissions.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongrantAll()Grant all.Grant none.booleanisGranting(int mask) Is Permissions granting theBasePermissionby its mask?.booleanChecks if is one granting.toString()
-
Field Details
-
create
public boolean createAllowed to create. -
read
public boolean readAllowed to read. -
write
public boolean writeAllowed to write/modify. -
delete
public boolean deleteAllowed to delete. -
manage
public boolean manageAllowed to admin/manage. -
isPublic
public boolean isPublicAnyone is allowed to read the object
-
-
Constructor Details
-
Permissions
public Permissions()
-
-
Method Details
-
toString
-
isGranting
public boolean isGranting(int mask) Is Permissions granting theBasePermissionby its mask?.- Parameters:
mask- int mask value of a single Permission- Returns:
- true if granting, false otherwise
- Throws:
UnsupportedOperationException- if mask is not understood
-
grantAll
Grant all.- Returns:
- the permissions
-
grantNone
Grant none.- Returns:
- the permissions
-
isOneGranting
public boolean isOneGranting()Checks if is one granting.- Returns:
- true, if is one granting
-