Class 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 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)
    • Method Detail

      • getFeatureToken

        public String getFeatureToken()
      • setFeatureToken

        public void setFeatureToken​(String featureToken)
      • getAccessLevel

        public int getAccessLevel()
      • setAccessLevel

        public void setAccessLevel​(int accessLevel)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object