Search in sources :

Example 1 with FlowCollection

use of org.talend.esb.sam.server.persistence.FlowCollection in project tesb-rt-se by Talend.

the class SAMRestServiceImpl method getFlows.

@Override
public Response getFlows(Integer offset, Integer limit) {
    Map<String, String[]> params = new HashMap<String, String[]>();
    MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
    for (Entry<String, List<String>> entry : queryParams.entrySet()) {
        params.put(entry.getKey(), entry.getValue().toArray(new String[] {}));
    }
    CriteriaAdapter adapter = new CriteriaAdapter(offset, limit, params);
    FlowCollection flowCollection = provider.getFlows(adapter);
    return Response.ok(aggregateRawData(flowCollection)).build();
}
Also used : CriteriaAdapter(org.talend.esb.sam.server.persistence.criterias.CriteriaAdapter) HashMap(java.util.HashMap) AggregatedFlowCollection(org.talend.esb.sam.server.persistence.AggregatedFlowCollection) FlowCollection(org.talend.esb.sam.server.persistence.FlowCollection) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 AggregatedFlowCollection (org.talend.esb.sam.server.persistence.AggregatedFlowCollection)1 FlowCollection (org.talend.esb.sam.server.persistence.FlowCollection)1 CriteriaAdapter (org.talend.esb.sam.server.persistence.criterias.CriteriaAdapter)1