public List<PlotConfigurationError> getErrors() {
    List<PlotConfigurationError> errors = new LinkedList<PlotConfigurationError>();

    for (ValueSourceData valueSourceData : getValueSourcesData()) {
      errors.addAll(valueSourceData.getErrors());
    }

    for (DimensionConfigData data : dimensionConfigDataMap.values()) {
      if (data.getDimensionConfig().getDimension() == PlotDimension.DOMAIN) {
        continue;
      } else {
        List<PlotConfigurationError> error = data.getErrors();
        errors.addAll(error);
      }
    }

    // check domain dimension for errors depending on grouping state
    DomainConfigManager domainConfigManager =
        plotInstance.getCurrentPlotConfigurationClone().getDomainConfigManager();
    GroupingState groupingState = domainConfigManager.getGroupingState();
    switch (groupingState) {
      case GROUPED:
        errors.addAll(
            getDimensionConfigData(domainConfigManager.getDomainConfig(true)).getErrors());
        break;
      case PARTIALLY_GROUPED:
        errors.addAll(
            getDimensionConfigData(domainConfigManager.getDomainConfig(true)).getErrors());
        errors.addAll(
            getDimensionConfigData(domainConfigManager.getDomainConfig(false)).getErrors());
        break;
      case UNGROUPED:
        errors.addAll(
            getDimensionConfigData(domainConfigManager.getDomainConfig(false)).getErrors());
        break;
    }

    for (RangeAxisData data : rangeAxisDataMap.values()) {
      errors.addAll(data.getErrors());
    }

    errors.addAll(domainConfigManagerData.getErrors());

    return errors;
  }
  public List<PlotConfigurationError> getWarnings() {
    List<PlotConfigurationError> warnings = new LinkedList<PlotConfigurationError>();
    for (ValueSourceData valueSourceData : getValueSourcesData()) {
      warnings.addAll(valueSourceData.getErrors());
    }
    boolean xAddedWarning = false;
    for (DimensionConfigData data : dimensionConfigDataMap.values()) {
      List<PlotConfigurationError> warning = data.getWarnings();
      if (data.getDimensionConfig().getDimension() == PlotDimension.DOMAIN) {
        if (!xAddedWarning) {
          xAddedWarning = warning.size() > 0;
          warnings.addAll(warning);
        }
      } else {
        warnings.addAll(warning);
      }
    }
    for (RangeAxisData data : rangeAxisDataMap.values()) {
      warnings.addAll(data.getWarnings());
    }

    warnings.addAll(domainConfigManagerData.getWarnings());
    return warnings;
  }