Class ServiceOutcomeWithWarnings<T>
java.lang.Object
com.atlassian.jira.bc.ServiceResultImpl
com.atlassian.jira.bc.ServiceOutcomeImpl<T>
com.atlassian.jira.user.anonymize.ServiceOutcomeWithWarnings<T>
- All Implemented Interfaces:
ServiceOutcome<T>
,ServiceResult
,Serializable
Result with warnings from handlers.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServiceOutcomeWithWarnings
(T value, ErrorCollection errorCollection, Map<String, ErrorCollection> warnings) Constructs result, possibly not successful.ServiceOutcomeWithWarnings
(T value, Map<String, ErrorCollection> warnings) Constructs successful result. -
Method Summary
Modifier and TypeMethodDescriptionContains warnings per plugin point handlers (UserNameChangeHandler
,UserKeyChangeHandler
,OwnershipTransferHandler
,UserAnonymizationHandler
) described by the complete key of a module (ModuleDescriptor.getCompleteKey()
).toString()
Methods inherited from class com.atlassian.jira.bc.ServiceOutcomeImpl
error, error, error, from, from, get, getReturnedValue, ok
Methods inherited from class com.atlassian.jira.bc.ServiceResultImpl
getErrorCollection, getWarningCollection, isValid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.jira.bc.ServiceOutcome
fold
Methods inherited from interface com.atlassian.jira.bc.ServiceResult
getErrorCollection, getWarningCollection, hasWarnings, isValid
-
Constructor Details
-
ServiceOutcomeWithWarnings
public ServiceOutcomeWithWarnings(@Nullable T value, @Nonnull ErrorCollection errorCollection, @Nonnull Map<String, ErrorCollection> warnings) Constructs result, possibly not successful.- Parameters:
errorCollection
- Collection of errors. Use empty collection for successful response.warnings
- Map of warnings returned by property change handlers during processing user key change.
-
ServiceOutcomeWithWarnings
Constructs successful result.- Parameters:
warnings
- Map of warnings returned by property change handlers during processing user key change.
-
-
Method Details
-
getWarnings
Contains warnings per plugin point handlers (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 warningsgetWarnings().isEmpty()
should be sufficient.- Returns:
- Map of warnings returned by anonymization handlers anonymization process.
-
toString
-