Class Privilege
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.persistence.application.Privilege
-
public class Privilege extends Object
A privilege is composed by a string token (unique id of the module or method the privilege refers to, for example "nav-tree" or "create-object") and a number that specifies the access level (see ACCESS_LEVEL* for possible values)- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACCESS_LEVEL_READ
The user can access the feature in a read-only modestatic int
ACCESS_LEVEL_READ_WRITE
The user can access the feature in a read and write modestatic String
PROPERTY_ACCESS_LEVEL
Access level property name to be used in the data basestatic String
PROPERTY_FEATURE_TOKEN
Feature token property name to be used in the database
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getAccessLevel()
String
getFeatureToken()
int
hashCode()
void
setAccessLevel(int accessLevel)
void
setFeatureToken(String featureToken)
-
-
-
Field Detail
-
ACCESS_LEVEL_READ
public static final int ACCESS_LEVEL_READ
The user can access the feature in a read-only mode- See Also:
- Constant Field Values
-
ACCESS_LEVEL_READ_WRITE
public static final int ACCESS_LEVEL_READ_WRITE
The user can access the feature in a read and write mode- See Also:
- Constant Field Values
-
PROPERTY_FEATURE_TOKEN
public static final String PROPERTY_FEATURE_TOKEN
Feature token property name to be used in the database- See Also:
- Constant Field Values
-
PROPERTY_ACCESS_LEVEL
public static final String PROPERTY_ACCESS_LEVEL
Access level property name to be used in the data base- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Privilege
public Privilege(String featureToken, int accessLevel)
-
-