public class ServiceResultWithWarnings extends ServiceResultImpl
Constructor and Description |
---|
ServiceResultWithWarnings(ErrorCollection errorCollection,
Map<String,ErrorCollection> warnings)
Constructs result, possibly not successful.
|
ServiceResultWithWarnings(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() ). |
getErrorCollection, getWarningCollection, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasWarnings
public ServiceResultWithWarnings(@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.public ServiceResultWithWarnings(@Nonnull Map<String,ErrorCollection> warnings)
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-2023 Atlassian. All Rights Reserved.