use of com.helger.commons.state.ETriState in project phase4 by phax.
the class PModeLegErrorHandlingMicroTypeConverter method convertToNative.
@Nonnull
public PModeLegErrorHandling convertToNative(@Nonnull final IMicroElement aElement) {
final PModeAddressList aReceiverAddresses = MicroTypeConverter.convertToNative(aElement.getFirstChildElement(ELEMENT_REPORT_RECEIVER_ERRORS_TO), PModeAddressList.class);
final PModeAddressList aSenderAddresses = MicroTypeConverter.convertToNative(aElement.getFirstChildElement(ELEMENT_REPORT_SENDER_ERRORS_TO), PModeAddressList.class);
final ETriState eReportAsResponse = getTriState(aElement.getAttributeValue(ATTR_REPORT_AS_RESPONSE), PModeLegSecurity.DEFAULT_PMODE_AUTHORIZE);
final ETriState eReportProcessErrorNotifyConsumer = getTriState(aElement.getAttributeValue(ATTR_REPORT_PROCESS_ERROR_NOTFIY_CONSUMER), PModeLegSecurity.DEFAULT_USERNAME_TOKEN_CREATED);
final ETriState eReportProcessErrorNotifyProducer = getTriState(aElement.getAttributeValue(ATTR_REPORT_PROCESS_ERROR_NOTFIY_PRODUCER), PModeLegSecurity.DEFAULT_USERNAME_TOKEN_DIGEST);
final ETriState eReportDeliveryFailuresNotifyProducer = getTriState(aElement.getAttributeValue(ATTR_REPORT_DELIVERY_FAILURE_NOTFIY_PRODUCER), PModeLegSecurity.DEFAULT_SEND_RECEIPT);
return new PModeLegErrorHandling(aReceiverAddresses, aSenderAddresses, eReportAsResponse, eReportProcessErrorNotifyConsumer, eReportProcessErrorNotifyProducer, eReportDeliveryFailuresNotifyProducer);
}
use of com.helger.commons.state.ETriState in project phase4 by phax.
the class PModeLegReliabilityJsonConverter method convertToNative.
@Nonnull
public static PModeLegReliability convertToNative(@Nonnull final IJsonObject aElement) {
final ETriState eAtLeastOnceContract = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(AT_LEAST_ONCE_CONTRACT), PModeLegReliability.DEFAULT_AT_LEAST_ONCE_CONTRACT);
final ETriState eAtLeastOnceAckOnDelivery = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(AT_LEAST_ONCE_ACK_ON_DELIVERY), PModeLegReliability.DEFAULT_AT_LEAST_ONCE_ACK_ON_DELIVERY);
final String sAtLeastOnceContractAcksTo = aElement.getAsString(AT_LEAST_ONCE_CONTRACT_ACK_TO);
final ETriState eAtLeastOnceContractAckResponse = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(AT_LEAST_ONCE_CONTRACT_ACK_RESPONSE), PModeLegReliability.DEFAULT_AT_LEAST_ONCE_CONTRACT_ACK_RESPONSE);
final String sAtLeastOnceReplyPattern = aElement.getAsString(AT_LEAST_ONCE_REPLY_PATTERN);
final ETriState eAtMostOnceContract = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(AT_MOST_ONCE_CONTRACT), PModeLegReliability.DEFAULT_AT_MOST_ONCE_CONTRACT);
final ETriState eInOrderContract = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(IN_ORDER_CONTRACT), PModeLegReliability.DEFAULT_IN_ORDER_CONTACT);
final ETriState eStartGroup = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(START_GROUP), PModeLegReliability.DEFAULT_START_GROUP);
final ICommonsList<String> aCorrelationStrings = new CommonsArrayList<>();
final IJsonArray aCorrelation = aElement.getAsArray(CORRELATION);
if (aCorrelation != null)
for (final IJsonValue aCorrelationElement : aCorrelation.iteratorValues()) aCorrelationStrings.add(aCorrelationElement.getAsString());
final ETriState eTerminateGroup = AbstractPModeMicroTypeConverter.getTriState(aElement.getAsString(TERMINATE_GROUP), PModeLegReliability.DEFAULT_TERMINATE_GROUP);
return new PModeLegReliability(eAtLeastOnceContract, eAtLeastOnceAckOnDelivery, sAtLeastOnceContractAcksTo, eAtLeastOnceContractAckResponse, sAtLeastOnceReplyPattern, eAtMostOnceContract, eInOrderContract, eStartGroup, aCorrelationStrings, eTerminateGroup);
}
use of com.helger.commons.state.ETriState in project phase4 by phax.
the class PeppolPMode method generatePModeReceptionAwareness.
@Nonnull
public static PModeReceptionAwareness generatePModeReceptionAwareness() {
final ETriState eReceptionAwareness = ETriState.TRUE;
final ETriState eRetry = ETriState.TRUE;
final int nMaxRetries = 1;
final int nRetryIntervalMS = 10_000;
final ETriState eDuplicateDetection = ETriState.TRUE;
return new PModeReceptionAwareness(eReceptionAwareness, eRetry, nMaxRetries, nRetryIntervalMS, eDuplicateDetection);
}
use of com.helger.commons.state.ETriState in project phase4 by phax.
the class PeppolPMode method generatePModeLegErrorHandling.
@Nonnull
public static PModeLegErrorHandling generatePModeLegErrorHandling() {
final PModeAddressList aReportSenderErrorsTo = null;
final PModeAddressList aReportReceiverErrorsTo = null;
final ETriState eReportAsResponse = ETriState.TRUE;
final ETriState eReportProcessErrorNotifyConsumer = ETriState.TRUE;
final ETriState eReportProcessErrorNotifyProducer = ETriState.TRUE;
final ETriState eReportDeliveryFailuresNotifyProducer = ETriState.TRUE;
return new PModeLegErrorHandling(aReportSenderErrorsTo, aReportReceiverErrorsTo, eReportAsResponse, eReportProcessErrorNotifyConsumer, eReportProcessErrorNotifyProducer, eReportDeliveryFailuresNotifyProducer);
}
use of com.helger.commons.state.ETriState in project phase4 by phax.
the class CEFPMode method generatePModeReceptionAwareness.
@Nonnull
public static PModeReceptionAwareness generatePModeReceptionAwareness() {
final ETriState eReceptionAwareness = ETriState.TRUE;
final ETriState eRetry = ETriState.TRUE;
final int nMaxRetries = 1;
final int nRetryIntervalMS = 10_000;
final ETriState eDuplicateDetection = ETriState.TRUE;
return new PModeReceptionAwareness(eReceptionAwareness, eRetry, nMaxRetries, nRetryIntervalMS, eDuplicateDetection);
}
Aggregations