// Path: src/main/java/com/cloudera/director/spi/v2/model/exception/PluginExceptionCondition.java
// public static enum Type {
// 
//   /**
//    * Represents an error.
//    */
//   ERROR,
// 
//   /**
//    * Represents a warning.
//    */
//   WARNING
// }


import static com.cloudera.director.spi.v2.model.exception.PluginExceptionCondition.Type;
import static com.cloudera.director.spi.v2.model.exception.PluginExceptionCondition.Type.ERROR;
import static com.cloudera.director.spi.v2.model.exception.PluginExceptionCondition.Type.WARNING;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
// (c) Copyright 2015 Cloudera, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.cloudera.director.spi.v2.model.exception;



/**
 * Accumulator for plugin exception conditions.
 */
public class PluginExceptionConditionAccumulator {

  /**
   * The conditions contributing to the exception, partitioned by key. The {@code null} key
   * represents general conditions not tied to a specific key.
   */
  private final Map<String, Collection<PluginExceptionCondition>> conditionsByKey;

  /**
   * The condition types observed so far.
   */
// Path: src/main/java/com/cloudera/director/spi/v2/model/exception/PluginExceptionCondition.java
// public static enum Type {
// 
//   /**
//    * Represents an error.
//    */
//   ERROR,
// 
//   /**
//    * Represents a warning.
//    */
//   WARNING
// }


// Path: src/main/java/com/cloudera/director/spi/v2/model/exception/PluginExceptionConditionAccumulator.java
import static com.cloudera.director.spi.v2.model.exception.PluginExceptionCondition.Type;
import static com.cloudera.director.spi.v2.model.exception.PluginExceptionCondition.Type.ERROR;
import static com.cloudera.director.spi.v2.model.exception.PluginExceptionCondition.Type.WARNING;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

// (c) Copyright 2015 Cloudera, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.cloudera.director.spi.v2.model.exception;



/**
 * Accumulator for plugin exception conditions.
 */
public class PluginExceptionConditionAccumulator {

  /**
   * The conditions contributing to the exception, partitioned by key. The {@code null} key
   * represents general conditions not tied to a specific key.
   */
  private final Map<String, Collection<PluginExceptionCondition>> conditionsByKey;

  /**
   * The condition types observed so far.
   */
  private final Set<Type> conditionTypes;