@Test public void testExportResources() throws KettleException { JobEntryTrans jobEntryTrans = spy( getJobEntryTrans() ); TransMeta transMeta = mock( TransMeta.class ); String testName = "test"; doReturn( transMeta ).when( jobEntryTrans ).getTransMeta( any( Repository.class ), any( VariableSpace.class ) ); when( transMeta.exportResources( any( TransMeta.class ), any( Map.class ), any( ResourceNamingInterface.class ), any( Repository.class ), any( IMetaStore.class ) ) ).thenReturn( testName ); jobEntryTrans.exportResources( null, null, null, null, null ); verify( transMeta ).setFilename( "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + testName ); verify( jobEntryTrans ).setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); }
@Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { copyVariablesFrom( space ); TransMeta transMeta = getTransMeta( repository, space ); String proposedNewFilename = transMeta.exportResources( transMeta, definitions, namingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; transMeta.setFilename( newFilename ); transMeta.setRepositoryDirectory( new RepositoryDirectory() ); setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); filename = newFilename; return proposedNewFilename; }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { copyVariablesFrom( space ); TransMeta transMeta = getTransMeta( repository, space ); String proposedNewFilename = transMeta.exportResources( transMeta, definitions, namingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; transMeta.setFilename( newFilename ); transMeta.setRepositoryDirectory( new RepositoryDirectory() ); setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); filename = newFilename; return proposedNewFilename; } }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { copyVariablesFrom( space ); TransMeta transMeta = getTransMeta( repository, space ); String proposedNewFilename = transMeta.exportResources( transMeta, definitions, namingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; transMeta.setFilename( newFilename ); transMeta.setRepositoryDirectory( new RepositoryDirectory() ); setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); filename = newFilename; return proposedNewFilename; } JobEntryTrans( String name );  JobEntryTrans(); }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { copyVariablesFrom( space ); TransMeta transMeta = getTransMeta( repository, space ); String proposedNewFilename = transMeta.exportResources( transMeta, definitions, namingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; transMeta.setFilename( newFilename ); transMeta.setRepositoryDirectory( new RepositoryDirectory() ); setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); filename = newFilename; return proposedNewFilename; } JobEntryTrans( String name );  JobEntryTrans(); @Override Object clone(); void setFileName( String n ); @Deprecated String getFileName(); @Override String getFilename(); @Override String getRealFilename(); void setTransname( String transname ); String getTransname(); String getDirectory(); void setDirectory( String directory ); @Override String[] getDirectories(); @Override void setDirectories( String[] directories ); String getLogFilename(); @Override String getXML(); @Override void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
                       Repository rep, IMetaStore metaStore ); @Override void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
                       List<SlaveServer> slaveServers ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ); @Override void clear(); @Override Result execute( Result result, int nr ); @Deprecated TransMeta getTransMeta( Repository rep, VariableSpace space ); TransMeta getTransMeta( Repository rep, IMetaStore metaStore, VariableSpace space ); @Override boolean evaluates(); @Override boolean isUnconditional(); @Override List<SQLStatement> getSQLStatements( Repository repository, IMetaStore metaStore, VariableSpace space ); String getDirectoryPath(); void setDirectoryPath( String directoryPath ); boolean isClustering(); void setClustering( boolean clustering ); @Override void check( List<CheckResultInterface> remarks, JobMeta jobMeta, VariableSpace space,
                     Repository repository, IMetaStore metaStore ); @Override List<ResourceReference> getResourceDependencies( JobMeta jobMeta ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
                                 ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ); String getRemoteSlaveServerName(); void setRemoteSlaveServerName( String remoteSlaveServerName ); boolean isWaitingToFinish(); void setWaitingToFinish( boolean waitingToFinish ); boolean isFollowingAbortRemotely(); void setFollowingAbortRemotely( boolean followingAbortRemotely ); boolean isLoggingRemoteWork(); void setLoggingRemoteWork( boolean loggingRemoteWork ); boolean isPassingAllParameters(); void setPassingAllParameters( boolean passingAllParameters ); String getRunConfiguration(); void setRunConfiguration( String runConfiguration ); Trans getTrans(); ObjectId getTransObjectId(); void setTransObjectId( ObjectId transObjectId ); ObjectLocationSpecificationMethod getSpecificationMethod(); @Override ObjectLocationSpecificationMethod[] getSpecificationMethods(); void setSpecificationMethod( ObjectLocationSpecificationMethod specificationMethod ); @Override boolean hasRepositoryReferences(); @Override void lookupRepositoryReferences( Repository repository ); @Override String[] getReferencedObjectDescriptions(); @Override boolean[] isReferencedObjectEnabled(); @Override Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ); @Override void setParentJobMeta( JobMeta parentJobMeta ); }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Override public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { copyVariablesFrom( space ); TransMeta transMeta = getTransMeta( repository, space ); String proposedNewFilename = transMeta.exportResources( transMeta, definitions, namingInterface, repository, metaStore ); String newFilename = "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}/" + proposedNewFilename; transMeta.setFilename( newFilename ); transMeta.setRepositoryDirectory( new RepositoryDirectory() ); setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); filename = newFilename; return proposedNewFilename; } JobEntryTrans( String name );  JobEntryTrans(); @Override Object clone(); void setFileName( String n ); @Deprecated String getFileName(); @Override String getFilename(); @Override String getRealFilename(); void setTransname( String transname ); String getTransname(); String getDirectory(); void setDirectory( String directory ); @Override String[] getDirectories(); @Override void setDirectories( String[] directories ); String getLogFilename(); @Override String getXML(); @Override void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
                       Repository rep, IMetaStore metaStore ); @Override void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
                       List<SlaveServer> slaveServers ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ); @Override void clear(); @Override Result execute( Result result, int nr ); @Deprecated TransMeta getTransMeta( Repository rep, VariableSpace space ); TransMeta getTransMeta( Repository rep, IMetaStore metaStore, VariableSpace space ); @Override boolean evaluates(); @Override boolean isUnconditional(); @Override List<SQLStatement> getSQLStatements( Repository repository, IMetaStore metaStore, VariableSpace space ); String getDirectoryPath(); void setDirectoryPath( String directoryPath ); boolean isClustering(); void setClustering( boolean clustering ); @Override void check( List<CheckResultInterface> remarks, JobMeta jobMeta, VariableSpace space,
                     Repository repository, IMetaStore metaStore ); @Override List<ResourceReference> getResourceDependencies( JobMeta jobMeta ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
                                 ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ); String getRemoteSlaveServerName(); void setRemoteSlaveServerName( String remoteSlaveServerName ); boolean isWaitingToFinish(); void setWaitingToFinish( boolean waitingToFinish ); boolean isFollowingAbortRemotely(); void setFollowingAbortRemotely( boolean followingAbortRemotely ); boolean isLoggingRemoteWork(); void setLoggingRemoteWork( boolean loggingRemoteWork ); boolean isPassingAllParameters(); void setPassingAllParameters( boolean passingAllParameters ); String getRunConfiguration(); void setRunConfiguration( String runConfiguration ); Trans getTrans(); ObjectId getTransObjectId(); void setTransObjectId( ObjectId transObjectId ); ObjectLocationSpecificationMethod getSpecificationMethod(); @Override ObjectLocationSpecificationMethod[] getSpecificationMethods(); void setSpecificationMethod( ObjectLocationSpecificationMethod specificationMethod ); @Override boolean hasRepositoryReferences(); @Override void lookupRepositoryReferences( Repository repository ); @Override String[] getReferencedObjectDescriptions(); @Override boolean[] isReferencedObjectEnabled(); @Override Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ); @Override void setParentJobMeta( JobMeta parentJobMeta ); public String[] arguments; public boolean argFromPrevious; public boolean paramsFromPrevious; public boolean execPerRow; public String[] parameters; public String[] parameterFieldNames; public String[] parameterValues; public boolean clearResultRows; public boolean clearResultFiles; public boolean createParentFolder; public boolean setLogfile; public boolean setAppendLogfile; public String logfile; public boolean addDate; public LogLevel logFileLevel; public boolean waitingToFinish; public boolean followingAbortRemotely; }