Class PermissionUserGroupInfo

java.lang.Object
eu.cloudnetservice.driver.permission.PermissionUserGroupInfo
All Implemented Interfaces:
DefaultedDocPropertyHolder, DocPropertyHolder

public class PermissionUserGroupInfo extends Object implements DefaultedDocPropertyHolder
The permission user group info specifies the time-out of a permission group for a permission user.
Since:
4.0
See Also:
  • Field Details

    • group

      private final String group
    • timeOutMillis

      private final long timeOutMillis
    • properties

      private final Document properties
  • Constructor Details

    • PermissionUserGroupInfo

      protected PermissionUserGroupInfo(@NonNull @NonNull String group, long timeOutMillis, @NonNull @NonNull Document properties)
      Creates a new permission user group info, that creates a relation between a permission user and a permission group.
      Parameters:
      group - the name of the group.
      timeOutMillis - the timestamp for the timeout of the group.
      properties - extra properties for the group info.
  • Method Details

    • builder

      Creates a new permission group info builder instance with all default values.
      Returns:
      the new builder instance.
    • builder

      Creates a new permission group info builder instance and copies all values from the given permission group info.
      Parameters:
      info - the group info to copy from.
      Returns:
      the new builder instance.
      Throws:
      NullPointerException - if the given info is null.
    • group

      @NonNull public @NonNull String group()
      Gets the name of the permission user group info.
      Returns:
      the group name.
    • timeOutMillis

      public long timeOutMillis()
      Gets the expiry timeout for this group.

      The timeout is a unix timestamp, which specifies at which absolute time the given permission should expire. A timeout less than 1 indicated that this group does not expire.

      Returns:
      the timeout timestamp.
    • propertyHolder

      @NonNull public @NonNull Document propertyHolder()
      Get the underlying document that all read and write operations are delegated to.
      Specified by:
      propertyHolder in interface DocPropertyHolder
      Returns:
      the underlying document.