Interface GroupPermission
- All Known Implementing Classes:
GroupPermissionProvider
Group permission interface to manage group permissions.
-
Method Summary
Modifier and TypeMethodDescriptionaddExpiredTime(int groupId, String permission, long time) Adds time to the expired time of a permission.voidaddPermission(int groupId, int creatorId, String permission, long time) Adds a permission to a group.voidclearPermission(int groupId) Clears all permissions of a group.booleanexistsPermission(int groupId, String permission) Checks if a permission exists.getAllPermissions(GroupParent groupParent, int groupId) Obtains all permissions of a group.getCreatedDate(int groupId, String permission) Obtains the created date of a permission.longgetCreatedTime(int groupId, String permission) Obtains the created time of a permission.intgetCreatorId(int groupId, String permission) Obtains the creator id of a permission.getExpiredDate(int groupId, String permission) Obtains the expired date of a permission.longgetExpiredTime(int groupId, String permission) Obtains the expired time of a permission.getPermissions(int groupId) Obtains all permissions of a group.voidloadExpired(Group group) Loads all expired permissions of a group.removeExpiredTime(int groupId, String permission, long time) Removes time from the expired time of a permission.voidremovePermission(int groupId, String permission) Removes a permission from a group.setExpiredTime(int groupId, String permission, long time) Sets the expired time of a permission.
-
Method Details
-
existsPermission
Checks if a permission exists.- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- True if the permission exists, otherwise false.
-
addPermission
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
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
Obtains all permissions of a group.- Parameters:
groupId- The id of the group.- Returns:
- A list of all permissions of the group.
-
getAllPermissions
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
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
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
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
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
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
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
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
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
Loads all expired permissions of a group.- Parameters:
group- The group.
-