|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.di.repository.RepositoryDirectory
public class RepositoryDirectory
This class defines the location of a transformation, job or schema in the repository. That means that it's just an extra parameter for recognizing a transformation, job or schema. It allows for sub-directories by linking back to itself. TODO: This class is referenced in a large amount of Interfaces. We should convert it into an interface.
| Field Summary | |
|---|---|
static String |
DIRECTORY_SEPARATOR
|
| Constructor Summary | |
|---|---|
RepositoryDirectory()
Create an empty repository directory. |
|
RepositoryDirectory(RepositoryDirectoryInterface parent,
String directoryname)
Create a new sub-directory in a certain other directory. |
|
| Method Summary | |
|---|---|
void |
addSubdirectory(RepositoryDirectoryInterface subdir)
Add a subdirectory to this directory. |
void |
clear()
|
RepositoryDirectory |
findChild(String name)
|
RepositoryDirectory |
findDirectory(ObjectId id_directory)
Find the sub-directory with a certain ID |
RepositoryDirectory |
findDirectory(String path)
Find a directory using the path to the directory with file.separator between the dir-names. |
RepositoryDirectory |
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()
Get all the directory-id in this directory and the subdirectories. |
String |
getName()
Get the name of this directory... |
int |
getNrSubdirectories()
Counts the number of subdirectories in this directory. |
ObjectId |
getObjectId()
Get the database ID in the repository for this object. |
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()
Describe the complete path to ( and including) this directory, as an array of strings. |
String |
getPathObjectCombination(String transName)
|
List<RepositoryElementMetaInterface> |
getRepositoryObjects()
Returns a list of child files |
RepositoryDirectory |
getSubdirectory(int i)
Get a subdirectory on a certain position. |
String |
getXML()
Return the description of this directory & the subdirectories in XML. |
String |
getXML(int level)
|
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. |
boolean |
loadXML(Node repdirnode)
Load the directory & subdirectories from XML |
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> repositoryObjects)
sets the list of child files |
void |
setVisible(boolean visible)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DIRECTORY_SEPARATOR
| Constructor Detail |
|---|
public RepositoryDirectory(RepositoryDirectoryInterface parent,
String directoryname)
parent - The directory to create the sub-directory indirectoryname - The name of the new directory.public RepositoryDirectory()
| Method Detail |
|---|
public List<RepositoryDirectoryInterface> getChildren()
RepositoryDirectoryInterface
getChildren in interface RepositoryDirectoryInterfacepublic void setChildren(List<RepositoryDirectoryInterface> children)
RepositoryDirectoryInterface
setChildren in interface RepositoryDirectoryInterfacechildren - list of child directoriespublic List<RepositoryElementMetaInterface> getRepositoryObjects()
RepositoryDirectoryInterface
getRepositoryObjects in interface RepositoryDirectoryInterfacepublic void setRepositoryObjects(List<RepositoryElementMetaInterface> repositoryObjects)
RepositoryDirectoryInterface
setRepositoryObjects in interface RepositoryDirectoryInterfacerepositoryObjects - list of child filespublic void clear()
clear in interface RepositoryDirectoryInterfacepublic ObjectId getObjectId()
getObjectId in interface RepositoryObjectInterfacepublic void setObjectId(ObjectId id)
setObjectId in interface RepositoryDirectoryInterfaceid - the database ID for this object in the repository.public void setParent(RepositoryDirectoryInterface parent)
setParent in interface RepositoryDirectoryInterfaceparent - The new parent of this directory.public RepositoryDirectoryInterface getParent()
getParent in interface RepositoryDirectoryInterfacepublic void setName(String directoryname)
setName in interface RepositoryDirectoryInterfacedirectoryname - The new directory namepublic String getName()
getName in interface RepositoryObjectInterfacepublic boolean isRoot()
isRoot in interface RepositoryDirectoryInterfacepublic String getPath()
getPath in interface RepositoryDirectoryInterfacepublic String[] getPathArray()
getPathArray in interface RepositoryDirectoryInterfacepublic void addSubdirectory(RepositoryDirectoryInterface subdir)
addSubdirectory in interface RepositoryDirectoryInterfacesubdir - The subdirectory to add.public int getNrSubdirectories()
getNrSubdirectories in interface RepositoryDirectoryInterfacepublic RepositoryDirectory getSubdirectory(int i)
getSubdirectory in interface RepositoryDirectoryInterfacei - The subdirectory position
public RepositoryDirectory findDirectory(String[] path)
findDirectory in interface RepositoryDirectoryInterfacepath - The path to the directory we're looking for.
public RepositoryDirectory findDirectory(String path)
findDirectory in interface RepositoryDirectoryInterfacepath - The path to the directory
public RepositoryDirectory findChild(String name)
findChild in interface RepositoryDirectoryInterfacepublic RepositoryDirectory findDirectory(ObjectId id_directory)
findDirectory in interface RepositoryDirectoryInterfaceid_directory - the directory ID to look for.
public String getXML()
public String getXML(int level)
public boolean loadXML(Node repdirnode)
repdirnode - The node in which the Repository directory information resides.
public ObjectId[] getDirectoryIDs()
getDirectoryIDs in interface RepositoryDirectoryInterfacepublic RepositoryDirectoryInterface findRoot()
findRoot in interface RepositoryDirectoryInterfacepublic String toString()
toString in class Objectpublic String getPathObjectCombination(String transName)
getPathObjectCombination in interface RepositoryDirectoryInterfacepublic boolean isVisible()
RepositoryDirectoryInterface
isVisible in interface RepositoryDirectoryInterfacepublic void setVisible(boolean visible)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||