Search in sources :

Example 1 with UpdateLogStatusRequest

use of eu.europa.ec.fisheries.schema.exchange.module.v1.UpdateLogStatusRequest in project UVMS-ExchangeModule-APP by UnionVMS.

the class ExchangeEventIncomingServiceBean method updateLogStatus.

@Override
public void updateLogStatus(@Observes @UpdateLogStatusEvent ExchangeMessageEvent message) {
    try {
        UpdateLogStatusRequest request = JAXBMarshaller.unmarshallTextMessage(message.getJmsMessage(), UpdateLogStatusRequest.class);
        String logGuid = request.getLogGuid();
        ExchangeLogStatusTypeType status = request.getNewStatus();
        exchangeLog.updateStatus(logGuid, status);
    } catch (ExchangeLogException e) {
        fireExchangeFault(message, "Could not update the status of a message log.", e);
    } catch (ExchangeModelMarshallException e) {
        fireExchangeFault(message, "Could not unmarshall the incoming UpdateLogStatus message", e);
    }
}
Also used : ExchangeModelMarshallException(eu.europa.ec.fisheries.uvms.exchange.model.exception.ExchangeModelMarshallException) UpdateLogStatusRequest(eu.europa.ec.fisheries.schema.exchange.module.v1.UpdateLogStatusRequest) ExchangeLogStatusTypeType(eu.europa.ec.fisheries.schema.exchange.v1.ExchangeLogStatusTypeType) ExchangeLogException(eu.europa.ec.fisheries.uvms.exchange.service.exception.ExchangeLogException)

Aggregations

UpdateLogStatusRequest (eu.europa.ec.fisheries.schema.exchange.module.v1.UpdateLogStatusRequest)1 ExchangeLogStatusTypeType (eu.europa.ec.fisheries.schema.exchange.v1.ExchangeLogStatusTypeType)1 ExchangeModelMarshallException (eu.europa.ec.fisheries.uvms.exchange.model.exception.ExchangeModelMarshallException)1 ExchangeLogException (eu.europa.ec.fisheries.uvms.exchange.service.exception.ExchangeLogException)1