Package org.jboss.as.console.client.rbac

Examples of org.jboss.as.console.client.rbac.StandardRole


        ToolStrip tools = new ToolStrip();
        addButton = new ToolButton(add, new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                StandardRole role = treeModel.getRoleSelectionModel().getSelectedObject();
                RoleAssignment roleAssignment = treeModel.getRoleAssignmentSelectionModel().getSelectedObject();
                if (role != null && roleAssignment != null) {
                    presenter.launchAddDialg(role, roleAssignment, principalType);
                } else {
                    // TODO Change this to a console message?
                    Log.warn("No role or no includes/excludes selected");
                }
            }
        });
        addButton.setEnabled(false);
        tools.addToolButtonRight(addButton);
        deleteButton = new ToolButton(delete, new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                final StandardRole role = treeModel.getRoleSelectionModel().getSelectedObject();
                final RoleAssignment roleAssignment = treeModel.getRoleAssignmentSelectionModel().getSelectedObject();
                final Principal principal = treeModel.getPrincipalSelectionModel().getSelectedObject();
                if (role != null && roleAssignment != null && principal != null) {
                    String principalTypeName = principalType == Principal.Type.USER ? Console.CONSTANTS
                            .common_label_user() : Console.CONSTANTS.common_label_group();
View Full Code Here


        vpanel.add(cellBrowser);
        return vpanel;
    }

    private void updateToolButtons() {
        StandardRole role = treeModel.getRoleSelectionModel().getSelectedObject();
        RoleAssignment roleAssignment = treeModel.getRoleAssignmentSelectionModel().getSelectedObject();
        Principal principal = treeModel.getPrincipalSelectionModel().getSelectedObject();

        addButton.setEnabled(role != null && roleAssignment != null);
        deleteButton.setEnabled(role != null && roleAssignment != null && principal != null);
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.rbac.StandardRole

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.