use of eu.europa.ec.fisheries.schema.exchange.v1.LogWithRawMsgAndType in project UVMS-ExchangeModule-APP by UnionVMS.
the class ExchangeLogServiceBean method getExchangeLogRawMessageAndValidationByGuid.
@Override
public ExchangeLogWithValidationResults getExchangeLogRawMessageAndValidationByGuid(String guid) throws ExchangeLogException {
LogWithRawMsgAndType rawMsg = exchangeLogModel.getExchangeLogRawXmlByGuid(guid);
ExchangeLogWithValidationResults validationFromRules = exchangeToRulesSyncMsgBean.getValidationFromRules(guid, rawMsg.getType());
validationFromRules.setMsg(rawMsg.getRawMsg() != null ? rawMsg.getRawMsg() : StringUtils.EMPTY);
return validationFromRules;
}
use of eu.europa.ec.fisheries.schema.exchange.v1.LogWithRawMsgAndType in project UVMS-ExchangeModule-APP by UnionVMS.
the class ExchangeLogModelBean method getExchangeLogRawXmlByGuid.
@Override
public LogWithRawMsgAndType getExchangeLogRawXmlByGuid(String guid) {
LogWithRawMsgAndType logWrapper = new LogWithRawMsgAndType();
try {
ExchangeLog exchangeLog = logDao.getExchangeLogByGuid(guid);
String rawMsg = exchangeLog.getTypeRefMessage();
TypeRefType type = exchangeLog.getTypeRefType();
logWrapper.setRawMsg(rawMsg);
logWrapper.setType(type);
} catch (ExchangeDaoException e) {
LOG.error("[ERROR] Couldn't find Log with the following GUID : [[" + guid + "]]", e);
}
return logWrapper;
}
Aggregations