Class ServiceResultWithWarnings
java.lang.Object
com.atlassian.jira.bc.ServiceResultImpl
com.atlassian.jira.user.anonymize.ServiceResultWithWarnings
- All Implemented Interfaces:
ServiceResult,Serializable
Result with warnings from handlers.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServiceResultWithWarnings(ErrorCollection errorCollection, Map<String, ErrorCollection> warnings) Constructs result, possibly not successful.ServiceResultWithWarnings(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()).Methods inherited from class com.atlassian.jira.bc.ServiceResultImpl
getErrorCollection, getWarningCollection, isValidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.bc.ServiceResult
hasWarnings
-
Constructor Details
-
ServiceResultWithWarnings
public ServiceResultWithWarnings(@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.
-
ServiceResultWithWarnings
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 during anonymization process.
-