Search in sources :

Example 6 with ListPagination

use of eu.europa.ec.fisheries.schema.movement.search.v1.ListPagination in project UVMS-Docker by UnionVMS.

the class MovementMovementRestIT method createMovementQuery.

/**
 * Creates the movement query.
 *
 * @return the movement query
 */
private MovementQuery createMovementQuery() {
    MovementQuery movementQuery = new MovementQuery();
    movementQuery.setExcludeFirstAndLastSegment(false);
    ListPagination listPagination = new ListPagination();
    listPagination.setListSize(BigInteger.valueOf(100));
    listPagination.setPage(BigInteger.valueOf(1));
    movementQuery.setPagination(listPagination);
    ListCriteria listCriteria = new ListCriteria();
    listCriteria.setKey(SearchKey.CONNECT_ID);
    listCriteria.setValue("Some connectId");
    movementQuery.getMovementSearchCriteria().add(listCriteria);
    return movementQuery;
}
Also used : MovementQuery(eu.europa.ec.fisheries.schema.movement.search.v1.MovementQuery) ListCriteria(eu.europa.ec.fisheries.schema.movement.search.v1.ListCriteria) ListPagination(eu.europa.ec.fisheries.schema.movement.search.v1.ListPagination)

Example 7 with ListPagination

use of eu.europa.ec.fisheries.schema.movement.search.v1.ListPagination in project UVMS-Docker by UnionVMS.

the class MobileTerminalRestIT method getMobileTerminalListTest.

/**
 * Gets the mobile terminal list test.
 *
 * @return the mobile terminal list test
 * @throws Exception
 *             the exception
 */
@Test
public void getMobileTerminalListTest() throws Exception {
    MobileTerminalListQuery queryRequest = new MobileTerminalListQuery();
    ListPagination pagination = new ListPagination();
    pagination.setListSize(100);
    pagination.setPage(1);
    queryRequest.setPagination(pagination);
    MobileTerminalSearchCriteria criteria = new MobileTerminalSearchCriteria();
    criteria.setIsDynamic(true);
    queryRequest.setMobileTerminalSearchCriteria(criteria);
    final HttpResponse response = Request.Post(getBaseUrl() + "mobileterminal/rest/mobileterminal/list").setHeader("Content-Type", "application/json").setHeader("Authorization", getValidJwtToken()).bodyByteArray(writeValueAsString(queryRequest).getBytes()).execute().returnResponse();
    Map<String, Object> dataMap = checkSuccessResponseReturnMap(response);
}
Also used : ListPagination(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ListPagination) HttpResponse(org.apache.http.HttpResponse) MobileTerminalListQuery(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalListQuery) MobileTerminalSearchCriteria(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalSearchCriteria) Test(org.junit.Test)

Example 8 with ListPagination

use of eu.europa.ec.fisheries.schema.movement.search.v1.ListPagination in project UVMS-Docker by UnionVMS.

the class AuditRestIT method getListByQueryTest.

/**
 * Gets the config search fields test.
 *
 * @return the config search fields test
 * @throws Exception
 *             the exception
 */
@Test
public void getListByQueryTest() throws Exception {
    AuditLogListQuery auditLogListQuery = new AuditLogListQuery();
    ListPagination listPagination = new ListPagination();
    listPagination.setPage(BigInteger.valueOf(1));
    listPagination.setListSize(BigInteger.valueOf(25));
    auditLogListQuery.setPagination(listPagination);
    final HttpResponse response = Request.Post(getBaseUrl() + "audit/rest/audit/list").setHeader("Content-Type", "application/json").setHeader("Authorization", getValidJwtToken()).bodyByteArray(writeValueAsString(auditLogListQuery).getBytes()).execute().returnResponse();
    Map<String, Object> dataMap = checkSuccessResponseReturnMap(response);
}
Also used : AuditLogListQuery(eu.europa.ec.fisheries.schema.audit.search.v1.AuditLogListQuery) ListPagination(eu.europa.ec.fisheries.schema.audit.search.v1.ListPagination) HttpResponse(org.apache.http.HttpResponse) Test(org.junit.Test) AbstractRestServiceTest(eu.europa.ec.fisheries.uvms.docker.validation.common.AbstractRestServiceTest)

Aggregations

HttpResponse (org.apache.http.HttpResponse)5 Test (org.junit.Test)5 ListPagination (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ListPagination)3 AuditLogListQuery (eu.europa.ec.fisheries.schema.audit.search.v1.AuditLogListQuery)2 ListPagination (eu.europa.ec.fisheries.schema.audit.search.v1.ListPagination)2 ListCriteria (eu.europa.ec.fisheries.schema.movement.search.v1.ListCriteria)2 ListPagination (eu.europa.ec.fisheries.schema.movement.search.v1.ListPagination)2 MovementQuery (eu.europa.ec.fisheries.schema.movement.search.v1.MovementQuery)2 AbstractRestServiceTest (eu.europa.ec.fisheries.uvms.docker.validation.common.AbstractRestServiceTest)2 PollListQuery (eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollListQuery)1 PollSearchCriteria (eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollSearchCriteria)1 PollableQuery (eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollableQuery)1 MobileTerminalListQuery (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalListQuery)1 MobileTerminalSearchCriteria (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalSearchCriteria)1 RangeCriteria (eu.europa.ec.fisheries.schema.movement.search.v1.RangeCriteria)1 ListPagination (eu.europa.ec.fisheries.schema.rules.search.v1.ListPagination)1 TicketListCriteria (eu.europa.ec.fisheries.schema.rules.search.v1.TicketListCriteria)1 TicketQuery (eu.europa.ec.fisheries.schema.rules.search.v1.TicketQuery)1