Search in sources :

Example 1 with BrowseController

use of org.pentaho.di.ui.repository.repositoryexplorer.controllers.BrowseController in project pentaho-kettle by pentaho.

the class BaseRepositoryExplorerUISupport method setup.

@Override
protected void setup() {
    BrowseController browseController = new BrowseController();
    ConnectionsController connectionsController = new ConnectionsController();
    PartitionsController partitionsController = new PartitionsController();
    SlavesController slavesController = new SlavesController();
    ClustersController clustersController = new ClustersController();
    handlers.add(browseController);
    controllerNames.add(browseController.getName());
    handlers.add(connectionsController);
    controllerNames.add(connectionsController.getName());
    handlers.add(partitionsController);
    controllerNames.add(partitionsController.getName());
    handlers.add(slavesController);
    controllerNames.add(slavesController.getName());
    handlers.add(clustersController);
    controllerNames.add(clustersController.getName());
}
Also used : SlavesController(org.pentaho.di.ui.repository.repositoryexplorer.controllers.SlavesController) ClustersController(org.pentaho.di.ui.repository.repositoryexplorer.controllers.ClustersController) BrowseController(org.pentaho.di.ui.repository.repositoryexplorer.controllers.BrowseController) ConnectionsController(org.pentaho.di.ui.repository.repositoryexplorer.controllers.ConnectionsController) PartitionsController(org.pentaho.di.ui.repository.repositoryexplorer.controllers.PartitionsController)

Example 2 with BrowseController

use of org.pentaho.di.ui.repository.repositoryexplorer.controllers.BrowseController in project pentaho-kettle by pentaho.

the class RepositoryLockController method init.

public void init(Repository rep) throws ControllerInitializationException {
    try {
        if (rep != null && rep.hasService(ILockService.class)) {
            repository = rep;
            service = (ILockService) rep.getService(ILockService.class);
        } else {
            throw new ControllerInitializationException(BaseMessages.getString(PKG, "RepositoryLockController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE", // $NON-NLS-1$
            ILockService.class));
        }
        bindingFactory = new DefaultBindingFactory();
        bindingFactory.setDocument(getXulDomContainer().getDocumentRoot());
        // $NON-NLS-1$
        XulEventHandler eventHandler = getXulDomContainer().getEventHandler("browseController");
        if (eventHandler instanceof BrowseController) {
            browseController = (BrowseController) eventHandler;
        }
        // Disable row dragging if it is locked and the user does not have permissions
        // $NON-NLS-1$
        fileTable = (XulTree) getXulDomContainer().getDocumentRoot().getElementById("file-table");
        // $NON-NLS-1$
        folderTree = (XulTree) document.getElementById("folder-tree");
        // $NON-NLS-1$
        lockFileMenuItem = (XulMenuitem) getXulDomContainer().getDocumentRoot().getElementById("file-context-lock");
        // $NON-NLS-1$
        deleteFileMenuItem = (XulMenuitem) getXulDomContainer().getDocumentRoot().getElementById("file-context-delete");
        // $NON-NLS-1$
        renameFileMenuItem = (XulMenuitem) getXulDomContainer().getDocumentRoot().getElementById("file-context-rename");
        // $NON-NLS-1$
        messageBox = (XulMessageBox) document.createElement("messagebox");
        createBindings();
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : DefaultBindingFactory(org.pentaho.ui.xul.binding.DefaultBindingFactory) ControllerInitializationException(org.pentaho.di.ui.repository.repositoryexplorer.ControllerInitializationException) AbstractXulEventHandler(org.pentaho.ui.xul.impl.AbstractXulEventHandler) XulEventHandler(org.pentaho.ui.xul.impl.XulEventHandler) ILockService(org.pentaho.di.ui.repository.pur.services.ILockService) BrowseController(org.pentaho.di.ui.repository.repositoryexplorer.controllers.BrowseController) XulException(org.pentaho.ui.xul.XulException) KettleException(org.pentaho.di.core.exception.KettleException) ControllerInitializationException(org.pentaho.di.ui.repository.repositoryexplorer.ControllerInitializationException)

Aggregations

BrowseController (org.pentaho.di.ui.repository.repositoryexplorer.controllers.BrowseController)2 KettleException (org.pentaho.di.core.exception.KettleException)1 ILockService (org.pentaho.di.ui.repository.pur.services.ILockService)1 ControllerInitializationException (org.pentaho.di.ui.repository.repositoryexplorer.ControllerInitializationException)1 ClustersController (org.pentaho.di.ui.repository.repositoryexplorer.controllers.ClustersController)1 ConnectionsController (org.pentaho.di.ui.repository.repositoryexplorer.controllers.ConnectionsController)1 PartitionsController (org.pentaho.di.ui.repository.repositoryexplorer.controllers.PartitionsController)1 SlavesController (org.pentaho.di.ui.repository.repositoryexplorer.controllers.SlavesController)1 XulException (org.pentaho.ui.xul.XulException)1 DefaultBindingFactory (org.pentaho.ui.xul.binding.DefaultBindingFactory)1 AbstractXulEventHandler (org.pentaho.ui.xul.impl.AbstractXulEventHandler)1 XulEventHandler (org.pentaho.ui.xul.impl.XulEventHandler)1