use of org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryDirectory in project pentaho-kettle by pentaho.
the class BrowseController method setRepositoryDirectories.
public void setRepositoryDirectories(List<UIRepositoryDirectory> selectedFolderItems) {
List<UIRepositoryDirectory> previousVal = null;
UIRepositoryObjects previousRepoObjects = null;
try {
if (repositoryDirectories != null && repositoryDirectories.size() > 0) {
previousVal = new ArrayList<UIRepositoryDirectory>();
previousVal.addAll(repositoryDirectories);
previousRepoObjects = getSelectedRepoDirChildren();
}
// Remove children listener
if (this.repositoryDirectories != null && this.repositoryDirectories.size() > 0) {
this.repositoryDirectories.get(0).getRepositoryObjects().removePropertyChangeListener(fileChildrenListener);
}
this.repositoryDirectories = selectedFolderItems;
// Add children Listener
if (this.repositoryDirectories != null && this.repositoryDirectories.size() > 0) {
this.repositoryDirectories.get(0).getRepositoryObjects().addPropertyChangeListener("children", fileChildrenListener);
}
} catch (KettleException e) {
if (mainController == null || !mainController.handleLostRepository(e)) {
throw new RuntimeException(e);
}
}
fireFoldersAndItemsChange(previousVal, previousRepoObjects);
}
Aggregations