Package org.pentaho.di.resource
Interface ResourceNamingInterface
-
- All Known Implementing Classes:
SequenceResourceNaming
,SimpleResourceNaming
,UUIDResourceNaming
public interface ResourceNamingInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ResourceNamingInterface.FileNamingType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,String>
getDirectoryMap()
String
nameResource(String prefix, String originalFilePath, String extension, ResourceNamingInterface.FileNamingType namingType)
Create a (file) name for a resource based on a prefix and an extension.String
nameResource(org.apache.commons.vfs2.FileObject fileObject, org.pentaho.di.core.variables.VariableSpace space, boolean pathOnly)
Create a (file) name based on the passed FileObject
-
-
-
Method Detail
-
nameResource
String nameResource(String prefix, String originalFilePath, String extension, ResourceNamingInterface.FileNamingType namingType)
Create a (file) name for a resource based on a prefix and an extension.- Parameters:
prefix
- The prefix, usually the name of the object that is being exportedoriginalFilePath
- The original path to the file. This will be used in the naming of the resource to ensure that the same GUID will be returned for the same file.extension
- The extension of the filename to be created. For now this also gives a clue as to what kind of data is being exported and named..namingType
- the file naming type to use, in case of DATA_FILE for example, the return value might not be the complete file, but rather- Returns:
- The filename, typically including a GUID, but always the same when given the same prefix and extension as input.
-
nameResource
String nameResource(org.apache.commons.vfs2.FileObject fileObject, org.pentaho.di.core.variables.VariableSpace space, boolean pathOnly) throws org.apache.commons.vfs2.FileSystemException
Create a (file) name based on the passed FileObject- Parameters:
FileObject
- fileObject The file in which the name ....VariableSpace
- variable(space) of the transformation or job.pathOnly
- Set to true to just return the path, false to return file name and path- Returns:
- String The file name with the path set as a variable. If pathOnly is set to true then the file name will be left out.
- Throws:
org.apache.commons.vfs2.FileSystemException
-
-