Class 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 Detail

      • MetaFileLoaderImpl

        public MetaFileLoaderImpl​(JobEntryBase jobEntryBase,
                                  org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod)
        Parameters:
        jobEntryBase - either a JobEntryTrans or JobEntryJob Object
        specificationMethod -
      • 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 interface IMetaFileLoader<T>
        Parameters:
        rep - The repo in play if not using the filesystem
        metaStore - The metastore
        space - 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 interface IMetaFileLoader<T>
        Parameters:
        rep - The repo in play if not using the filesystem
        metaStore - The metastore
        space - The variables for substitution
        Returns:
        A JobMeta or TransMeta (T)
        Throws:
        org.pentaho.di.core.exception.KettleException