Search in sources :

Example 6 with XulCheckbox

use of org.pentaho.ui.xul.components.XulCheckbox in project pentaho-kettle by pentaho.

the class AbsController method setSelectedRoleChanged.

/**
 * The method is called when a user select a role from the role list. This method reads the current selected role and
 * populates the Action Permission UI with the details
 */
public void setSelectedRoleChanged(IUIRole role) throws Exception {
    IUIAbsRole absRole = null;
    uncheckAllActionPermissions();
    if (role instanceof IUIAbsRole) {
        absRole = (IUIAbsRole) role;
        if (absRole != null && absRole.getLogicalRoles() != null) {
            for (String permission : absRole.getLogicalRoles()) {
                XulCheckbox permissionCheckbox = findRoleCheckbox(permission);
                if (permissionCheckbox != null) {
                    permissionCheckbox.setChecked(true);
                }
            }
        }
    } else {
        throw new IllegalStateException();
    }
}
Also used : IUIAbsRole(org.pentaho.di.ui.repository.pur.repositoryexplorer.abs.IUIAbsRole) XulCheckbox(org.pentaho.ui.xul.components.XulCheckbox)

Aggregations

XulCheckbox (org.pentaho.ui.xul.components.XulCheckbox)6 KettleException (org.pentaho.di.core.exception.KettleException)2 IUIAbsRole (org.pentaho.di.ui.repository.pur.repositoryexplorer.abs.IUIAbsRole)2 IAbsSecurityManager (org.pentaho.di.ui.repository.pur.services.IAbsSecurityManager)2 XulException (org.pentaho.ui.xul.XulException)2 Test (org.junit.Test)1 PushDownOptimizationMeta (org.pentaho.di.trans.dataservice.optimization.PushDownOptimizationMeta)1 ServiceCache (org.pentaho.di.trans.dataservice.optimization.cache.ServiceCache)1 BindingFactory (org.pentaho.ui.xul.binding.BindingFactory)1 XulRadio (org.pentaho.ui.xul.components.XulRadio)1 XulTab (org.pentaho.ui.xul.components.XulTab)1 XulTextbox (org.pentaho.ui.xul.components.XulTextbox)1