Class UserGroupDO

All Implemented Interfaces:
IBaseDO<UserGroup>

public class UserGroupDO extends AbstractPrincipalDO<UserGroup>
  • Constructor Details

    • UserGroupDO

      public UserGroupDO()
  • Method Details

    • getAllActive

      public List<UserGroup> getAllActive(mc.core.system.search.SearchFilter sf)
      Description copied from class: AbstractPrincipalDO
      get all principals (User and UserGroup) according to given SearchFilter and active, not deleted and with isSystem-Flag false.
      Overrides:
      getAllActive in class AbstractPrincipalDO<UserGroup>
    • getAllUserGroups

      public List<UserGroup> getAllUserGroups(mc.core.system.search.SearchFilter sf)
    • delete

      public void delete(UserGroup userGroup, boolean force) throws ApplicationException
      Description copied from class: AbstractBaseDO
      NOTE: when overriding this method and you delete any other objects you need to call validateNotUsed before in case flag force is false!
      Overrides:
      delete in class AbstractPrincipalDO<UserGroup>
      Parameters:
      userGroup - mandatory
      force - if true delete without usage check, which can result in db constraints error unless references are taken care of
      Throws:
      ApplicationException
    • addUser

      public void addUser(UserGroup userGroup, User user)
      Adds user to group. This is a no-op if user is already in group, in other words an idempotent method.
      Parameters:
      userGroup - Group that shall be assigned.
      user - User to modify if required.
    • removeUser

      public void removeUser(UserGroup userGroup, User user)
    • getSystemUserGroup

      public UserGroup getSystemUserGroup(String type) throws ApplicationException
      get or insert system userGroup
      Parameters:
      type - optional. used to build groupName and name label key. if null the "ALL" group is used
      Returns:
      persistent userGroup
      Throws:
      ApplicationException