use of eu.europa.ec.fisheries.uvms.exchange.rest.dto.exchange.ListQueryResponse in project UVMS-ExchangeModule-APP by UnionVMS.
the class ExchangeLogRestResource method getLogListByCriteria.
/**
* @responseMessage 200 [Success]
* @responseMessage 500 [Error]
*
* @summary Get a list of all exchangeLogs by search criterias
*/
@POST
@Consumes(value = { MediaType.APPLICATION_JSON })
@Produces(value = { MediaType.APPLICATION_JSON })
@Path("/list")
@RequiresFeature(UnionVMSFeature.viewExchange)
public ResponseDto getLogListByCriteria(final ExchangeListQuery query) {
log.info("Get list invoked in rest layer:{}", query);
try {
// TODO query in swagger
GetLogListByQueryResponse response = serviceLayer.getExchangeLogList(query);
ListQueryResponse exchangeLogList = ExchangeLogMapper.mapToQueryResponse(response);
return new ResponseDto(exchangeLogList, RestResponseCode.OK);
} catch (Exception ex) {
log.error("[ Error when geting log list. {} ] {} ", query, ex.getMessage());
return ErrorHandler.getFault(ex);
}
}
Aggregations