use of io.atlasmap.v2.Camelize in project atlasmap by atlasmap.
the class DefaultAtlasFieldActionService method detectFieldActionParameters.
protected Properties detectFieldActionParameters(String actionClassName) throws ClassNotFoundException {
Class<?> actionClazz = Class.forName(actionClassName);
Properties props = null;
for (Method method : actionClazz.getMethods()) {
// Find setters to avoid the get / is confusion
if (method.getParameterCount() == 1 && method.getName().startsWith("set")) {
// We have a parameter
if (props == null) {
props = new Properties();
}
Property prop = null;
for (Parameter param : method.getParameters()) {
prop = new Property();
prop.setName(camelize(method.getName().substring("set".length())));
prop.setFieldType(getConversionService().fieldTypeFromClass(param.getType()));
props.getProperty().add(prop);
}
}
}
return props;
}
use of io.atlasmap.v2.Camelize in project atlasmap by atlasmap.
the class BaseMarshallerTest method generateActions.
private Actions generateActions() {
Actions actions = new Actions();
actions.getActions().add(new Camelize());
actions.getActions().add(new Capitalize());
actions.getActions().add(new Length());
actions.getActions().add(new Lowercase());
actions.getActions().add(new SeparateByDash());
actions.getActions().add(new SeparateByUnderscore());
actions.getActions().add(new Trim());
actions.getActions().add(new TrimLeft());
actions.getActions().add(new TrimRight());
actions.getActions().add(new Uppercase());
return actions;
}
use of io.atlasmap.v2.Camelize in project atlasmap by atlasmap.
the class BaseMarshallerTest method generateActions.
private Actions generateActions() {
Actions actions = new Actions();
actions.getActions().add(new Camelize());
actions.getActions().add(new Capitalize());
actions.getActions().add(new Length());
actions.getActions().add(new Lowercase());
actions.getActions().add(new SeparateByDash());
actions.getActions().add(new SeparateByUnderscore());
actions.getActions().add(new Trim());
actions.getActions().add(new TrimLeft());
actions.getActions().add(new TrimRight());
actions.getActions().add(new Uppercase());
return actions;
}
use of io.atlasmap.v2.Camelize in project atlasmap by atlasmap.
the class BaseMarshallerTest method generateActions.
private void generateActions(JsonField inputField) {
Actions actions = new Actions();
actions.getActions().add(new Camelize());
actions.getActions().add(new Capitalize());
actions.getActions().add(new Length());
actions.getActions().add(new Lowercase());
actions.getActions().add(new SeparateByDash());
actions.getActions().add(new SeparateByUnderscore());
actions.getActions().add(new Trim());
actions.getActions().add(new TrimLeft());
actions.getActions().add(new TrimRight());
actions.getActions().add(new Uppercase());
inputField.setActions(actions);
}
Aggregations