public class ServiceOutcomeWithWarnings<T> extends ServiceOutcomeImpl<T>
| Constructor and Description |
|---|
ServiceOutcomeWithWarnings(T value,
ErrorCollection errorCollection,
Map<String,ErrorCollection> warnings)
Constructs result, possibly not successful.
|
ServiceOutcomeWithWarnings(T value,
Map<String,ErrorCollection> warnings)
Constructs successful result.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,ErrorCollection> |
getWarnings()
Contains warnings per plugin point handlers (
UserNameChangeHandler, UserKeyChangeHandler, OwnershipTransferHandler,
UserAnonymizationHandler) described by the complete key of a module (ModuleDescriptor.getCompleteKey()). |
String |
toString() |
error, error, error, from, from, get, getReturnedValue, okgetErrorCollection, getWarningCollection, isValidclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfoldgetErrorCollection, getWarningCollection, hasWarnings, isValidpublic ServiceOutcomeWithWarnings(@Nullable T value, @Nonnull ErrorCollection errorCollection, @Nonnull Map<String,ErrorCollection> warnings)
errorCollection - Collection of errors. Use empty collection for successful response.warnings - Map of warnings returned by property change handlers during processing user key change.@Nonnull public Map<String,ErrorCollection> getWarnings()
UserNameChangeHandler, UserKeyChangeHandler, OwnershipTransferHandler,
UserAnonymizationHandler) described by the complete key of a module (ModuleDescriptor.getCompleteKey()).
Values of this map should contain actual errors (meaning that ErrorCollection#hasAnyErrors(); returns true)
so to detect if there are valid or non-empty warnings getWarnings().isEmpty() should be sufficient.
Copyright © 2002-2022 Atlassian. All Rights Reserved.