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
 void addSubdirectory(RepositoryDirectoryInterface subdir)
          Add a subdirectory to this directory.
 void clear()
           
 RepositoryDirectoryInterface findChild(String name)
           
 RepositoryDirectoryInterface findDirectory(ObjectId id_directory)
          Find the sub-directory with a certain ID
 RepositoryDirectoryInterface findDirectory(String path)
          Find a directory using the path to the directory with file.separator between the dir-names.
 RepositoryDirectoryInterface findDirectory(String[] path)
          Find the directory by following the path of strings
 RepositoryDirectoryInterface findRoot()
          Find the root of the directory tree starting from this directory.
 List<RepositoryDirectoryInterface> getChildren()
          Returns a list of child directories
 ObjectId[] getDirectoryIDs()
           
 int getNrSubdirectories()
          Counts the number of subdirectories in this directory.
 RepositoryDirectoryInterface getParent()
          get the parent directory for this directory.
 String getPath()
          Describe the complete path to ( and including) this directory, separated by the RepositoryDirectory.DIRECTORY_SEPARATOR property (slash).
 String[] getPathArray()
           
 String getPathObjectCombination(String transName)
           
 List<RepositoryElementMetaInterface> getRepositoryObjects()
          Returns a list of child files
 RepositoryDirectory getSubdirectory(int i)
          Get a subdirectory on a certain position.
 boolean isRoot()
          Check whether or not this is the root of the directory trees.
 boolean isVisible()
          If true, this directory should be shown in UIs.
 void setChildren(List<RepositoryDirectoryInterface> children)
          sets the list of child directories
 void setName(String directoryname)
          Set the directory name (rename)
 void setObjectId(ObjectId id)
          Set the database ID for this object in the repository.
 void setParent(RepositoryDirectoryInterface parent)
          Change the parent of this directory.
 void setRepositoryObjects(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

getPathObjectCombination

String getPathObjectCombination(String transName)

findChild

RepositoryDirectoryInterface findChild(String name)