use of eu.europa.ec.fisheries.schema.audit.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;
}
use of eu.europa.ec.fisheries.schema.audit.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);
}
use of eu.europa.ec.fisheries.schema.audit.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);
}
Aggregations