public interface DemotionResult extends MutateResult
Modifier and Type | Interface and Description |
---|---|
static class |
DemotionResult.Status
The result status
|
GENERIC_FAILURE, GENERIC_SUCCESS
Modifier and Type | Method and Description |
---|---|
@NonNull Optional<String> |
getGroupFrom()
Gets the name of the group the user was demoted from, if applicable.
|
@NonNull Optional<String> |
getGroupTo()
Gets the name of the group the user was demoted from, if applicable.
|
@NonNull DemotionResult.Status |
getStatus()
Gets the status of the result.
|
default boolean |
wasSuccess()
Gets if the operation which produced this result completed successfully.
|
asBoolean, wasFailure
@NonNull DemotionResult.Status getStatus()
default boolean wasSuccess()
MutateResult
wasSuccess
in interface MutateResult
@NonNull Optional<String> getGroupFrom()
Will only be present for results with a status
of
DemotionResult.Status.SUCCESS
or DemotionResult.Status.REMOVED_FROM_FIRST_GROUP
.
The value will also be set for results with the DemotionResult.Status.MALFORMED_TRACK
status,
with this value marking the group which no longer exists.
@NonNull Optional<String> getGroupTo()
Will only be present for results with a status
of
DemotionResult.Status.SUCCESS
.