Record Class PermissionService
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.permission.PermissionService
public record PermissionService(ParentProvider parentProvider, PermissionProvider permissionProvider, GroupProvider groupProvider, UserProvider userProvider)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionService(ParentProvider parentProvider, PermissionProvider permissionProvider, GroupProvider groupProvider, UserProvider userProvider) Creates an instance of aPermissionServicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable GroupgetHighestGroup(@NotNull PermissionTarget target) @Nullable StringgetName(@NotNull PermissionTarget target) getParents(@NotNull PermissionTarget target) @NotNull List<Permission> getPermissions(@NotNull PermissionTarget target) Returns the value of thegroupProviderrecord component.final inthashCode()Returns a hash code value for this object.booleanhasPermission(@NotNull PermissionTarget target, @NotNull String permission) intReturns the value of theparentProviderrecord component.Returns the value of thepermissionProviderrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserProviderrecord component.
-
Constructor Details
-
PermissionService
public PermissionService(ParentProvider parentProvider, PermissionProvider permissionProvider, GroupProvider groupProvider, UserProvider userProvider) Creates an instance of aPermissionServicerecord class.- Parameters:
parentProvider- the value for theparentProviderrecord componentpermissionProvider- the value for thepermissionProviderrecord componentgroupProvider- the value for thegroupProviderrecord componentuserProvider- the value for theuserProviderrecord component
-
-
Method Details
-
getHighestGroup
-
getName
-
getParents
-
getPermissions
-
hasPermission
public boolean hasPermission(@NotNull @NotNull PermissionTarget target, @NotNull @NotNull String permission) -
loadExpired
public int loadExpired() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
parentProvider
Returns the value of theparentProviderrecord component.- Returns:
- the value of the
parentProviderrecord component
-
permissionProvider
Returns the value of thepermissionProviderrecord component.- Returns:
- the value of the
permissionProviderrecord component
-
groupProvider
Returns the value of thegroupProviderrecord component.- Returns:
- the value of the
groupProviderrecord component
-
userProvider
Returns the value of theuserProviderrecord component.- Returns:
- the value of the
userProviderrecord component
-