Package org.rhq.core.domain.criteria

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


        return jobDetail;
    }

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        AgentCriteria crit = new AgentCriteria();
        crit.setPageControl(PageControl.getUnlimitedInstance());

        AgentManagerLocal agentManager = LookupUtil.getAgentManager();
        Subject overlord = LookupUtil.getSubjectManager().getOverlord();

        PageList<Agent> agents = agentManager.findAgentsByCriteria(overlord, crit);
View Full Code Here


        if (valuesCsvList == null)
            return Collections.EMPTY_LIST;

        final String[] resourceIdStrings = valuesCsvList.split(",");
        final Integer[] resourceIds = new Integer[resourceIdStrings.length];
        AgentCriteria c = new AgentCriteria();
        for (int i = 0, len = resourceIdStrings.length; (i < len); ++i) {
            resourceIds[i] = Integer.parseInt(resourceIdStrings[i]);
        }
        c.addFilterIds(resourceIds);
        Subject overlord = LookupUtil.getSubjectManager().getOverlord();
        List<Agent> result = LookupUtil.getAgentManager().findAgentsByCriteria(overlord, c);
        return result;
    }
View Full Code Here

        }
        return availableFilterForm;
    }

    private void prepareMembers(final AffinityGroupAgentsSelector selector) {
        AgentCriteria criteria = new AgentCriteria();
        criteria.addFilterAffinityGroupId(affinityGroupId);
        GWTServiceLookup.getTopologyService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
            public void onSuccess(PageList<Agent> result) {
                ListGridRecord[] records = getDataSource().buildRecords(result);
                originallyAssignedIds = getIdList(records);
                setAssigned(records);
View Full Code Here

        return record;
    }

    @Override
    protected AgentCriteria getFetchCriteria(DSRequest request) {
        AgentCriteria criteria = new AgentCriteria();
        //      printRequestCriteria(request);
        criteria.addFilterId(getFilter(request, FIELD_ID.propertyName(), Integer.class));
        criteria.addFilterName(getFilter(request, FIELD_NAME.propertyName(), String.class));
        criteria.addFilterAddress(getFilter(request, FILTER_ADDRESS, String.class));
        criteria.addFilterPort(getFilter(request, FILTER_PORT, Integer.class));
        criteria.addFilterAgenttoken(getFilter(request, FILTER_AGENTTOKEN, String.class));
        criteria.addFilterServerId(getFilter(request, FILTER_SERVER_ID, Integer.class));
        criteria.addFilterAffinityGroupId(getFilter(request, FILTER_AFFINITY_GROUP_ID, Integer.class));

        //@todo: Remove me when finished debugging search expression
        Log.debug(" *** AgentCriteria Search String: " + getFilter(request, "search", String.class));
        criteria.setSearchExpression(getFilter(request, "search", String.class));

        return criteria;
    }
View Full Code Here

    }

    @Override
    protected void onInit() {
        super.onInit();
        AgentCriteria criteria = new AgentCriteria();
        criteria.addFilterId(agentId);
        GWTServiceLookup.getTopologyService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
            public void onSuccess(final PageList<Agent> agents) {
                if (agents == null || agents.isEmpty() || agents.size() != 1) {
                    CoreGUI.getErrorHandler().handleError(
                        MSG.view_adminTopology_message_fetchAgentFail(String.valueOf(agentId)));
View Full Code Here

TOP

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

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.