Search in sources :

Example 41 with ResourceReference

use of org.pentaho.di.resource.ResourceReference 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 42 with ResourceReference

use of org.pentaho.di.resource.ResourceReference 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 43 with ResourceReference

use of org.pentaho.di.resource.ResourceReference 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)

Example 44 with ResourceReference

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

the class JobEntryMssqlBulkLoad method getResourceDependencies.

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

Example 45 with ResourceReference

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

the class JobEntryMysqlBulkFile method getResourceDependencies.

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)

Aggregations

ResourceReference (org.pentaho.di.resource.ResourceReference)66 ResourceEntry (org.pentaho.di.resource.ResourceEntry)61 ArrayList (java.util.ArrayList)18 Test (org.junit.Test)6 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)4 JobMeta (org.pentaho.di.job.JobMeta)4 TransMeta (org.pentaho.di.trans.TransMeta)4 StepMeta (org.pentaho.di.trans.step.StepMeta)4 ResultFile (org.pentaho.di.core.ResultFile)2 Job (org.pentaho.di.job.Job)2 JobEntryCopy (org.pentaho.di.job.entry.JobEntryCopy)2 JobEntryInterface (org.pentaho.di.job.entry.JobEntryInterface)2 IExecutionData (org.pentaho.metaverse.api.model.IExecutionData)2 IExecutionProfile (org.pentaho.metaverse.api.model.IExecutionProfile)2 IExternalResourceInfo (org.pentaho.metaverse.api.model.IExternalResourceInfo)2 FileName (org.apache.commons.vfs2.FileName)1 FileObject (org.apache.commons.vfs2.FileObject)1 Result (org.pentaho.di.core.Result)1 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)1 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)1