Package org.pentaho.di.repository
Interface RepositoryDirectoryInterface
-
- All Superinterfaces:
RepositoryObjectInterface
- All Known Implementing Classes:
RepositoryDirectory
public interface RepositoryDirectoryInterface extends RepositoryObjectInterface
This interface represents Directories within the Repository API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSubdirectory(RepositoryDirectoryInterface subdir)Add a subdirectory to this directory.voidclear()RepositoryDirectoryInterfacefindChild(String name)RepositoryDirectoryInterfacefindDirectory(String path)Find a directory using the path to the directory with file.separator between the dir-names.RepositoryDirectoryInterfacefindDirectory(String[] path)Find the directory by following the path of stringsRepositoryDirectoryInterfacefindDirectory(ObjectId id_directory)Find the sub-directory with a certain IDRepositoryDirectoryInterfacefindRoot()Find the root of the directory tree starting from this directory.List<RepositoryDirectoryInterface>getChildren()Returns a list of child directoriesObjectId[]getDirectoryIDs()intgetNrSubdirectories()Counts the number of subdirectories in this directory.RepositoryDirectoryInterfacegetParent()get the parent directory for this directory.StringgetPath()Describe the complete path to ( and including) this directory, separated by the RepositoryDirectory.DIRECTORY_SEPARATOR property (slash).String[]getPathArray()StringgetPathObjectCombination(String transName)List<RepositoryElementMetaInterface>getRepositoryObjects()Returns a list of child filesRepositoryDirectorygetSubdirectory(int i)Get a subdirectory on a certain position.booleanisRoot()Check whether or not this is the root of the directory trees.booleanisVisible()If true, this directory should be shown in UIs.voidsetChildren(List<RepositoryDirectoryInterface> children)sets the list of child directoriesvoidsetName(String directoryname)Set the directory name (rename)voidsetObjectId(ObjectId id)Set the database ID for this object in the repository.voidsetParent(RepositoryDirectoryInterface parent)Change the parent of this directory.voidsetRepositoryObjects(List<RepositoryElementMetaInterface> children)sets the list of child files-
Methods inherited from interface org.pentaho.di.repository.RepositoryObjectInterface
getName, getObjectId
-
-
-
-
Method Detail
-
getChildren
List<RepositoryDirectoryInterface> getChildren()
Returns a list of child directories- Returns:
- list of child directories
-
setChildren
void setChildren(List<RepositoryDirectoryInterface> children)
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
void setRepositoryObjects(List<RepositoryElementMetaInterface> children)
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
RepositoryDirectoryInterface findDirectory(String path)
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
RepositoryDirectoryInterface findDirectory(ObjectId id_directory)
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
RepositoryDirectoryInterface findDirectory(String[] path)
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
RepositoryDirectory getSubdirectory(int i)
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
void addSubdirectory(RepositoryDirectoryInterface subdir)
Add a subdirectory to this directory.- Parameters:
subdir- The subdirectory to add.
-
setParent
void setParent(RepositoryDirectoryInterface parent)
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
void setObjectId(ObjectId id)
Set the database ID for this object in the repository.- Parameters:
id- the database ID for this object in the repository.
-
setName
void setName(String directoryname)
Set the directory name (rename)- Parameters:
directoryname- The new directory name
-
findChild
RepositoryDirectoryInterface findChild(String name)
-
-