Class GroupRepositoryMock

java.lang.Object
org.bremersee.groupman.mock.GroupRepositoryMock

public abstract class GroupRepositoryMock extends Object
The group repository mock.
Author:
Christian Bremer
  • Field Details

  • Constructor Details

    • GroupRepositoryMock

      public GroupRepositoryMock()
  • Method Details

    • reset

      public static void reset()
      Reset.
    • createGroup

      public static Group createGroup(Group group)
      Create group.
      Parameters:
      group - the group
      Returns:
      the group
    • getGroups

      public static List<Group> getGroups()
      Gets groups.
      Returns:
      the groups
    • getGroupById

      public static Group getGroupById(String groupId)
      Gets group by id.
      Parameters:
      groupId - the group id
      Returns:
      the group by id
    • updateGroup

      public static Group updateGroup(String groupId, Group group)
      Update group.
      Parameters:
      groupId - the group id
      group - the group
      Returns:
      the group
    • deleteGroup

      public static void deleteGroup(String groupId)
      Delete group.
      Parameters:
      groupId - the group id
    • getGroupsByIds

      public static List<Group> getGroupsByIds(List<String> ids)
      Gets groups by ids.
      Parameters:
      ids - the ids
      Returns:
      the groups by ids
    • getEditableGroups

      public static List<Group> getEditableGroups(String userName)
      Gets editable groups.
      Parameters:
      userName - the user name
      Returns:
      the editable groups
    • getUsableGroups

      public static List<Group> getUsableGroups(String userName)
      Gets usable groups.
      Parameters:
      userName - the user name
      Returns:
      the usable groups
    • getMembership

      public static List<Group> getMembership(String userName)
      Gets membership.
      Parameters:
      userName - the user name
      Returns:
      the membership
    • getMembershipIds

      public static Set<String> getMembershipIds(String userName)
      Gets membership ids.
      Parameters:
      userName - the user name
      Returns:
      the membership ids
    • getStatus

      public static Status getStatus(String userName)
      Gets status.
      Parameters:
      userName - the user name
      Returns:
      the status