Package com.github.dandelion.datatables.core.exception

Examples of com.github.dandelion.datatables.core.exception.ConfigurationProcessingException


          StringBuilder sb = new StringBuilder();
          sb.append("'");
          sb.append(insert);
          sb.append("' is not a valid insert mode. Possible values are: ");
          sb.append(EnumUtils.printPossibleValuesOf(InsertMode.class));
          throw new ConfigurationProcessingException(sb.toString());
        }
      } else {
        insertMode = InsertMode.BEFOREALL;
      }

      Set<String> bundleSet = new HashSet<String>(Arrays.asList(bundles.split(",")));
      if (configs.get(tableId).containsKey(ConfType.EXTRAJS)) {
        ((Set<ExtraJs>) configs.get(tableId).get(ConfType.EXTRAJS)).add(new ExtraJs(bundleSet,
            insertMode));
      }
      else {
        Set<ExtraJs> extraFiles = new HashSet<ExtraJs>();
        extraFiles.add(new ExtraJs(bundleSet, insertMode));
        configs.get(tableId).put(ConfType.EXTRAJS, extraFiles);

      }
    } else {
      throw new ConfigurationProcessingException(
          "The attribute 'dt:bundles' is required when defining an extra JavaScript.");
    }
  }
View Full Code Here


        StringBuilder sb = new StringBuilder();
        sb.append("'");
        sb.append(stringifiedValue);
        sb.append("' is not a valid filter type. Possible values are: ");
        sb.append(EnumUtils.printPossibleValuesOf(FilterType.class));
        throw new ConfigurationProcessingException(sb.toString(), e);
      }

      updateEntry(filterType);
    }
  }
View Full Code Here

      String name = getStringValue(element, "name");
      ConfigToken<?> configToken = TableConfig.findByPropertyName(name);
      String value = getStringValue(element, "value");

      if (configToken == null) {
        throw new ConfigurationProcessingException("'" + name
            + "' is not a valid property. Please read the documentation.");
      } else {

        if (configs.get(tableId).containsKey(ConfType.PROPERTY)) {
          ((Map<ConfigToken<?>, Object>) configs.get(tableId).get(ConfType.PROPERTY)).put(configToken,
              value);
        } else {
          Map<ConfigToken<?>, Object> stagingConf = new HashMap<ConfigToken<?>, Object>();
          stagingConf.put(configToken, value);
          configs.get(tableId).put(ConfType.PROPERTY, stagingConf);
        }
      }
    } else {
      throw new ConfigurationProcessingException(
          "The attribute 'dt:name' is required when overloading a configuration property.");
    }
  }
View Full Code Here

        StringBuilder sb = new StringBuilder();
        sb.append("'");
        sb.append(stringifiedValue);
        sb.append("' is not a valid theme option. Possible values are: ");
        sb.append(EnumUtils.printPossibleValuesOf(ThemeOption.class));
        throw new ConfigurationProcessingException(sb.toString(), e);
      }

      updateEntry(themeOption);
    }
  }
View Full Code Here

        StringBuilder sb = new StringBuilder();
        sb.append("'");
        sb.append(stringifiedValue);
        sb.append("' is not a valid theme name. Possible values are: ");
        sb.append(EnumUtils.printPossibleValuesOf(Theme.class));
        throw new ConfigurationProcessingException(sb.toString());
      }

      updateEntry(theme);
    }
  }
View Full Code Here

    FilterPlaceholder placeholder = null;
    if (StringUtils.isNotBlank(stringifiedValue)) {
      try {
        placeholder = FilterPlaceholder.valueOf(stringifiedValue.toUpperCase());
      } catch (IllegalArgumentException e) {
        throw new ConfigurationProcessingException(stringifiedValue + " is not a valid value among "
            + FilterPlaceholder.values(), e);
      }
    }

    updateEntry(placeholder);
View Full Code Here

    PaginationType type = null;
    if (StringUtils.isNotBlank(stringifiedValue)) {
      try {
        type = PaginationType.valueOf(stringifiedValue.toUpperCase());
      } catch (IllegalArgumentException e) {
        throw new ConfigurationProcessingException(stringifiedValue + " is not a valid value among "
            + PaginationType.values(), e);
      }

      switch (type) {
      case INPUT:
View Full Code Here

        String[] tmp2 = tmp[0].split(",");
        String[] tmp3 = tmp[1].split(",");
        if (tmp2.length == tmp3.length) {
          retval = "[[" + tmp[0] + "],[" + tmp[1] + "]]";
        } else {
          throw new ConfigurationProcessingException(
              "You must provide the exact same number of elements separated by a \";\"");
        }
      } else {
        retval = "[" + stringifiedValue + "]";
      }
View Full Code Here

TOP

Related Classes of com.github.dandelion.datatables.core.exception.ConfigurationProcessingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.