if (entry.length == 1) {
if (i == 0) {
customClass = entry[0];
result.add(new ParamEntry<String, String>(CustomDecoder.CLASS_PROPERTY_NAME, entry[0]));
} else {
throw new EDIConfigurationException("Invalid use of paramaters in ValueNode. A parameter-entry should consist of a key-value-pair separated with the '='-character. Example: [parameters=\"key1=value1;key2=value2\"]");
}
} else if (entry.length == 2) {
result.add(new ParamEntry<String, String>(entry[0], entry[1]));
} else {
throw new EDIConfigurationException("Invalid use of paramaters in ValueNode. A parameter-entry should consist of a key-value-pair separated with the '='-character. Example: [parameters=\"key1=value1;key2=value2\"]");
}
}
valueNode.setDataTypeParameters(result);
if ( valueNode.getDataType().equals(EDITypeEnum.CUSTOM_NAME) && customClass == null) {
throw new EDIConfigurationException("When using the Custom type in ValueNode the custom class type must exist as the first element in parameters");
} else if ( customClass != null && !valueNode.getDataType().equals(EDITypeEnum.CUSTOM_NAME)) {
throw new EDIConfigurationException("When first parameter in list of parameters is not a key-value-pair the type of the ValueNode should be Custom.");
}
}
}