Package org.pentaho.di.base
Class MetaFileLoaderImpl<T>
- java.lang.Object
-
- org.pentaho.di.base.MetaFileLoaderImpl<T>
-
- Type Parameters:
T
- Either a TransMeta or JobMeta
- All Implemented Interfaces:
IMetaFileLoader<T>
public class MetaFileLoaderImpl<T> extends Object implements IMetaFileLoader<T>
Unit tests for this class can be found in JobExecutorMetaTest, StepWithMetaMetaTest, JobEntryJobTest, and JobEntryTransTest. This class attempts to consolidate and refactor to some extent, the logic that was originally present in these four classes and moved here. This allowed the fileMetaCache to implemented without repeating code over these 4 classes. Due to the divergence over time of the 4 original classes, there is still some significant differences with meta load logic that was beyond the scope of this case to analyze.
-
-
Constructor Summary
Constructors Constructor Description MetaFileLoaderImpl(JobEntryBase jobEntryBase, org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod)
MetaFileLoaderImpl(BaseStepMeta baseStepMeta, org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getMetaForEntry(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space)
Get a JobMeta or TransMeta object for a job entry that needs it.T
getMetaForStep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space)
Get a JobMeta or TransMeta object for a transformation step for a Transformation that needs it.
-
-
-
Constructor Detail
-
MetaFileLoaderImpl
public MetaFileLoaderImpl(JobEntryBase jobEntryBase, org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod)
- Parameters:
jobEntryBase
- either a JobEntryTrans or JobEntryJob ObjectspecificationMethod
-
-
MetaFileLoaderImpl
public MetaFileLoaderImpl(BaseStepMeta baseStepMeta, org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod)
- Parameters:
baseStepMeta
- either a StepWithMappingMeta or JobExecutorMeta Object (BaseStepMeta is a shared subclass )specificationMethod
-
-
-
Method Detail
-
getMetaForEntry
public T getMetaForEntry(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleException
Description copied from interface:IMetaFileLoader
Get a JobMeta or TransMeta object for a job entry that needs it. The entry will be cached and further loads will come from the cache, instead.- Specified by:
getMetaForEntry
in interfaceIMetaFileLoader<T>
- Parameters:
rep
- The repo in play if not using the filesystemmetaStore
- The metastorespace
- The variables for substitution- Returns:
- A JobMeta or TransMeta (T)
- Throws:
org.pentaho.di.core.exception.KettleException
-
getMetaForStep
public T getMetaForStep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleException
Description copied from interface:IMetaFileLoader
Get a JobMeta or TransMeta object for a transformation step for a Transformation that needs it. The entry will be cached and further loads will come from the cache, instead.- Specified by:
getMetaForStep
in interfaceIMetaFileLoader<T>
- Parameters:
rep
- The repo in play if not using the filesystemmetaStore
- The metastorespace
- The variables for substitution- Returns:
- A JobMeta or TransMeta (T)
- Throws:
org.pentaho.di.core.exception.KettleException
-
-