Interface RevocationOrder
- All Superinterfaces:
EnforcementOptionsFactory
An order to undo a punishment by some specific details. Obtained from
See
PunishmentRevoker. See
space.arim.libertybans.api.punish for a description of active and
historical punishments.- Author:
- A248
-
Method Summary
Modifier and TypeMethodDescriptiongetID()Gets the ID of the punishment which will be revoked, or none if no ID is knowngetType()Gets the punishment type of the punishment which will be revoked, or none if the type is not knownGets the victims, one of whose punishment will be revoked, or none if the list of victims does not existdefault space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> Revokes the punishment matching this revocation order, "unenforces" it, and gets the punishment revoked.space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> undoAndGetPunishment(EnforcementOptions enforcementOptions) Revokes the punishment matching this revocation order, "unenforces" it according to the given options, and gets the punishment revoked.default space.arim.omnibus.util.concurrent.ReactionStage<Boolean> Revokes the punishment matching this revocation order, and "unenforces" it.space.arim.omnibus.util.concurrent.ReactionStage<Boolean> undoPunishment(EnforcementOptions enforcementOptions) Revokes the punishment matching this revocation order, and "unenforces" it according to the given options.Methods inherited from interface EnforcementOptionsFactory
enforcementOptionsBuilder
-
Method Details
-
getID
-
getType
Optional<PunishmentType> getType()Gets the punishment type of the punishment which will be revoked, or none if the type is not known- Returns:
- the type of the punishment to be revoked if there is one
-
getVictims
-
undoPunishment
Revokes the punishment matching this revocation order, and "unenforces" it.
If no active punishment in the database matched this revocation order, the future yieldsfalse.
Unenforcement implies purging of this punishment from any local caches.- Returns:
- a future which yields
trueif the punishment existed and has been revoked,falseotherwise
-
undoPunishment
space.arim.omnibus.util.concurrent.ReactionStage<Boolean> undoPunishment(EnforcementOptions enforcementOptions) Revokes the punishment matching this revocation order, and "unenforces" it according to the given options.
If no active punishment in the database matched this revocation order, the future yieldsfalse.
Unenforcement implies purging of this punishment from any local caches.- Parameters:
enforcementOptions- the enforcement options. Can be used to disable unenforcement entirely- Returns:
- a future which yields
trueif the punishment existed and has been revoked,falseotherwise
-
undoAndGetPunishment
default space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> undoAndGetPunishment()Revokes the punishment matching this revocation order, "unenforces" it, and gets the punishment revoked.
If no active punishment in the database matched this revocation order, the future yields an empty optional.
Unenforcement implies purging of this punishment from any local caches.- Returns:
- a future which yields the punishment if it existed and was revoked, nothing otherwise
-
undoAndGetPunishment
space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> undoAndGetPunishment(EnforcementOptions enforcementOptions) Revokes the punishment matching this revocation order, "unenforces" it according to the given options, and gets the punishment revoked.
If no active punishment in the database matched this revocation order, the future yields an empty optional.
Unenforcement implies purging of this punishment from any local caches.- Parameters:
enforcementOptions- the enforcement options. Can be used to disable unenforcement entirely- Returns:
- a future which yields the punishment if it existed and was revoked, nothing otherwise
-