@Test public void testExportResources() throws KettleException { JobExecutorMeta jobExecutorMeta = spy( new JobExecutorMeta() ); JobMeta jobMeta = mock( JobMeta.class ); String testName = "test"; doReturn( jobMeta ).when( jobExecutorMeta ).loadJobMetaProxy( any( JobExecutorMeta.class ), any( Repository.class ), any( VariableSpace.class ) ); when( jobMeta.exportResources( any( JobMeta.class ), any( Map.class ), any( ResourceNamingInterface.class ), any( Repository.class ), any( IMetaStore.class ) ) ).thenReturn( testName ); jobExecutorMeta.exportResources( null, null, null, null, null ); verify( jobMeta ).setFilename( "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + testName ); verify( jobExecutorMeta ).setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); }
@Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { JobMeta executorJobMeta = loadJobMetaProxy( this, repository, space ); String proposedNewFilename = executorJobMeta.exportResources( executorJobMeta, definitions, resourceNamingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; executorJobMeta.setFilename( newFilename ); executorJobMeta.setRepositoryDirectory( new RepositoryDirectory() ); fileName = newFilename; setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); return proposedNewFilename; } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobExecutorMeta.Exception.UnableToLoadJob", fileName ) ); } }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { JobMeta executorJobMeta = loadJobMetaProxy( this, repository, space ); String proposedNewFilename = executorJobMeta.exportResources( executorJobMeta, definitions, resourceNamingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; executorJobMeta.setFilename( newFilename ); executorJobMeta.setRepositoryDirectory( new RepositoryDirectory() ); fileName = newFilename; setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); return proposedNewFilename; } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobExecutorMeta.Exception.UnableToLoadJob", fileName ) ); } } }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { JobMeta executorJobMeta = loadJobMetaProxy( this, repository, space ); String proposedNewFilename = executorJobMeta.exportResources( executorJobMeta, definitions, resourceNamingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; executorJobMeta.setFilename( newFilename ); executorJobMeta.setRepositoryDirectory( new RepositoryDirectory() ); fileName = newFilename; setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); return proposedNewFilename; } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobExecutorMeta.Exception.UnableToLoadJob", fileName ) ); } } JobExecutorMeta(); }
JobExecutorMeta extends BaseStepMeta implements StepMetaInterface, HasRepositoryInterface,
  HasRepositoryDirectories { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { JobMeta executorJobMeta = loadJobMetaProxy( this, repository, space ); String proposedNewFilename = executorJobMeta.exportResources( executorJobMeta, definitions, resourceNamingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; executorJobMeta.setFilename( newFilename ); executorJobMeta.setRepositoryDirectory( new RepositoryDirectory() ); fileName = newFilename; setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); return proposedNewFilename; } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobExecutorMeta.Exception.UnableToLoadJob", fileName ) ); } } 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 { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { JobMeta executorJobMeta = loadJobMetaProxy( this, repository, space ); String proposedNewFilename = executorJobMeta.exportResources( executorJobMeta, definitions, resourceNamingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; executorJobMeta.setFilename( newFilename ); executorJobMeta.setRepositoryDirectory( new RepositoryDirectory() ); fileName = newFilename; setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); return proposedNewFilename; } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobExecutorMeta.Exception.UnableToLoadJob", fileName ) ); } } 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();  }