use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class EsbJmsListener method configure.
public void configure() throws ConfigurationException {
if (getMessageProtocol() == null) {
throw new ConfigurationException(getLogPrefix() + "messageProtocol must be set");
}
if (!getMessageProtocol().equalsIgnoreCase(REQUEST_REPLY) && !getMessageProtocol().equalsIgnoreCase(FIRE_AND_FORGET)) {
throw new ConfigurationException(getLogPrefix() + "illegal value for messageProtocol [" + getMessageProtocol() + "], must be '" + REQUEST_REPLY + "' or '" + FIRE_AND_FORGET + "'");
}
if (getMessageProtocol().equalsIgnoreCase(REQUEST_REPLY)) {
setForceMessageIdAsCorrelationId(true);
if (CACHE_CONSUMER.equals(getCacheMode())) {
boolean recovered = false;
ReceiverBase receiverBase = getReceiverBase();
if (receiverBase != null) {
recovered = (receiverBase.isRecover() || receiverBase.isRecoverAdapter());
}
if (!recovered) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
configWarnings.add(log, "attribute [cacheMode] already has a default value [" + CACHE_CONSUMER + "]");
}
}
setCacheMode("CACHE_CONSUMER");
} else {
setUseReplyTo(false);
}
super.configure();
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class EsbSoapWrapperPipe method configure.
@Override
public void configure() throws ConfigurationException {
if (mode == Mode.REG) {
if (cmhVersion == 0) {
cmhVersion = 1;
} else if (cmhVersion < 0 || cmhVersion > 2) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix(null) + "cmhVersion [" + cmhVersion + "] for mode [" + mode.toString() + "] should be set to '1' or '2', assuming '1'";
configWarnings.add(log, msg);
cmhVersion = 1;
}
} else {
if (cmhVersion != 0) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix(null) + "cmhVersion [" + cmhVersion + "] for mode [" + mode.toString() + "] should not be set, assuming '0'";
configWarnings.add(log, msg);
cmhVersion = 0;
}
}
if ("wrap".equalsIgnoreCase(getDirection())) {
if (StringUtils.isEmpty(getSoapHeaderSessionKey())) {
setSoapHeaderSessionKey(DEFAULT_SOAP_HEADER_SESSION_KEY);
}
if (StringUtils.isEmpty(getSoapHeaderStyleSheet())) {
if (mode == Mode.BIS) {
setSoapHeaderStyleSheet("/xml/xsl/esb/bisSoapHeader.xsl");
} else {
setSoapHeaderStyleSheet("/xml/xsl/esb/soapHeader.xsl");
}
}
if (StringUtils.isEmpty(getSoapBodyStyleSheet())) {
if (mode == Mode.REG) {
setSoapBodyStyleSheet("/xml/xsl/esb/soapBody.xsl");
} else if (mode == Mode.BIS) {
setSoapBodyStyleSheet("/xml/xsl/esb/bisSoapBody.xsl");
}
}
stripDestination();
if (isAddOutputNamespace()) {
String ons = getOutputNamespaceBaseUri();
if (getMessagingLayer().equals("P2P") || (StringUtils.isNotEmpty(p2pAlias) && getMessagingLayer().equalsIgnoreCase(p2pAlias))) {
ons = ons + "/" + getBusinessDomain() + "/" + getApplicationName() + "/" + getApplicationFunction();
} else {
ons = ons + "/" + getBusinessDomain() + "/" + getServiceName() + (StringUtils.isEmpty(getServiceContext()) ? "" : "/" + getServiceContext()) + "/" + getServiceContextVersion() + "/" + getOperationName() + "/" + getOperationVersion();
}
setOutputNamespace(ons);
}
addParameters();
}
super.configure();
if (isUseFixedValues()) {
if (!ConfigurationUtils.stubConfiguration()) {
throw new ConfigurationException(getLogPrefix(null) + "returnFixedDate only allowed in stub mode");
}
}
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class Adapter method setRequestReplyLogging.
public void setRequestReplyLogging(boolean requestReplyLogging) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
if (requestReplyLogging) {
String msg = "Adapter [" + getName() + "] implementing setting of requestReplyLogging=true as msgLogLevel=Terse";
configWarnings.add(log, msg);
setMsgLogLevelNum(MsgLogUtil.MSGLOG_LEVEL_TERSE);
} else {
String msg = "Adapter [" + getName() + "] implementing setting of requestReplyLogging=false as msgLogLevel=None";
configWarnings.add(log, msg);
setMsgLogLevelNum(MsgLogUtil.MSGLOG_LEVEL_NONE);
}
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class RecordXslTransformer method setXslFile.
/**
* @deprecated configuration using attribute 'xslFile' is deprecated. Please use attribute 'styleSheetName'
*/
public void setXslFile(String xslFile) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = "configuration using attribute 'xslFile' is deprecated. Please use attribute 'styleSheetName'";
configWarnings.add(log, msg);
setStyleSheetName(xslFile);
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class AbstractRecordHandler method setFieldsDifferConditionForPrefix.
public void setFieldsDifferConditionForPrefix(String fieldNrs) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = ClassUtils.nameOf(this) + "[" + getName() + "]: the attribute 'fieldsDifferConditionForPrefix' has been renamed 'recordIdentifyingFields' since version 4.7";
configWarnings.add(log, msg);
setRecordIdentifyingFields(fieldNrs);
}
Aggregations