@Test public void testGetTransMeta() throws KettleException { String param1 = "param1"; String param2 = "param2"; String param3 = "param3"; String parentValue1 = "parentValue1"; String parentValue2 = "parentValue2"; String childValue3 = "childValue3"; JobEntryTrans jobEntryTrans = spy( getJobEntryTrans() ); Repository rep = Mockito.mock( Repository.class ); TransMeta meta = new TransMeta(); meta.setVariable( param2, "childValue2 should be override" ); meta.setVariable( param3, childValue3 ); Mockito.doReturn( meta ).when( rep ) .loadTransformation( Mockito.eq( "test.ktr" ), Mockito.anyObject(), Mockito.anyObject(), Mockito.anyBoolean(), Mockito.anyObject() ); VariableSpace parentSpace = new Variables(); parentSpace.setVariable( param1, parentValue1 ); parentSpace.setVariable( param2, parentValue2 ); jobEntryTrans.setFileName( "/home/admin/test.ktr" ); Mockito.doNothing().when( jobEntryTrans ).logBasic( Mockito.anyString() ); jobEntryTrans.setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME ); TransMeta transMeta; jobEntryTrans.setPassingAllParameters( false ); transMeta = jobEntryTrans.getTransMeta( rep, null, parentSpace ); Assert.assertEquals( null, transMeta.getVariable( param1 ) ); Assert.assertEquals( parentValue2, transMeta.getVariable( param2 ) ); Assert.assertEquals( childValue3, transMeta.getVariable( param3 ) ); jobEntryTrans.setPassingAllParameters( true ); transMeta = jobEntryTrans.getTransMeta( rep, null, parentSpace ); Assert.assertEquals( parentValue1, transMeta.getVariable( param1 ) ); Assert.assertEquals( parentValue2, transMeta.getVariable( param2 ) ); Assert.assertEquals( childValue3, transMeta.getVariable( param3 ) ); }
@Deprecated public TransMeta getTransMeta( Repository rep, VariableSpace space ) throws KettleException { return getTransMeta( rep, null, space ); }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Deprecated public TransMeta getTransMeta( Repository rep, VariableSpace space ) throws KettleException { return getTransMeta( rep, null, space ); } }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Deprecated public TransMeta getTransMeta( Repository rep, VariableSpace space ) throws KettleException { return getTransMeta( rep, null, space ); } JobEntryTrans( String name );  JobEntryTrans(); }
JobEntryTrans extends JobEntryBase implements Cloneable, JobEntryInterface, HasRepositoryDirectories, JobEntryRunConfigurableInterface { @Deprecated public TransMeta getTransMeta( Repository rep, VariableSpace space ) throws KettleException { return getTransMeta( rep, null, space ); } 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 { @Deprecated public TransMeta getTransMeta( Repository rep, VariableSpace space ) throws KettleException { return getTransMeta( rep, null, space ); } 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; }