private void registerInputColumn(final Map<String, InputColumn<?>> inputColumns, final String id, final InputColumn<?> inputColumn) { if (StringUtils.isNullOrEmpty(id)) { throw new IllegalStateException("Column id cannot be null"); } if (inputColumns.containsKey(id)) { throw new ComponentConfigurationException("Column id is not unique: " + id); } inputColumns.put(id, inputColumn); }
} catch (final ComponentConfigurationException e) { final String message; final Throwable cause = e.getCause(); if (cause != null) { message = cause.getMessage(); } else { message = e.getMessage(); message = e.getMessage();
private ComponentRequirement getRequirement(final String ref, final Map<String, FilterOutcome> outcomeMapping) { if (AnyComponentRequirement.KEYWORD.equals(ref)) { return AnyComponentRequirement.get(); } // check for simple component requirements { final FilterOutcome filterOutcome = outcomeMapping.get(ref); if (filterOutcome != null) { return new SimpleComponentRequirement(filterOutcome); } } // check for compound component requirements final List<String> tokens = Lists.newArrayList(Splitter.on(" OR ").omitEmptyStrings().trimResults().split(ref)); if (tokens.size() > 1) { final List<FilterOutcome> list = new ArrayList<>(tokens.size()); for (final String token : tokens) { final FilterOutcome filterOutcome = outcomeMapping.get(token); if (filterOutcome == null) { throw new ComponentConfigurationException( "Could not resolve outcome '" + token + "' in requirement: " + ref); } list.add(filterOutcome); } return new CompoundComponentRequirement(list); } throw new ComponentConfigurationException("Could not resolve requirement: " + ref); }
private void setProperty(ComponentDescriptor<?> descriptor, Map<ConfiguredPropertyDescriptor, Object> propertyMap, String name, String valueString, StringConverter stringConverter) { final ConfiguredPropertyDescriptor configuredProperty = descriptor.getConfiguredProperty(name); if (configuredProperty == null) { throw new ComponentConfigurationException("No such configured property in class '" + getDescriptor().getComponentClass().getName() + "': " + name); } final Converter<?> customConverter = configuredProperty.createCustomConverter(); final Object value = stringConverter.deserialize(valueString, configuredProperty.getType(), customConverter); propertyMap.put(configuredProperty, value); }
@Override public boolean isConfigured(final ConfiguredPropertyDescriptor configuredProperty, final boolean throwException) { if (isMultipleJobsSupported() && configuredProperty == _escalatingInputProperty) { if (_escalatingInputColumns.isEmpty()) { final Object propertyValue = super.getConfiguredProperty(configuredProperty); if (propertyValue != null) { if (propertyValue.getClass().isArray() && Array.getLength(propertyValue) > 0) { setConfiguredProperty(configuredProperty, propertyValue); return isConfigured(configuredProperty, throwException); } } if (throwException) { throw new ComponentConfigurationException( "No input columns configured for " + LabelUtils.getLabel(this)); } else { return false; } } return true; } return super.isConfigured(configuredProperty, throwException); }
final Enum<?> category = filterBuilder.getDescriptor().getOutcomeCategoryByName(categoryName); if (category == null) { throw new ComponentConfigurationException( "No such outcome category name: " + categoryName + " (in " + filterBuilder .getDescriptor().getDisplayName() + ")"); throw new ComponentConfigurationException("Outcome id '" + id + "' is not unique");
transformerBuilder.isConfigured(true); } catch (final Exception e) { throw new ComponentConfigurationException(message, e); throw new ComponentConfigurationException(message); throw new ComponentConfigurationException( "Could not connect column dependencies for components: " + sb.toString());
throw new ComponentConfigurationException("No such property: " + name); throw new ComponentConfigurationException("No such variable: " + variableRef);