use of org.pentaho.di.trans.steps.loadsave.validator.ObjectLocationSpecificationMethodLoadSaveValidator in project pentaho-kettle by pentaho.
the class MetaInjectMetaLoadSaveTest method setUpLoadSave.
@Before
public void setUpLoadSave() throws Exception {
KettleEnvironment.init();
PluginRegistry.init(true);
List<String> attributes = Arrays.asList("transName", "fileName", "directoryPath", "sourceStepName", "targetFile", "noExecution", "streamSourceStepname", "streamTargetStepname", "transObjectId", "specificationMethod", "sourceOutputFields");
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("sourceOutputFields", new ListLoadSaveValidator<MetaInjectOutputField>(new MetaInjectOutputFieldLoadSaveValidator(), 5));
//
// Note - these seem to be runtime-built and not persisted.
// attrValidatorMap.put( "metaInjectMapping",
// new ListLoadSaveValidator<MetaInjectMapping>( new MetaInjectMappingLoadSaveValidator(), 5 ) );
// attrValidatorMap.put( "targetSourceMapping",
// new MapLoadSaveValidator<TargetStepAttribute, SourceStepField>(
// new TargetStepAttributeLoadSaveValidator(),
// new SourceStepFieldLoadSaveValidator(),
// 5 ) );
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.ObjectLocationSpecificationMethodLoadSaveValidator 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.ObjectLocationSpecificationMethodLoadSaveValidator in project pentaho-kettle by pentaho.
the class SingleThreaderMetaTest method setUpLoadSave.
@Before
public void setUpLoadSave() throws Exception {
KettleEnvironment.init();
PluginRegistry.init(false);
List<String> attributes = Arrays.asList("transName", "fileName", "directoryPath", "batchSize", "batchTime", "injectStep", "retrieveStep", "passingAllParameters", "specificationMethod", "transObjectId", "parameters", "parameterValues");
Map<String, String> getterMap = new HashMap<String, String>();
Map<String, String> setterMap = new HashMap<String, String>();
FieldLoadSaveValidator<String[]> stringArrayLoadSaveValidator = new ArrayLoadSaveValidator<String>(new StringLoadSaveValidator(), 5);
Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
attrValidatorMap.put("parameters", stringArrayLoadSaveValidator);
attrValidatorMap.put("parameterValues", stringArrayLoadSaveValidator);
attrValidatorMap.put("specificationMethod", new ObjectLocationSpecificationMethodLoadSaveValidator());
attrValidatorMap.put("transObjectId", new ObjectIdLoadSaveValidator());
Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
loadSaveTester = new LoadSaveTester(testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(), getterMap, setterMap, attrValidatorMap, typeValidatorMap, this);
}
use of org.pentaho.di.trans.steps.loadsave.validator.ObjectLocationSpecificationMethodLoadSaveValidator 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