Class ServiceResultWithWarnings

java.lang.Object
com.atlassian.jira.bc.ServiceResultImpl
com.atlassian.jira.user.anonymize.ServiceResultWithWarnings
All Implemented Interfaces:
ServiceResult, Serializable

public class ServiceResultWithWarnings extends ServiceResultImpl
Result with warnings from handlers.
See Also:
  • 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

      public ServiceResultWithWarnings(@Nonnull Map<String,ErrorCollection> warnings)
      Constructs successful result.
      Parameters:
      warnings - Map of warnings returned by property change handlers during processing user key change.
  • Method Details

    • getWarnings

      @Nonnull public Map<String,ErrorCollection> 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 warnings getWarnings().isEmpty() should be sufficient.

      Returns:
      Map of warnings returned by anonymization handlers during anonymization process.