Search in sources :

Example 6 with ActivityModuleException

use of eu.europa.ec.fisheries.ers.service.exception.ActivityModuleException in project UVMS-ActivityModule-APP by UnionVMS.

the class ActivitySubscriptionPermissionChecker method checkPermissionForFaReport.

public SubscriptionPermissionResponse checkPermissionForFaReport(FLUXFAReportMessage faReport) throws ActivityModuleException {
    SubscriptionDataRequest subscriptionDataRequest = SubscriptionMapper.mapToSubscriptionDataRequest(faReport);
    String subscrPermissionRequest;
    try {
        subscrPermissionRequest = JAXBUtils.marshallJaxBObjectToString(subscriptionDataRequest);
    } catch (JAXBException e) {
        throw new ActivityModuleException("JAXBException while trying to unmarshall to SubscriptionDataRequest from Subscription Module!", e);
    }
    return getPermissionFromSubscription(subscrPermissionRequest, activityConsumerBean.getDestination());
}
Also used : JAXBException(javax.xml.bind.JAXBException) SubscriptionDataRequest(eu.europa.ec.fisheries.wsdl.subscription.module.SubscriptionDataRequest) ActivityModuleException(eu.europa.ec.fisheries.ers.service.exception.ActivityModuleException)

Aggregations

ActivityModuleException (eu.europa.ec.fisheries.ers.service.exception.ActivityModuleException)6 ActivityModelMarshallException (eu.europa.ec.fisheries.uvms.activity.model.exception.ActivityModelMarshallException)3 MessageException (eu.europa.ec.fisheries.uvms.commons.message.api.MessageException)3 JAXBException (javax.xml.bind.JAXBException)3 RulesModelMapperException (eu.europa.ec.fisheries.uvms.rules.model.exception.RulesModelMapperException)2 SubscriptionDataRequest (eu.europa.ec.fisheries.wsdl.subscription.module.SubscriptionDataRequest)2 SubscriptionParameter (eu.europa.ec.fisheries.wsdl.subscription.module.SubscriptionParameter)2 SubscriptionPermissionResponse (eu.europa.ec.fisheries.wsdl.subscription.module.SubscriptionPermissionResponse)2 JMSException (javax.jms.JMSException)2 TextMessage (javax.jms.TextMessage)2 FLUXFAQueryMessage (un.unece.uncefact.data.standard.fluxfaquerymessage._3.FLUXFAQueryMessage)2 SetFLUXFAReportOrQueryMessageRequest (eu.europa.ec.fisheries.uvms.activity.model.schemas.SetFLUXFAReportOrQueryMessageRequest)1 ServiceException (eu.europa.ec.fisheries.uvms.commons.service.exception.ServiceException)1 FLUXFAReportMessage (un.unece.uncefact.data.standard.fluxfareportmessage._3.FLUXFAReportMessage)1 FAQuery (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FAQuery)1