Class UserPrivileges


  • public class UserPrivileges
    extends java.lang.Object
    This class represents the privileges of a user. It serves to allow or to deny the User access to system functions. Privileges are an integral part of the Authorization System.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  UserPrivileges.Privilege
      Enumeration of all Privileges.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected UserPrivileges​(com.uc4.util.XMLDocument doc)  
    • Constructor Detail

      • UserPrivileges

        protected UserPrivileges​(com.uc4.util.XMLDocument doc)
    • Method Detail

      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element objectElement)
      • isPrivilegeSet

        public boolean isPrivilegeSet​(UserPrivileges.Privilege priv)
        Returns true if the specified privilege is enabled.
        Parameters:
        priv - Privilege
        Returns:
        true if enabled, false otherwise
      • setPrivilege

        public void setPrivilege​(UserPrivileges.Privilege priv,
                                 boolean value)
        Sets or clears a privilege.
        Parameters:
        priv - Enum constant
        value - true to enable the privilege, false to disable it
      • selectAll

        public void selectAll()
        Enables all privileges.
      • unselectAll

        public void unselectAll()
        Disables all privileges.