Class UIRepositoryDirectory
- java.lang.Object
-
- org.pentaho.ui.xul.XulEventSourceAdapter
-
- org.pentaho.ui.xul.util.AbstractModelNode<UIRepositoryObject>
-
- org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObject
-
- org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryDirectory
-
- All Implemented Interfaces:
Serializable
,Iterable<UIRepositoryObject>
,Collection<UIRepositoryObject>
,List<UIRepositoryObject>
,org.pentaho.ui.xul.XulEventSource
public class UIRepositoryDirectory extends UIRepositoryObject
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObject
obj, rep
-
-
Constructor Summary
Constructors Constructor Description UIRepositoryDirectory()
UIRepositoryDirectory(org.pentaho.di.repository.RepositoryDirectoryInterface rd, UIRepositoryDirectory uiParent, org.pentaho.di.repository.Repository rep)
-
Method Summary
-
Methods inherited from class org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObject
getComparator, getDateComparator, getId, getName, getObjectId, getParentPath, getRepository, getRepositoryService, setComparator, setRepository, setRepositoryService
-
Methods inherited from class org.pentaho.ui.xul.util.AbstractModelNode
add, add, addAll, addAll, asList, checkForUnique, clear, compareChildren, contains, containsAll, indexOf, isEmpty, isUniqueList, lastIndexOf, listIterator, listIterator, moveChildDown, moveChildDown, moveChildUp, moveChildUp, onAdd, onRemove, remove, remove, removeAll, removeModel, retainAll, set, setParent, setUniqueList, subList, toArray, toArray
-
Methods inherited from class org.pentaho.ui.xul.XulEventSourceAdapter
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
UIRepositoryDirectory
public UIRepositoryDirectory()
-
UIRepositoryDirectory
public UIRepositoryDirectory(org.pentaho.di.repository.RepositoryDirectoryInterface rd, UIRepositoryDirectory uiParent, org.pentaho.di.repository.Repository rep)
-
-
Method Detail
-
getChildren
public UIRepositoryDirectories getChildren()
-
populateChildren
public void populateChildren()
-
isPopulated
public boolean isPopulated()
-
setPopulated
public void setPopulated(boolean populated)
-
cleanup
public void cleanup()
-
setChildren
public void setChildren(UIRepositoryDirectories children)
-
getRepositoryObjects
public UIRepositoryObjects getRepositoryObjects() throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
setName
public void setName(String name) throws Exception
- Specified by:
setName
in classUIRepositoryObject
- Throws:
Exception
-
getDescription
public String getDescription()
- Specified by:
getDescription
in classUIRepositoryObject
-
getLockMessage
public String getLockMessage()
-
getModifiedDate
public Date getModifiedDate()
- Specified by:
getModifiedDate
in classUIRepositoryObject
-
getModifiedUser
public String getModifiedUser()
- Specified by:
getModifiedUser
in classUIRepositoryObject
-
getRepositoryElementType
public org.pentaho.di.repository.RepositoryObjectType getRepositoryElementType()
- Specified by:
getRepositoryElementType
in classUIRepositoryObject
-
isDeleted
public boolean isDeleted()
- Overrides:
isDeleted
in classUIRepositoryObject
-
getType
public String getType()
- Specified by:
getType
in classUIRepositoryObject
-
getFormatModifiedDate
public String getFormatModifiedDate()
- Specified by:
getFormatModifiedDate
in classUIRepositoryObject
-
getDirectory
public org.pentaho.di.repository.RepositoryDirectory getDirectory()
-
getImage
public String getImage()
- Specified by:
getImage
in classUIRepositoryObject
-
delete
public void delete() throws Exception
- Specified by:
delete
in classUIRepositoryObject
- Throws:
Exception
-
checkDirNameExistsInRepo
public String checkDirNameExistsInRepo(String name) throws org.pentaho.di.core.exception.KettleException
Check if a subdirectory already exists in the repository. This is to help fix PDI-5202 Since the ui directories are case insensitive, we look for a repo directory with the same name ignoring case. If we find an existing directory, we return the name so we can use that to get hold of the directory as it is known in the repository. If we don't find such a directory, we return null- Parameters:
name
- - the name of a subdirectory- Returns:
- null if the subdirectory does not exist, or the name of the subdirectory as it is known inside the repo.
- Throws:
org.pentaho.di.core.exception.KettleException
-
createFolder
public UIRepositoryDirectory createFolder(String name) throws Exception
- Throws:
Exception
-
fireCollectionChanged
public void fireCollectionChanged()
- Overrides:
fireCollectionChanged
in classorg.pentaho.ui.xul.util.AbstractModelNode<UIRepositoryObject>
-
move
public void move(UIRepositoryDirectory newParentDir) throws Exception
- Specified by:
move
in classUIRepositoryObject
- Throws:
Exception
-
getParentDirectory
protected UIRepositoryDirectory getParentDirectory()
-
getRootDirectory
protected UIRepositoryDirectory getRootDirectory()
-
refresh
public void refresh()
Synchronize this folder with the back-end
-
getCategory
public int getCategory()
- Specified by:
getCategory
in classUIRepositoryObject
-
isExpanded
public boolean isExpanded()
-
setExpanded
public void setExpanded(boolean expand)
-
toggleExpanded
public void toggleExpanded()
-
getParent
public UIRepositoryDirectory getParent()
- Specified by:
getParent
in classUIRepositoryObject
-
getPath
public String getPath()
- Overrides:
getPath
in classUIRepositoryObject
-
isVisible
public boolean isVisible()
-
size
public int size()
- Specified by:
size
in interfaceCollection<UIRepositoryObject>
- Specified by:
size
in interfaceList<UIRepositoryObject>
- Overrides:
size
in classorg.pentaho.ui.xul.util.AbstractModelNode<UIRepositoryObject>
-
get
public UIRepositoryObject get(int index)
- Specified by:
get
in interfaceList<UIRepositoryObject>
- Overrides:
get
in classorg.pentaho.ui.xul.util.AbstractModelNode<UIRepositoryObject>
-
iterator
public Iterator<UIRepositoryObject> iterator()
- Specified by:
iterator
in interfaceCollection<UIRepositoryObject>
- Specified by:
iterator
in interfaceIterable<UIRepositoryObject>
- Specified by:
iterator
in interfaceList<UIRepositoryObject>
- Overrides:
iterator
in classorg.pentaho.ui.xul.util.AbstractModelNode<UIRepositoryObject>
-
contains
public boolean contains(String dirName)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<UIRepositoryObject>
- Specified by:
hashCode
in interfaceList<UIRepositoryObject>
- Overrides:
hashCode
in classObject
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCollection<UIRepositoryObject>
- Specified by:
equals
in interfaceList<UIRepositoryObject>
- Overrides:
equals
in classObject
-
-