Search in sources :

Example 36 with ResourceEntry

use of org.pentaho.di.resource.ResourceEntry in project pentaho-kettle by pentaho.

the class FixedInputMeta method getResourceDependencies.

@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
    List<ResourceReference> references = new ArrayList<ResourceReference>(5);
    ResourceReference reference = new ResourceReference(stepInfo);
    references.add(reference);
    if (!Utils.isEmpty(filename)) {
        // Add the filename to the references, including a reference to this step meta data.
        // 
        reference.getEntries().add(new ResourceEntry(transMeta.environmentSubstitute(filename), ResourceType.FILE));
    }
    return references;
}
Also used : ResourceEntry(org.pentaho.di.resource.ResourceEntry) ArrayList(java.util.ArrayList) ResourceReference(org.pentaho.di.resource.ResourceReference)

Example 37 with ResourceEntry

use of org.pentaho.di.resource.ResourceEntry in project pentaho-kettle by pentaho.

the class JobExecutorMeta method getResourceDependencies.

@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
    List<ResourceReference> references = new ArrayList<ResourceReference>(5);
    String realFilename = transMeta.environmentSubstitute(fileName);
    String realTransname = transMeta.environmentSubstitute(jobName);
    ResourceReference reference = new ResourceReference(stepInfo);
    references.add(reference);
    if (!Utils.isEmpty(realFilename)) {
        // Add the filename to the references, including a reference to this step
        // meta data.
        // 
        reference.getEntries().add(new ResourceEntry(realFilename, ResourceType.ACTIONFILE));
    } else if (!Utils.isEmpty(realTransname)) {
        // Add the filename to the references, including a reference to this step
        // meta data.
        // 
        reference.getEntries().add(new ResourceEntry(realTransname, ResourceType.ACTIONFILE));
        references.add(reference);
    }
    return references;
}
Also used : ResourceEntry(org.pentaho.di.resource.ResourceEntry) ArrayList(java.util.ArrayList) ResourceReference(org.pentaho.di.resource.ResourceReference) ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString)

Example 38 with ResourceEntry

use of org.pentaho.di.resource.ResourceEntry in project pentaho-kettle by pentaho.

the class JobEntryWaitForSQL method getResourceDependencies.

@Override
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
    List<ResourceReference> references = super.getResourceDependencies(jobMeta);
    if (connection != null) {
        ResourceReference reference = new ResourceReference(this);
        reference.getEntries().add(new ResourceEntry(connection.getHostname(), ResourceType.SERVER));
        reference.getEntries().add(new ResourceEntry(connection.getDatabaseName(), ResourceType.DATABASENAME));
        references.add(reference);
    }
    return references;
}
Also used : ResourceEntry(org.pentaho.di.resource.ResourceEntry) ResourceReference(org.pentaho.di.resource.ResourceReference)

Example 39 with ResourceEntry

use of org.pentaho.di.resource.ResourceEntry in project pentaho-kettle by pentaho.

the class JobEntryWriteToFile method getResourceDependencies.

public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
    List<ResourceReference> references = super.getResourceDependencies(jobMeta);
    if (!Utils.isEmpty(getFilename())) {
        String realFileName = jobMeta.environmentSubstitute(getFilename());
        ResourceReference reference = new ResourceReference(this);
        reference.getEntries().add(new ResourceEntry(realFileName, ResourceType.FILE));
        references.add(reference);
    }
    return references;
}
Also used : ResourceEntry(org.pentaho.di.resource.ResourceEntry) ResourceReference(org.pentaho.di.resource.ResourceReference)

Example 40 with ResourceEntry

use of org.pentaho.di.resource.ResourceEntry in project pentaho-kettle by pentaho.

the class JobEntryJob method getResourceDependencies.

@Override
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
    List<ResourceReference> references = super.getResourceDependencies(jobMeta);
    if (!Utils.isEmpty(filename)) {
        String realFileName = jobMeta.environmentSubstitute(filename);
        ResourceReference reference = new ResourceReference(this);
        reference.getEntries().add(new ResourceEntry(realFileName, ResourceType.ACTIONFILE));
        references.add(reference);
    }
    return references;
}
Also used : ResourceEntry(org.pentaho.di.resource.ResourceEntry) ResourceReference(org.pentaho.di.resource.ResourceReference)

Aggregations

ResourceEntry (org.pentaho.di.resource.ResourceEntry)63 ResourceReference (org.pentaho.di.resource.ResourceReference)61 ArrayList (java.util.ArrayList)17 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)4 JobMeta (org.pentaho.di.job.JobMeta)4 Test (org.junit.Test)3 ResultFile (org.pentaho.di.core.ResultFile)2 Job (org.pentaho.di.job.Job)2 IExecutionData (org.pentaho.metaverse.api.model.IExecutionData)2 IExecutionProfile (org.pentaho.metaverse.api.model.IExecutionProfile)2 Throwables (com.google.common.base.Throwables)1 File (java.io.File)1 Serializable (java.io.Serializable)1 Path (java.nio.file.Path)1 Paths (java.nio.file.Paths)1 List (java.util.List)1 Map (java.util.Map)1 Optional (java.util.Optional)1 Consumer (java.util.function.Consumer)1 Predicate (java.util.function.Predicate)1