Package org.rhq.coregui.client

Examples of org.rhq.coregui.client.PermissionsLoader


        }
    }

    public void renderView(final ViewPath viewPath) {

        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            @Override
            public void onPermissionsLoaded(Set<Permission> permissions) {
                globalPermissions = (permissions != null) ? permissions : new HashSet<Permission>();
                renderTabs(viewPath);
            }
View Full Code Here


        sectionStack.setCanResizeSections(true);
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth(250);
        sectionStack.setHeight100();

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

            public void onPermissionsLoaded(Set<Permission> permissions) {
                globalPermissions = (permissions != null) ? permissions : EnumSet.noneOf(Permission.class);

                List<NavigationSection> sections = getNavigationSections();
View Full Code Here

        if (!super.isEnabled(selection)) {
            return false;
        }

        if (null == isGlobalAuthorized) {
            new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
                public void onPermissionsLoaded(Set<Permission> grantedPermissions) {
                    if (grantedPermissions == null) {
                        // failed to load the global perms from the Server - no need to display an error message,
                        // since the ErrorHandler already did.
                        return;
View Full Code Here

                public void onSuccess(final PageList<DriftDefinitionComposite> result) {

                    // if we don't have them grab the global perms to see later if we can link to to templates.
                    if (null == globalPermissions) {
                        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
                            @Override
                            public void onPermissionsLoaded(Set<Permission> permissions) {
                                globalPermissions = (permissions != null) ? permissions : new HashSet<Permission>();
                                dataRetrieved(result, response, request);
                            }
View Full Code Here

        super(VIEW_ID.getName());
    }

    @Override
    protected void onInit() {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            @Override
            public void onPermissionsLoaded(Set<Permission> permissions) {
                globalPermissions = (permissions != null) ? permissions : EnumSet.noneOf(Permission.class);
                InventoryView.super.onInit();
            }
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

        setWidth100();
        setHeight100();
    }

    public void renderView(final ViewPath viewPath) {
        new PermissionsLoader().loadExplicitGlobalPermissions(new PermissionsLoadedListener() {
            @Override
            public void onPermissionsLoaded(Set<Permission> globalPermissions) {
                // if we haven't done it yet, build the view components
                if (bundleTreeView == null) {
View Full Code Here

    }

    @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)) {
                    GroupDefinitionListView.super.renderView(viewPath);
                } else {
View Full Code Here

        // need to see what bundle group level perms he has.
        if (canManage) {
            authorizedRenderView(bundleGroupId, viewPath);

        } else {
            new PermissionsLoader().loadBundleGroupPermissions(bundleGroupId, new PermissionsLoadedListener() {
                @Override
                public void onPermissionsLoaded(Set<Permission> bundleGroupPermissions) {
                    canAssign = bundleGroupPermissions.contains(Permission.CREATE_BUNDLES_IN_GROUP)
                        || bundleGroupPermissions.contains(Permission.ASSIGN_BUNDLES_TO_GROUP);
                    canUnassign = bundleGroupPermissions.contains(Permission.DELETE_BUNDLES_FROM_GROUP)
View Full Code Here

        // need to see what bundle level perms he has.
        if (canDelete && canDeploy && canTag) {
            authorizedRenderView(bundleId, viewPath);

        } else {
            new PermissionsLoader().loadBundlePermissions(bundleId, new PermissionsLoadedListener() {
                @Override
                public void onPermissionsLoaded(Set<Permission> bundlePermissions) {
                    canDelete = canDelete || bundlePermissions.contains(Permission.DELETE_BUNDLES_FROM_GROUP);
                    canDeploy = canDeploy || bundlePermissions.contains(Permission.DEPLOY_BUNDLES_TO_GROUP);
                    canTag = canTag || bundlePermissions.contains(Permission.CREATE_BUNDLES_IN_GROUP);
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.