Interface GroupPermission

All Known Implementing Classes:
GroupPermissionProvider

public sealed interface GroupPermission permits GroupPermissionProvider
Group permission interface to manage group permissions.
  • Method Details

    • existsPermission

      boolean existsPermission(int groupId, String permission)
      Checks if a permission exists.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      Returns:
      True if the permission exists, otherwise false.
    • addPermission

      void addPermission(int groupId, int creatorId, String permission, long time)
      Adds a permission to a group.
      Parameters:
      groupId - The id of the group.
      creatorId - The id of the creator.
      permission - The permission.
      time - The time the permission was added.
    • removePermission

      void removePermission(int groupId, String permission)
      Removes a permission from a group.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
    • clearPermission

      void clearPermission(int groupId)
      Clears all permissions of a group.
      Parameters:
      groupId - The id of the group.
    • getPermissions

      List<String> getPermissions(int groupId)
      Obtains all permissions of a group.
      Parameters:
      groupId - The id of the group.
      Returns:
      A list of all permissions of the group.
    • getAllPermissions

      List<String> getAllPermissions(GroupParent groupParent, int groupId)
      Obtains all permissions of a group.
      Parameters:
      groupParent - The group parent.
      groupId - The id of the group.
      Returns:
      A list of all permissions of the group.
    • getCreatorId

      int getCreatorId(int groupId, String permission)
      Obtains the creator id of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      Returns:
      The creator id of the permission.
    • getCreatedTime

      long getCreatedTime(int groupId, String permission)
      Obtains the created time of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      Returns:
      The created time of the permission.
    • getCreatedDate

      String getCreatedDate(int groupId, String permission)
      Obtains the created date of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      Returns:
      The created date of the permission.
    • getExpiredTime

      long getExpiredTime(int groupId, String permission)
      Obtains the expired time of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      Returns:
      The expired time of the permission.
    • getExpiredDate

      String getExpiredDate(int groupId, String permission)
      Obtains the expired date of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      Returns:
      The expired date of the permission.
    • setExpiredTime

      String setExpiredTime(int groupId, String permission, long time)
      Sets the expired time of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      time - The time the permission will expire.
      Returns:
      The expired date of the permission.
    • addExpiredTime

      String addExpiredTime(int groupId, String permission, long time)
      Adds time to the expired time of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      time - The time to add to the expired time.
      Returns:
      The expired date of the permission.
    • removeExpiredTime

      String removeExpiredTime(int groupId, String permission, long time)
      Removes time from the expired time of a permission.
      Parameters:
      groupId - The id of the group.
      permission - The permission.
      time - The time to remove from the expired time.
      Returns:
      The expired date of the permission.
    • loadExpired

      void loadExpired(Group group)
      Loads all expired permissions of a group.
      Parameters:
      group - The group.