@Test public void testLoadJobMeta() throws KettleException { String param1 = "param1"; String param2 = "param2"; String param3 = "param3"; String parentValue1 = "parentValue1"; String parentValue2 = "parentValue2"; String childValue3 = "childValue3"; JobExecutorMeta jobExecutorMeta = spy( new JobExecutorMeta() ); Repository repository = Mockito.mock( Repository.class ); JobMeta meta = new JobMeta(); meta.setVariable( param2, "childValue2 should be override" ); meta.setVariable( param3, childValue3 ); Mockito.doReturn( meta ).when( repository ) .loadJob( Mockito.eq( "test.kjb" ), Mockito.anyObject(), Mockito.anyObject(), Mockito.anyObject() ); VariableSpace parentSpace = new Variables(); parentSpace.setVariable( param1, parentValue1 ); parentSpace.setVariable( param2, parentValue2 ); jobExecutorMeta.setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); jobExecutorMeta.setFileName( "/home/admin/test.kjb" ); JobMeta jobMeta; jobExecutorMeta.getParameters().setInheritingAllVariables( false ); jobMeta = JobExecutorMeta.loadJobMeta( jobExecutorMeta, repository, parentSpace ); Assert.assertEquals( null, jobMeta.getVariable( param1 ) ); Assert.assertEquals( parentValue2, jobMeta.getVariable( param2 ) ); Assert.assertEquals( childValue3, jobMeta.getVariable( param3 ) ); jobExecutorMeta.getParameters().setInheritingAllVariables( true ); jobMeta = JobExecutorMeta.loadJobMeta( jobExecutorMeta, repository, parentSpace ); Assert.assertEquals( parentValue1, jobMeta.getVariable( param1 ) ); Assert.assertEquals( parentValue2, jobMeta.getVariable( param2 ) ); Assert.assertEquals( childValue3, jobMeta.getVariable( param3 ) ); }
public static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep, VariableSpace space ) throws KettleException { return loadJobMeta( executorMeta, rep, null, space ); }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { public static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep, VariableSpace space ) throws KettleException { return loadJobMeta( executorMeta, rep, null, space ); } }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { public static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep, VariableSpace space ) throws KettleException { return loadJobMeta( executorMeta, rep, null, space ); } JobExecutorMeta(); }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { public static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep, VariableSpace space ) throws KettleException { return loadJobMeta( executorMeta, rep, null, space ); } JobExecutorMeta(); @Override Object clone(); @Override String getXML(); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void setDefault(); @Override void getFields( RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ); String[] getInfoSteps(); String[] getTargetSteps(); static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep,
    VariableSpace space ); static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep,
    IMetaStore metaStore, VariableSpace space ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
    Trans trans ); @Override List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
    ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); @Override StepDataInterface getStepData(); @Override StepIOMetaInterface getStepIOMeta(); @Override void handleStreamSelection( StreamInterface stream ); @Override void resetStepIoMeta(); @Override void searchInfoAndTargetSteps( List<StepMeta> steps ); @Override TransformationType[] getSupportedTransformationTypes(); @Override boolean hasRepositoryReferences(); @Override void lookupRepositoryReferences( Repository repository ); String getDirectoryPath(); void setDirectoryPath( String directoryPath ); @Override String[] getDirectories(); @Override void setDirectories( String[] directories ); String getFileName(); void setFileName( String fileName ); JobExecutorParameters getMappingParameters(); void setMappingParameters( JobExecutorParameters mappingParameters ); @Override Repository getRepository(); @Override void setRepository( Repository repository ); ObjectLocationSpecificationMethod getSpecificationMethod(); @Override ObjectLocationSpecificationMethod[] getSpecificationMethods(); void setSpecificationMethod( ObjectLocationSpecificationMethod specificationMethod ); String getJobName(); void setJobName( String jobName ); ObjectId getJobObjectId(); void setJobObjectId( ObjectId jobObjectId ); JobExecutorParameters getParameters(); void setParameters( JobExecutorParameters parameters ); String getExecutionTimeField(); void setExecutionTimeField( String executionTimeField ); String getExecutionResultField(); void setExecutionResultField( String executionResultField ); String getExecutionNrErrorsField(); void setExecutionNrErrorsField( String executionNrErrorsField ); String getExecutionLinesReadField(); void setExecutionLinesReadField( String executionLinesReadField ); String getExecutionLinesWrittenField(); void setExecutionLinesWrittenField( String executionLinesWrittenField ); String getExecutionLinesInputField(); void setExecutionLinesInputField( String executionLinesInputField ); String getExecutionLinesOutputField(); void setExecutionLinesOutputField( String executionLinesOutputField ); String getExecutionLinesRejectedField(); void setExecutionLinesRejectedField( String executionLinesRejectedField ); String getExecutionLinesUpdatedField(); void setExecutionLinesUpdatedField( String executionLinesUpdatedField ); String getExecutionLinesDeletedField(); void setExecutionLinesDeletedField( String executionLinesDeletedField ); String getExecutionFilesRetrievedField(); void setExecutionFilesRetrievedField( String executionFilesRetrievedField ); String getExecutionExitStatusField(); void setExecutionExitStatusField( String executionExitStatusField ); String getExecutionLogTextField(); void setExecutionLogTextField( String executionLogTextField ); String getExecutionLogChannelIdField(); void setExecutionLogChannelIdField( String executionLogChannelIdField ); String getResultRowsTargetStep(); void setResultRowsTargetStep( String resultRowsTargetStep ); String[] getResultRowsField(); void setResultRowsField( String[] resultRowsField ); int[] getResultRowsType(); void setResultRowsType( int[] resultRowsType ); int[] getResultRowsLength(); void setResultRowsLength( int[] resultRowsLength ); int[] getResultRowsPrecision(); void setResultRowsPrecision( int[] resultRowsPrecision ); String getResultFilesTargetStep(); void setResultFilesTargetStep( String resultFilesTargetStep ); StepMeta getResultRowsTargetStepMeta(); void setResultRowsTargetStepMeta( StepMeta resultRowsTargetStepMeta ); StepMeta getResultFilesTargetStepMeta(); void setResultFilesTargetStepMeta( StepMeta resultFilesTargetStepMeta ); String getGroupSize(); void setGroupSize( String groupSize ); String getGroupField(); void setGroupField( String groupField ); String getGroupTime(); void setGroupTime( String groupTime ); @Override boolean excludeFromCopyDistributeVerification(); String getExecutionResultTargetStep(); void setExecutionResultTargetStep( String executionResultTargetStep ); StepMeta getExecutionResultTargetStepMeta(); void setExecutionResultTargetStepMeta( StepMeta executionResultTargetStepMeta ); String getResultFilesFileNameField(); void setResultFilesFileNameField( String resultFilesFileNameField ); @Override String[] getReferencedObjectDescriptions(); @Override boolean[] isReferencedObjectEnabled(); @Override Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ); void setMetaStore( IMetaStore metaStore ); IMetaStore getMetaStore(); @Override boolean cleanAfterHopFromRemove(); }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { public static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep, VariableSpace space ) throws KettleException { return loadJobMeta( executorMeta, rep, null, space ); } JobExecutorMeta(); @Override Object clone(); @Override String getXML(); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void setDefault(); @Override void getFields( RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ); String[] getInfoSteps(); String[] getTargetSteps(); static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep,
    VariableSpace space ); static final synchronized JobMeta loadJobMeta( JobExecutorMeta executorMeta, Repository rep,
    IMetaStore metaStore, VariableSpace space ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
    Trans trans ); @Override List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
    ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); @Override StepDataInterface getStepData(); @Override StepIOMetaInterface getStepIOMeta(); @Override void handleStreamSelection( StreamInterface stream ); @Override void resetStepIoMeta(); @Override void searchInfoAndTargetSteps( List<StepMeta> steps ); @Override TransformationType[] getSupportedTransformationTypes(); @Override boolean hasRepositoryReferences(); @Override void lookupRepositoryReferences( Repository repository ); String getDirectoryPath(); void setDirectoryPath( String directoryPath ); @Override String[] getDirectories(); @Override void setDirectories( String[] directories ); String getFileName(); void setFileName( String fileName ); JobExecutorParameters getMappingParameters(); void setMappingParameters( JobExecutorParameters mappingParameters ); @Override Repository getRepository(); @Override void setRepository( Repository repository ); ObjectLocationSpecificationMethod getSpecificationMethod(); @Override ObjectLocationSpecificationMethod[] getSpecificationMethods(); void setSpecificationMethod( ObjectLocationSpecificationMethod specificationMethod ); String getJobName(); void setJobName( String jobName ); ObjectId getJobObjectId(); void setJobObjectId( ObjectId jobObjectId ); JobExecutorParameters getParameters(); void setParameters( JobExecutorParameters parameters ); String getExecutionTimeField(); void setExecutionTimeField( String executionTimeField ); String getExecutionResultField(); void setExecutionResultField( String executionResultField ); String getExecutionNrErrorsField(); void setExecutionNrErrorsField( String executionNrErrorsField ); String getExecutionLinesReadField(); void setExecutionLinesReadField( String executionLinesReadField ); String getExecutionLinesWrittenField(); void setExecutionLinesWrittenField( String executionLinesWrittenField ); String getExecutionLinesInputField(); void setExecutionLinesInputField( String executionLinesInputField ); String getExecutionLinesOutputField(); void setExecutionLinesOutputField( String executionLinesOutputField ); String getExecutionLinesRejectedField(); void setExecutionLinesRejectedField( String executionLinesRejectedField ); String getExecutionLinesUpdatedField(); void setExecutionLinesUpdatedField( String executionLinesUpdatedField ); String getExecutionLinesDeletedField(); void setExecutionLinesDeletedField( String executionLinesDeletedField ); String getExecutionFilesRetrievedField(); void setExecutionFilesRetrievedField( String executionFilesRetrievedField ); String getExecutionExitStatusField(); void setExecutionExitStatusField( String executionExitStatusField ); String getExecutionLogTextField(); void setExecutionLogTextField( String executionLogTextField ); String getExecutionLogChannelIdField(); void setExecutionLogChannelIdField( String executionLogChannelIdField ); String getResultRowsTargetStep(); void setResultRowsTargetStep( String resultRowsTargetStep ); String[] getResultRowsField(); void setResultRowsField( String[] resultRowsField ); int[] getResultRowsType(); void setResultRowsType( int[] resultRowsType ); int[] getResultRowsLength(); void setResultRowsLength( int[] resultRowsLength ); int[] getResultRowsPrecision(); void setResultRowsPrecision( int[] resultRowsPrecision ); String getResultFilesTargetStep(); void setResultFilesTargetStep( String resultFilesTargetStep ); StepMeta getResultRowsTargetStepMeta(); void setResultRowsTargetStepMeta( StepMeta resultRowsTargetStepMeta ); StepMeta getResultFilesTargetStepMeta(); void setResultFilesTargetStepMeta( StepMeta resultFilesTargetStepMeta ); String getGroupSize(); void setGroupSize( String groupSize ); String getGroupField(); void setGroupField( String groupField ); String getGroupTime(); void setGroupTime( String groupTime ); @Override boolean excludeFromCopyDistributeVerification(); String getExecutionResultTargetStep(); void setExecutionResultTargetStep( String executionResultTargetStep ); StepMeta getExecutionResultTargetStepMeta(); void setExecutionResultTargetStepMeta( StepMeta executionResultTargetStepMeta ); String getResultFilesFileNameField(); void setResultFilesFileNameField( String resultFilesFileNameField ); @Override String[] getReferencedObjectDescriptions(); @Override boolean[] isReferencedObjectEnabled(); @Override Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ); void setMetaStore( IMetaStore metaStore ); IMetaStore getMetaStore(); @Override boolean cleanAfterHopFromRemove();  }