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 |
|---|---|
Optional<String> |
getGroupFrom()
Gets the name of the group the user was demoted from, if applicable.
|
Optional<String> |
getGroupTo()
Gets the name of the group the user was demoted from, if applicable.
|
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()
MutateResultwasSuccess 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.
Copyright © 2018. All rights reserved.