Class PermissionUserGroupInfo
java.lang.Object
eu.cloudnetservice.driver.permission.PermissionUserGroupInfo
- All Implemented Interfaces:
DefaultedDocPropertyHolder,DocPropertyHolder
The permission user group info specifies the time-out of a permission group for a permission user.
- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder for permission user group infos.Nested classes/interfaces inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder
DefaultedDocPropertyHolder.Mutable<S extends DocPropertyHolder.Mutable<S>> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPermissionUserGroupInfo(@NonNull String group, long timeOutMillis, @NonNull Document properties) Creates a new permission user group info, that creates a relation between a permission user and a permission group. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new permission group info builder instance with all default values.Creates a new permission group info builder instance and copies all values from the given permission group info.group()Gets the name of the permission user group info.Get the underlying document that all read and write operations are delegated to.longGets the expiry timeout for this group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder
propertyAbsent, propertyPresent, readProperty, readPropertyOrDefault, readPropertyOrGet, readPropertyOrThrow, readPropertyOrThrow
-
Field Details
-
group
-
timeOutMillis
private final long timeOutMillis -
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
@NonNull public static @NonNull PermissionUserGroupInfo.Builder builder(@NonNull @NonNull PermissionUserGroupInfo info) 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
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
Get the underlying document that all read and write operations are delegated to.- Specified by:
propertyHolderin interfaceDocPropertyHolder- Returns:
- the underlying document.
-