Interface UserSecurityProvider


public interface UserSecurityProvider
An UserSecurityProvider provides user security information to the EspressReport Enterprise Server. The default UserSecurityProvider is the UserGroupDatabase. Using the administration page, the administrator can change the UserSecurityProvider to use the LdapUserSecurityProvider or any implementation that implements this interface.
  • Method Details

    • getUsers

      quadbase.reportorganizer.data.User[] getUsers() throws Exception
      Returns:
      all users as an User[].
      Throws:
      Exception
    • getGroups

      quadbase.reportorganizer.data.Group[] getGroups() throws Exception
      Returns:
      all groups as a Group[].
      Throws:
      Exception
    • getGroupRelations

      quadbase.reportorganizer.data.GroupRelation[] getGroupRelations() throws Exception
      Returns:
      an array of GroupRelation objects representing all group-to-group relationships.
      Throws:
      Exception
    • getGroupUserRelations

      quadbase.reportorganizer.data.GroupUserRelation[] getGroupUserRelations() throws Exception
      Returns:
      an array of GroupUserRelation objects representing all group-to-user relationships.
      Throws:
      Exception
    • getUserParents

      String[] getUserParents(String username) throws Exception
      Parameters:
      username - the child user name
      Returns:
      an String[] parent group names
      Throws:
      Exception
    • getGroupParents

      String[] getGroupParents(String groupname) throws Exception
      Parameters:
      groupname - the child group name
      Returns:
      an String[] parent group names
      Throws:
      Exception
    • deleteUser

      void deleteUser(String username) throws Exception
      Delete a User.
      Parameters:
      username - the user name
      Throws:
      Exception
    • deleteGroup

      void deleteGroup(String groupname) throws Exception
      Delete a Group.
      Parameters:
      groupname - the group name
      Throws:
      Exception
    • createUser

      void createUser(quadbase.reportorganizer.data.User user) throws Exception
      Create a new user.
      Parameters:
      user - the user to create
      Throws:
      Exception
    • createGroup

      void createGroup(quadbase.reportorganizer.data.Group parentGroup, quadbase.reportorganizer.data.User[] childUsers, quadbase.reportorganizer.data.Group[] childGroups) throws Exception
      Create a new Group.
      Parameters:
      parentGroup - create this group
      childUsers - set the group to have these child users
      childGroups - set the group to have these child groups
      Throws:
      Exception
    • updateUser

      void updateUser(quadbase.reportorganizer.data.User user) throws Exception
      Update a User.
      Parameters:
      user - update this user
      Throws:
      Exception
    • updateGroup

      void updateGroup(quadbase.reportorganizer.data.Group parentGroup, quadbase.reportorganizer.data.User[] childUsers, quadbase.reportorganizer.data.Group[] childGroups) throws Exception
      Update a Group. Should also remove all users/groups relation with the parentGroup for users/groups that are not in the childUsers and childGroups array.
      Parameters:
      parentGroup - update this group
      childUsers - set the group to have these child users
      childGroups - set the group to have these child groups
      Throws:
      Exception
    • addGroupUserRelation

      void addGroupUserRelation(String groupname, String username) throws Exception
      Add a relationship between a Group and a User.
      Parameters:
      groupname - group name of the parent group
      username - user name of the child user
      Throws:
      Exception
    • setSecurityLevels

      void setSecurityLevels(int secLevel, String[] name, boolean[] isGroup) throws Exception
      Sets the security level(s) for a group or user of the specified name(s). Also sets the security level(s) for group or user that is not in NAME but with the same SECLEVEL to -1 (Can simply call resetSecurityLevel(secLevel) in the first line of this method to achieve this).
      Parameters:
      secLevel - the result security level number
      name - an array of name(s) to change
      isGroup - whether the name[i] is a group (isGroup[i]==true) or a user (isGroup[i]==false).
      Throws:
      Exception
    • resetSecurityLevel

      void resetSecurityLevel(int secLevel) throws Exception
      Resets (set to -1) the security level number of all groups and users whose security level number is SECLEVEL.
      Parameters:
      secLevel - the security level number of the group/user
      Throws:
      Exception
    • getGroupsBySecurityLevel

      String[] getGroupsBySecurityLevel(int secLevel) throws Exception
      Parameters:
      secLevel - the security level number of the group
      Returns:
      the Group names of all groups with SECLEVEL
      Throws:
      Exception
    • getUsersBySecurityLevel

      String[] getUsersBySecurityLevel(int secLevel) throws Exception
      Parameters:
      secLevel - the security level number of the user
      Returns:
      the User names of all users with SECLEVEL
      Throws:
      Exception