Package org.rhq.core.domain.criteria

Examples of org.rhq.core.domain.criteria.ResourceGroupCriteria


        addMember(this.treeGrid);
    }

    public void setSelectedGroup(final int groupId, boolean isAutoCluster) {
        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(groupId);
        criteria.addFilterVisible(!isAutoCluster);
        criteria.fetchResourceType(true);

        GWTServiceLookup.getResourceGroupService().findResourceGroupsByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroup>>() {

                public void onFailure(Throwable caught) {
View Full Code Here


    //    }

    public class SelectedResourceGroupsDataSource extends ResourceGroupsDataSource {
        @Override
        protected ResourceGroupCriteria getFetchCriteria(final DSRequest request) {
            ResourceGroupCriteria result = super.getFetchCriteria(request);
            if (null != result) {
                result.setStrict(false);
            }
            return result;
        }
View Full Code Here

        setDisplayField("name");
        setPickListWidth(450);
        setPickListFields(nameField, descriptionField);
        setTextMatchStyle(TextMatchStyle.SUBSTRING);

        this.criteria = (null == criteria) ? new ResourceGroupCriteria() : criteria;
    }
View Full Code Here

        @Override
        protected ResourceGroupCriteria getFetchCriteria(final DSRequest request) {
            // We don't want to use the superclass's getFetchCriteria because our selected value
            // is either a Integer (when a real group has been selected) or a String (when a partial search string is selected).
            // So, here we create our own criteria. See BZ 802528.
            ResourceGroupCriteria result = criteria;
            String filterString = getFilter(request, "id", String.class);
            if (filterString != null) {
                try {
                    Integer id = new Integer(filterString);
                    result.addFilterId(id);
                } catch (Exception e) {
                    result.addFilterName(filterString);
                }
            }

            return result;
        }
View Full Code Here

        }

        expandCollapseArrow = new Img("[SKIN]/ListGrid/row_collapsed.png", 16, 16);
        expandCollapseArrow.setTooltip(COLLAPSED_TOOLTIP);
        expandCollapseArrow.setLayoutAlign(VerticalAlignment.CENTER);
        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(this.group.getId());
        // for autoclusters and autogroups we need to add more criteria
        if (isAutoCluster) {
            criteria.addFilterVisible(false);
        } else if (isAutoGroup) {
            criteria.addFilterVisible(false);
            criteria.addFilterPrivate(true);
        }

        GWTServiceLookup.getResourceGroupService().findResourceGroupCompositesByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroupComposite>>() {
                @Override
View Full Code Here

            addMember(tagEditorView);
        }
    }

    private void loadTags(final TagEditorView tagEditorView) {
        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(group.getId());
        // for autoclusters and autogroups we need to add more criteria
        if (isAutoCluster) {
            criteria.addFilterVisible(false);
        } else if (isAutoGroup) {
            criteria.addFilterVisible(false);
            criteria.addFilterPrivate(true);
        }
        criteria.fetchTags(true);

        GWTServiceLookup.getResourceGroupService().findResourceGroupsByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroup>>() {
                public void onFailure(Throwable caught) {
                    CoreGUI.getErrorHandler().handleError(MSG.view_titleBar_common_loadTagsFailure(group.getName()),
View Full Code Here

    }

    public void populateData() {
        ResourceGroupGWTServiceAsync groupService = GWTServiceLookup.getResourceGroupService();

        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(context.getGroupId());
        criteria.fetchResourceType(true);
        criteria.fetchExplicitResources(true);
        if (context.isAutoCluster()) {
            criteria.addFilterVisible(false);
        } else if (context.isAutoGroup()) {
            criteria.addFilterVisible(false);
            criteria.addFilterPrivate(true);
        }

        childResources = new TreeSet<Resource>();
        measurementForEachResource.clear();
        groupService.findResourceGroupCompositesByCriteria(criteria,
View Full Code Here

    @Override
    protected void loadSelectedItem(final int groupId, final ViewPath viewPath) {
        this.groupId = groupId;

        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(groupId);

        // for autoclusters and autogroups we need to add more criteria
        final boolean isAutoCluster = isAutoCluster();
        final boolean isAutoGroup = isAutoGroup();
        if (isAutoCluster) {
            criteria.addFilterVisible(false);
        } else if (isAutoGroup) {
            criteria.addFilterVisible(false);
            criteria.addFilterPrivate(true);
        }

        GWTServiceLookup.getResourceGroupService().findResourceGroupCompositesByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroupComposite>>() {
                @Override
View Full Code Here

                        showContextMenu(treeView, treeGrid, node, result);
                    }
                });

        } else if (node.isCompatibleGroupTopNode()) {
            ResourceGroupCriteria criteria = new ResourceGroupCriteria();
            criteria.addFilterId(Integer.parseInt(node.getAttribute("id")));
            GWTServiceLookup.getResourceGroupService().findResourceGroupsByCriteria(criteria,
                new AsyncCallback<PageList<ResourceGroup>>() {
                    @Override
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler()
View Full Code Here

    private boolean isAutoGroup = false;

    public void showContextMenu(final VLayout treeView, final TreeGrid treeGrid, final TreeNode node,
        final ResourceGroup group) {
        // we need the group composite to access permissions for context menu authz, so get it now
        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(group.getId());

        // for autoclusters and private groups (autogroups) we need to add more criteria
        isAutoCluster = (null != group.getClusterResourceGroup());
        isAutoGroup = (null != group.getSubject());

        if (isAutoCluster) {
            criteria.addFilterVisible(false);

        } else if (isAutoGroup) {
            criteria.addFilterVisible(false);
            criteria.addFilterPrivate(true);
        }

        GWTServiceLookup.getResourceGroupService().findResourceGroupCompositesByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroupComposite>>() {
                public void onFailure(Throwable caught) {
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.criteria.ResourceGroupCriteria

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.