Examples of fetchBundleGroups()


Examples of org.rhq.core.domain.criteria.BundleCriteria.fetchBundleGroups()

        assertNotNull(bundles);
        assertEquals("Should be able to see assigned bundle", 1, bundles.size());

        // check new bundle criteria options (no match)
        bCriteria.addFilterBundleGroupIds(87678);
        bCriteria.fetchBundleGroups(true);
        bundles = bundleManager.findBundlesByCriteria(subject, bCriteria);
        assertNotNull(bundles);
        assert bundles.isEmpty() : "Should not have found anything";

        // check new bundle criteria options (match)
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.fetchBundleGroups()

        assertNotNull(bundles);
        assert bundles.isEmpty() : "Should not have found anything";

        // check new bundle criteria options (match)
        bCriteria.addFilterBundleGroupIds(bundleGroup.getId());
        bCriteria.fetchBundleGroups(true);
        bundles = bundleManager.findBundlesByCriteria(subject, bCriteria);
        assertNotNull(bundles);
        assertEquals("Should be able to see assigned bundle", 1, bundles.size());
        assertNotNull(bundles.get(0).getBundleGroups());
        assertEquals("Should have fetched bundlegroup", 1, bundles.get(0).getBundleGroups().size());
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.fetchBundleGroups()

        if (parentId == null) {

            // there is no parent - we are at the root of the tree
            // get the bundles and build the bundle groups (including unassigned) from that
            BundleCriteria criteria = new BundleCriteria();
            criteria.fetchBundleGroups(true);

            bundleService.findBundlesByCriteria(criteria, new AsyncCallback<PageList<Bundle>>() {
                public void onFailure(Throwable caught) {
                    CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught);
                    response.setStatus(DSResponse.STATUS_FAILURE);
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleGroupCriteria.fetchBundleGroups()

        } else {
            // can only assign to bundle groups for which he has the necessary permissions
            RoleCriteria criteria = new RoleCriteria();
            criteria.addFilterSubjectId(assigningSubject.getId());
            criteria.addFilterPermissions(permFilter);
            criteria.fetchBundleGroups(true);
            List<Role> roles = LookupUtil.getRoleManager().findRolesByCriteria(subjectManager.getOverlord(), criteria);
            bundleGroups = new ArrayList<BundleGroup>();
            for (Role role : roles) {
                for (BundleGroup bundleGroup : role.getBundleGroups()) {
                    if (!bundleGroups.contains(bundleGroup)) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.RoleCriteria.fetchBundleGroups()

        } else {
            // can only assign to bundle groups for which he has the necessary permissions
            RoleCriteria criteria = new RoleCriteria();
            criteria.addFilterSubjectId(assigningSubject.getId());
            criteria.addFilterPermissions(permFilter);
            criteria.fetchBundleGroups(true);
            List<Role> roles = LookupUtil.getRoleManager().findRolesByCriteria(subjectManager.getOverlord(), criteria);
            bundleGroups = new ArrayList<BundleGroup>();
            for (Role role : roles) {
                for (BundleGroup bundleGroup : role.getBundleGroups()) {
                    if (!bundleGroups.contains(bundleGroup)) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.RoleCriteria.fetchBundleGroups()

        if (id != null) {
            // If we're fetching a single Role, then fetch all the related Sets.
            criteria.fetchSubjects(true);
            criteria.fetchResourceGroups(true);
            criteria.fetchLdapGroups(true);
            criteria.fetchBundleGroups(true);
        }

        // TODO: instead of fetching subjects and resource groups, use a composite object that will pull the subject
        //       and resource group count across the wire.  these counts will not required permission checks at all.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.