|
||||||||||
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 recognising a transformation, job or schema. It allows for subdirectories by linking back to itself.
Field Summary | |
---|---|
static String |
DIRECTORY_SEPARATOR
|
Constructor Summary | |
---|---|
RepositoryDirectory()
Create an empty repository directory. |
|
RepositoryDirectory(Repository rep)
Load the complete directory tree from the repository. |
|
RepositoryDirectory(RepositoryDirectory parent,
String directoryname)
Create a new subdirectory in a certain other directory. |
Method Summary | |
---|---|
void |
addSubdirectory(RepositoryDirectory subdir)
Add a subdirectory to this directory. |
boolean |
addToRep(Repository rep)
|
void |
clear()
|
RepositoryDirectory |
createDirectory(Repository rep,
String directoryPath)
Create a new directory, possibly by creating several subdirecties of / at the same time. |
void |
delFromRep(Repository rep)
|
RepositoryDirectory |
findDirectory(long 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 |
RepositoryDirectory |
findRoot()
Find the root of the directory tree starting from this directory. |
long[] |
getDirectoryIDs()
Get all the directory-id in this directory and the subdirectories. |
String |
getDirectoryName()
Get the name of this directory... |
long |
getID()
Get the database ID in the repository for this object. |
int |
getNrSubdirectories()
Counts the number of subdirectories in this directory. |
RepositoryDirectory |
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)
|
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 |
loadRep(Repository rep,
long id_directory)
|
boolean |
loadXML(Node repdirnode)
Load the directory & subdirectories from XML |
boolean |
renameInRep(Repository rep)
|
void |
setDirectoryName(String directoryname)
Set the directory name (rename) |
void |
setID(long id)
Set the database ID for this object in the repository. |
void |
setParent(RepositoryDirectory parent)
Change the parent of this directory. |
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(RepositoryDirectory parent, String directoryname)
parent
- The directory to create the subdirectory indirectoryname
- The name of the new directory.public RepositoryDirectory()
public RepositoryDirectory(Repository rep) throws org.pentaho.di.core.exception.KettleException
rep
- Repository
org.pentaho.di.core.exception.KettleException
Method Detail |
---|
public void clear()
public long getID()
public void setID(long id)
id
- the database ID for this object in the repository.public void setParent(RepositoryDirectory parent)
parent
- The new parent of this directory.public RepositoryDirectory getParent()
public void setDirectoryName(String directoryname)
directoryname
- The new directory namepublic String getDirectoryName()
public boolean isRoot()
public String getPath()
public String[] getPathArray()
public void addSubdirectory(RepositoryDirectory subdir)
subdir
- The subdirectory to add.public int getNrSubdirectories()
public RepositoryDirectory getSubdirectory(int i)
i
- The subdirectory position
public RepositoryDirectory findDirectory(String[] path)
path
- The path to the directory we're looking for.
public RepositoryDirectory findDirectory(String path)
path
- The path to the directory
public RepositoryDirectory findDirectory(long id_directory)
id_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 boolean loadRep(Repository rep, long id_directory)
public boolean addToRep(Repository rep)
public void delFromRep(Repository rep) throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleException
public boolean renameInRep(Repository rep)
public long[] getDirectoryIDs()
public RepositoryDirectory findRoot()
public RepositoryDirectory createDirectory(Repository rep, String directoryPath) throws org.pentaho.di.core.exception.KettleDatabaseException
directoryPath
- The path to the new Repository Directory, to be created.
org.pentaho.di.core.exception.KettleDatabaseException
public String toString()
toString
in class Object
public String getPathObjectCombination(String transName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |