Package org.rhq.coregui.client

Examples of org.rhq.coregui.client.PermissionsLoader


        favoritesMenu = new FavoritesMenu();
        messageBar = new MessageBar();
        messageBar.setVisible(false);

        injectMenuFunctions(this);
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            @Override
            public void onPermissionsLoaded(Set<Permission> permissions) {
                globalPermissions = (permissions != null) ? permissions : EnumSet.noneOf(Permission.class);
                for (MenuItem item : MENU_ITEMS) {
                    updateMenuVisibility(item);
View Full Code Here


            this.container = null;
        }
    }

    public void renderView(final ViewPath viewPath) {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            public void onPermissionsLoaded(Set<Permission> globalPermissions) {
                TaggedView.this.globalPermissions = globalPermissions;
                completeRenderView(viewPath);
            }
        });
View Full Code Here

        super.renderView(viewPath);

        this.isSystemRole = RolesDataSource.isSystemRoleId(getRecordId());

        // Step 1 of async init: load current user's global permissions.
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            public void onPermissionsLoaded(Set<Permission> perms) {
                if (perms == null) {
                    // TODO: i18n
                    CoreGUI.getErrorHandler().handleError(
                        "Failed to load global permissions for current user. Perhaps the Server is down.");
View Full Code Here

            }
        }

        setDisabled(true);

        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {

            public void onPermissionsLoaded(Set<Permission> grantedPermissions) {
                for (Permission requiredPermission : globalPermissions) {
                    if (!grantedPermissions.contains(requiredPermission)) {
                        return;
View Full Code Here

        return fields;
    }

    @Override
    protected void editTemplates(final ResourceType type, final RecordClickEvent event) {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            public void onPermissionsLoaded(Set<Permission> permissions) {
                if (!permissions.contains(Permission.MANAGE_INVENTORY)) {
                    SC.warn(MSG.view_adminConfig_ignoreResourceTypes_noperm());
                    return;
                }
View Full Code Here

    protected void onInit() {
        if (!isInitialized()) {
            super.onInit();

            // first async call to get global permissions
            new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {

                public void onPermissionsLoaded(Set<Permission> permissions) {
                    globalPermissions = permissions;

                    // now make async call to look for customized dash for this user and entity
View Full Code Here

        return fields;
    }

    @Override
    protected void editTemplates(final ResourceType type, ViewPath viewPath) {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {

            public void onPermissionsLoaded(Set<Permission> permissions) {
                Layout metricCanvas = getCanvas();
                TemplateSchedulesView templateSchedulesView = new TemplateSchedulesView(type, permissions);
                prepareSubCanvas(metricCanvas, templateSchedulesView, true);
View Full Code Here

        builder.show();
    }

    @Override
    public void renderView(final ViewPath viewPath) {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            @Override
            public void onPermissionsLoaded(Set<Permission> permissions) {
                if (permissions != null && permissions.contains(Permission.MANAGE_INVENTORY)) {
                    groupDefinitionId = viewPath.getCurrentAsInt();
                    basePath = viewPath.getPathToCurrent();
View Full Code Here

    @Override
    public void renderView(ViewPath viewPath) {
        super.renderView(viewPath);

        // Step 1 of async init: load current user's global permissions.
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            @Override
            public void onPermissionsLoaded(Set<Permission> permissions) {
                if (permissions == null) {
                    // TODO: i18n
                    CoreGUI.getErrorHandler().handleError(
View Full Code Here

        return fields;
    }

    @Override
    protected void editTemplates(final ResourceType type, final ViewPath viewPath) {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {

            public void onPermissionsLoaded(Set<Permission> permissions) {

                Layout templatesCanvas = getCanvas();
                DriftDefinitionTemplatesView view = new DriftDefinitionTemplatesView(type, permissions
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.PermissionsLoader

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.