Class GroupPermissionProvider
java.lang.Object
de.murmelmeister.murmelapi.group.permission.GroupPermissionProvider
- All Implemented Interfaces:
GroupPermission
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
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.private voidcreateTable(String tableName) 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.
-
Field Details
-
dateFormat
-
-
Constructor Details
-
GroupPermissionProvider
public GroupPermissionProvider()
-
-
Method Details
-
createTable
-
existsPermission
Description copied from interface:GroupPermissionChecks if a permission exists.- Specified by:
existsPermissionin interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- True if the permission exists, otherwise false.
-
addPermission
Description copied from interface:GroupPermissionAdds a permission to a group.- Specified by:
addPermissionin interfaceGroupPermission- Parameters:
groupId- The id of the group.creatorId- The id of the creator.permission- The permission.time- The time the permission was added.
-
removePermission
Description copied from interface:GroupPermissionRemoves a permission from a group.- Specified by:
removePermissionin interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.
-
clearPermission
public void clearPermission(int groupId) Description copied from interface:GroupPermissionClears all permissions of a group.- Specified by:
clearPermissionin interfaceGroupPermission- Parameters:
groupId- The id of the group.
-
getPermissions
Description copied from interface:GroupPermissionObtains all permissions of a group.- Specified by:
getPermissionsin interfaceGroupPermission- Parameters:
groupId- The id of the group.- Returns:
- A list of all permissions of the group.
-
getAllPermissions
Description copied from interface:GroupPermissionObtains all permissions of a group.- Specified by:
getAllPermissionsin interfaceGroupPermission- Parameters:
groupParent- The group parent.groupId- The id of the group.- Returns:
- A list of all permissions of the group.
-
getCreatorId
Description copied from interface:GroupPermissionObtains the creator id of a permission.- Specified by:
getCreatorIdin interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- The creator id of the permission.
-
getCreatedTime
Description copied from interface:GroupPermissionObtains the created time of a permission.- Specified by:
getCreatedTimein interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- The created time of the permission.
-
getCreatedDate
Description copied from interface:GroupPermissionObtains the created date of a permission.- Specified by:
getCreatedDatein interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- The created date of the permission.
-
getExpiredTime
Description copied from interface:GroupPermissionObtains the expired time of a permission.- Specified by:
getExpiredTimein interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- The expired time of the permission.
-
getExpiredDate
Description copied from interface:GroupPermissionObtains the expired date of a permission.- Specified by:
getExpiredDatein interfaceGroupPermission- Parameters:
groupId- The id of the group.permission- The permission.- Returns:
- The expired date of the permission.
-
setExpiredTime
Description copied from interface:GroupPermissionSets the expired time of a permission.- Specified by:
setExpiredTimein interfaceGroupPermission- 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
Description copied from interface:GroupPermissionAdds time to the expired time of a permission.- Specified by:
addExpiredTimein interfaceGroupPermission- 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
Description copied from interface:GroupPermissionRemoves time from the expired time of a permission.- Specified by:
removeExpiredTimein interfaceGroupPermission- 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
Description copied from interface:GroupPermissionLoads all expired permissions of a group.- Specified by:
loadExpiredin interfaceGroupPermission- Parameters:
group- The group.
-