Package org.pentaho.di.repository
Interface RepositoryDirectoryInterface
- All Superinterfaces:
RepositoryObjectInterface
- All Known Implementing Classes:
RepositoryDirectory
This interface represents Directories within the Repository API
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a subdirectory to this directory.void
clear()
findDirectory
(String path) Find a directory using the path to the directory with file.separator between the dir-names.findDirectory
(String[] path) Find the directory by following the path of stringsfindDirectory
(ObjectId id_directory) Find the sub-directory with a certain IDfindRoot()
Find the root of the directory tree starting from this directory.Returns a list of child directoriesObjectId[]
int
Counts the number of subdirectories in this directory.get the parent directory for this directory.getPath()
Describe the complete path to ( and including) this directory, separated by the RepositoryDirectory.DIRECTORY_SEPARATOR property (slash).String[]
getPathObjectCombination
(String transName) Returns a list of child filesgetSubdirectory
(int i) Get a subdirectory on a certain position.boolean
isRoot()
Check whether or not this is the root of the directory trees.boolean
If true, this directory should be shown in UIs.void
setChildren
(List<RepositoryDirectoryInterface> children) sets the list of child directoriesvoid
Set the directory name (rename)void
setObjectId
(ObjectId id) Set the database ID for this object in the repository.void
Change the parent of this directory.void
sets the list of child filesMethods inherited from interface org.pentaho.di.repository.RepositoryObjectInterface
getName, getObjectId
-
Method Details
-
getChildren
List<RepositoryDirectoryInterface> getChildren()Returns a list of child directories- Returns:
- list of child directories
-
setChildren
sets the list of child directories- Parameters:
children
- list of child directories
-
getRepositoryObjects
List<RepositoryElementMetaInterface> getRepositoryObjects()Returns a list of child files- Returns:
- list of child files
-
setRepositoryObjects
sets the list of child files- Parameters:
children
- list of child files
-
isVisible
boolean isVisible()If true, this directory should be shown in UIs. Not necessarily persisted. Each repository implementation decides whether to mark each directory as visible. -
getPathArray
String[] getPathArray() -
findDirectory
Find a directory using the path to the directory with file.separator between the dir-names.- Parameters:
path
- The path to the directory- Returns:
- The directory if one was found, null if nothing was found.
-
findDirectory
Find the sub-directory with a certain ID- Parameters:
id_directory
- the directory ID to look for.- Returns:
- The RepositoryDirectory if the ID was found, null if nothing could be found.
-
findDirectory
Find the directory by following the path of strings- Parameters:
path
- The path to the directory we're looking for.- Returns:
- The directory if one can be found, null if no directory was found.
-
getDirectoryIDs
ObjectId[] getDirectoryIDs() -
getPath
String getPath()Describe the complete path to ( and including) this directory, separated by the RepositoryDirectory.DIRECTORY_SEPARATOR property (slash).- Returns:
- The complete path to this directory.
-
getNrSubdirectories
int getNrSubdirectories()Counts the number of subdirectories in this directory.- Returns:
- The number of subdirectories
-
getSubdirectory
Get a subdirectory on a certain position.- Parameters:
i
- The subdirectory position- Returns:
- The subdirectory with on a certain position
-
isRoot
boolean isRoot()Check whether or not this is the root of the directory trees. (default)- Returns:
- true if this is the root directory node. False if it is not.
-
findRoot
RepositoryDirectoryInterface findRoot()Find the root of the directory tree starting from this directory.- Returns:
- the root of the directory tree
-
clear
void clear() -
addSubdirectory
Add a subdirectory to this directory.- Parameters:
subdir
- The subdirectory to add.
-
setParent
Change the parent of this directory. (move directory)- Parameters:
parent
- The new parent of this directory.
-
getParent
RepositoryDirectoryInterface getParent()get the parent directory for this directory.- Returns:
- The parent directory of null if this is the root directory.
-
setObjectId
Set the database ID for this object in the repository.- Parameters:
id
- the database ID for this object in the repository.
-
setName
Set the directory name (rename)- Parameters:
directoryname
- The new directory name
-
getPathObjectCombination
-
findChild
-