use of com.helger.as2lib.params.AS2InvalidParameterException in project as2-lib by phax.
the class AS2SenderModule method checkRequired.
protected void checkRequired(@Nonnull final AS2Message aMsg) throws AS2InvalidParameterException {
final Partnership aPartnership = aMsg.partnership();
try {
AS2InvalidParameterException.checkValue(aMsg, "ContentType", aMsg.getContentType());
AS2InvalidParameterException.checkValue(aMsg, "Attribute: " + CPartnershipIDs.PA_AS2_URL, aPartnership.getAS2URL());
AS2InvalidParameterException.checkValue(aMsg, "Receiver: " + CPartnershipIDs.PID_AS2, aPartnership.getReceiverAS2ID());
AS2InvalidParameterException.checkValue(aMsg, "Sender: " + CPartnershipIDs.PID_AS2, aPartnership.getSenderAS2ID());
AS2InvalidParameterException.checkValue(aMsg, "Subject", aMsg.getSubject());
AS2InvalidParameterException.checkValue(aMsg, "Sender: " + CPartnershipIDs.PID_EMAIL, aPartnership.getSenderEmail());
AS2InvalidParameterException.checkValue(aMsg, "Message Data", aMsg.getData());
} catch (final AS2InvalidParameterException ex) {
ex.setSourceMsg(aMsg);
throw ex;
}
}
Aggregations