use of org.pentaho.di.resource.ResourceReference in project pentaho-kettle by pentaho.
the class JobEntryTelnet method getResourceDependencies.
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
List<ResourceReference> references = super.getResourceDependencies(jobMeta);
if (!Utils.isEmpty(hostname)) {
String realServername = jobMeta.environmentSubstitute(hostname);
ResourceReference reference = new ResourceReference(this);
reference.getEntries().add(new ResourceEntry(realServername, ResourceType.SERVER));
references.add(reference);
}
return references;
}
use of org.pentaho.di.resource.ResourceReference in project pentaho-kettle by pentaho.
the class JobEntryTrans method getResourceDependencies.
@Override
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
List<ResourceReference> references = super.getResourceDependencies(jobMeta);
if (!Utils.isEmpty(filename)) {
// During this phase, the variable space hasn't been initialized yet - it seems
// to happen during the execute. As such, we need to use the job meta's resolution
// of the variables.
String realFileName = jobMeta.environmentSubstitute(filename);
ResourceReference reference = new ResourceReference(this);
reference.getEntries().add(new ResourceEntry(realFileName, ResourceType.ACTIONFILE));
references.add(reference);
}
return references;
}
use of org.pentaho.di.resource.ResourceReference in project pentaho-kettle by pentaho.
the class JobEntryDeleteFolders method getResourceDependencies.
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
List<ResourceReference> references = super.getResourceDependencies(jobMeta);
if (arguments != null) {
ResourceReference reference = null;
for (int i = 0; i < arguments.length; i++) {
String filename = jobMeta.environmentSubstitute(arguments[i]);
if (reference == null) {
reference = new ResourceReference(this);
references.add(reference);
}
reference.getEntries().add(new ResourceEntry(filename, ResourceType.FILE));
}
}
return references;
}
use of org.pentaho.di.resource.ResourceReference in project pentaho-kettle by pentaho.
the class JobEntrySSH2PUT method getResourceDependencies.
@Override
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
List<ResourceReference> references = super.getResourceDependencies(jobMeta);
if (!Utils.isEmpty(serverName)) {
String realServerName = jobMeta.environmentSubstitute(serverName);
ResourceReference reference = new ResourceReference(this);
reference.getEntries().add(new ResourceEntry(realServerName, ResourceType.SERVER));
references.add(reference);
}
return references;
}
use of org.pentaho.di.resource.ResourceReference in project pentaho-kettle by pentaho.
the class XMLInputMeta 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);
//
// Get the file path list from the FileInputList
//
String[] required = new String[fileName.length];
// boolean arrays are defaulted to false.
boolean[] subdirs = new boolean[fileName.length];
for (int i = 0; i < required.length; i++) {
required[i] = "N";
}
String[] textFiles = FileInputList.createFilePathList(transMeta, fileName, fileMask, new String[] { null }, required, subdirs);
if (textFiles != null) {
for (int i = 0; i < textFiles.length; i++) {
reference.getEntries().add(new ResourceEntry(textFiles[i], ResourceType.FILE));
}
}
return references;
}
Aggregations