public class ServiceOutcomeWithWarnings<T> extends ServiceOutcomeImpl<T>
Constructor and Description |
---|
ServiceOutcomeWithWarnings(T value,
ErrorCollection errorCollection,
Map<com.atlassian.plugin.ModuleDescriptor,ErrorCollection> warnings)
Constructs result, possibly not successful.
|
ServiceOutcomeWithWarnings(T value,
Map<com.atlassian.plugin.ModuleDescriptor,ErrorCollection> warnings)
Constructs successful result.
|
Modifier and Type | Method and Description |
---|---|
Map<com.atlassian.plugin.ModuleDescriptor,ErrorCollection> |
getWarnings()
Contains warnings per plugin point handlers (
UserNameChangeHandler , UserKeyChangeHandler , OwnershipTransferHandler , UserAnonymizationHandler ) described by subclass of ModuleDescriptor . |
String |
toString() |
error, error, error, from, from, get, getReturnedValue, ok
getErrorCollection, getWarningCollection, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fold
getErrorCollection, getWarningCollection, hasWarnings, isValid
public ServiceOutcomeWithWarnings(@Nullable T value, @Nonnull ErrorCollection errorCollection, @Nonnull Map<com.atlassian.plugin.ModuleDescriptor,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.public ServiceOutcomeWithWarnings(@Nullable T value, @Nonnull Map<com.atlassian.plugin.ModuleDescriptor,ErrorCollection> warnings)
warnings
- Map of warnings returned by property change handlers during processing user key change.public Map<com.atlassian.plugin.ModuleDescriptor,ErrorCollection> getWarnings()
UserNameChangeHandler
, UserKeyChangeHandler
, OwnershipTransferHandler
, UserAnonymizationHandler
) described by subclass of ModuleDescriptor
.
Values of this map should contain actual errors (meaning that ErrorCollection#hasAnyErrors();
returns true) so to detect if there are valid/non empty warnings getWarnings().isEmpty()
should be sufficient.Copyright © 2002-2019 Atlassian. All Rights Reserved.