use of org.pentaho.di.trans.steps.loadsave.validator.MappingIODefinitionLoadSaveValidator in project pentaho-kettle by pentaho.
the class SimpleMappingMetaTest method setUpLoadSave.
@Before
public void setUpLoadSave() throws Exception {
KettleEnvironment.init();
PluginRegistry.init(false);
List<String> attributes = Arrays.asList("transName", "fileName", "directoryPath", "transObjectId", "specificationMethod", "inputMapping", "outputMapping", "mappingParameters");
Map<String, String> getterMap = new HashMap<String, String>();
Map<String, String> setterMap = new HashMap<String, String>();
Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
attrValidatorMap.put("transObjectId", new ObjectIdLoadSaveValidator());
attrValidatorMap.put("specificationMethod", new ObjectLocationSpecificationMethodLoadSaveValidator());
attrValidatorMap.put("inputMapping", new MappingIODefinitionLoadSaveValidator());
attrValidatorMap.put("outputMapping", new MappingIODefinitionLoadSaveValidator());
attrValidatorMap.put("mappingParameters", new MappingParametersLoadSaveValidator());
Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
loadSaveTester = new LoadSaveTester(testMetaClass, attributes, getterMap, setterMap, attrValidatorMap, typeValidatorMap);
}
use of org.pentaho.di.trans.steps.loadsave.validator.MappingIODefinitionLoadSaveValidator in project pentaho-kettle by pentaho.
the class MappingMetaTest method setUpLoadSave.
@Before
public void setUpLoadSave() throws Exception {
KettleEnvironment.init();
PluginRegistry.init(false);
List<String> attributes = Arrays.asList("transName", "fileName", "directoryPath", "allowingMultipleInputs", "allowingMultipleOutputs", "specificationMethod", "transObjectId", "inputMappings", "outputMappings", "mappingParameters");
Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
attrValidatorMap.put("specificationMethod", new ObjectLocationSpecificationMethodLoadSaveValidator());
attrValidatorMap.put("transObjectId", new ObjectIdLoadSaveValidator());
attrValidatorMap.put("inputMappings", new ListLoadSaveValidator<MappingIODefinition>(new MappingIODefinitionLoadSaveValidator(), 5));
attrValidatorMap.put("outputMappings", new ListLoadSaveValidator<MappingIODefinition>(new MappingIODefinitionLoadSaveValidator(), 5));
attrValidatorMap.put("mappingParameters", new MappingParametersLoadSaveValidator());
Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
loadSaveTester = new LoadSaveTester(testMetaClass, attributes, new HashMap<String, String>(), new HashMap<String, String>(), attrValidatorMap, typeValidatorMap);
}
Aggregations