use of org.pentaho.di.ui.repository.pur.repositoryexplorer.model.UIRepositoryObjectAcls in project pentaho-kettle by pentaho.
the class AbstractPermissionsController method init.
protected void init(Repository rep) throws Exception {
if (rep != null && rep.hasService(RepositorySecurityProvider.class)) {
service = (RepositorySecurityProvider) rep.getService(RepositorySecurityProvider.class);
} else {
throw new ControllerInitializationException(BaseMessages.getString(PKG, "PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE", // $NON-NLS-1$
RepositorySecurityManager.class));
}
// $NON-NLS-1$
messageBox = (XulMessageBox) document.createElement("messagebox");
viewAclsModel = new UIRepositoryObjectAcls();
manageAclsModel = new UIRepositoryObjectAclModel(viewAclsModel);
bf = new DefaultBindingFactory();
bf.setDocument(this.getXulDomContainer().getDocumentRoot());
mainController = (MainController) this.getXulDomContainer().getEventHandler("mainController");
// $NON-NLS-1$
confirmBox = (XulConfirmBox) document.createElement("confirmbox");
// $NON-NLS-1$
confirmBox.setTitle(BaseMessages.getString(PKG, "PermissionsController.RemoveAclWarning"));
// $NON-NLS-1$
confirmBox.setMessage(BaseMessages.getString(PKG, "PermissionsController.RemoveAclWarningText"));
// $NON-NLS-1$
confirmBox.setAcceptLabel(BaseMessages.getString(PKG, "Dialog.Ok"));
// $NON-NLS-1$
confirmBox.setCancelLabel(BaseMessages.getString(PKG, "Dialog.Cancel"));
confirmBox.addDialogCallback(new XulDialogCallback<Object>() {
public void onClose(XulComponent sender, Status returnCode, Object retVal) {
if (returnCode == Status.ACCEPT) {
viewAclsModel.removeSelectedAcls();
}
}
public void onError(XulComponent sender, Throwable t) {
}
});
}
Aggregations