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 Details

    • PermissionService

      public PermissionService(ParentProvider parentProvider, PermissionProvider permissionProvider, GroupProvider groupProvider, UserProvider userProvider)
      Creates an instance of a PermissionService record class.
      Parameters:
      parentProvider - the value for the parentProvider record component
      permissionProvider - the value for the permissionProvider record component
      groupProvider - the value for the groupProvider record component
      userProvider - the value for the userProvider record component
  • Method Details

    • getHighestGroup

      @Nullable public @Nullable Group getHighestGroup(@NotNull @NotNull PermissionTarget target)
    • getName

      @Nullable public @Nullable String getName(@NotNull @NotNull PermissionTarget target)
    • getParents

      @NotNull public @NotNull List<Parent> getParents(@NotNull @NotNull PermissionTarget target)
    • getPermissions

      @NotNull public @NotNull List<Permission> getPermissions(@NotNull @NotNull PermissionTarget target)
    • hasPermission

      public boolean hasPermission(@NotNull @NotNull PermissionTarget target, @NotNull @NotNull String permission)
    • loadExpired

      public int loadExpired()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • parentProvider

      public ParentProvider parentProvider()
      Returns the value of the parentProvider record component.
      Returns:
      the value of the parentProvider record component
    • permissionProvider

      public PermissionProvider permissionProvider()
      Returns the value of the permissionProvider record component.
      Returns:
      the value of the permissionProvider record component
    • groupProvider

      public GroupProvider groupProvider()
      Returns the value of the groupProvider record component.
      Returns:
      the value of the groupProvider record component
    • userProvider

      public UserProvider userProvider()
      Returns the value of the userProvider record component.
      Returns:
      the value of the userProvider record component