use of org.nhindirect.gateway.smtp.ProcessBadMessageSettings in project nhin-d by DirectProject.
the class RESTSmtpAgentConfig method buildMessageSettings.
protected void buildMessageSettings(String type) {
Setting folderSettings;
try {
folderSettings = settingsService.getSetting("MessageSaveFolder");
} catch (Exception e) {
throw new SmtpAgentException(SmtpAgentError.InvalidConfigurationFormat, "WebService error getting " + type + " message settings: " + e.getMessage(), e);
}
String saveFolder = (folderSettings == null) ? null : folderSettings.getValue();
MessageProcessingSettings settings = null;
if (type.equalsIgnoreCase(MESSAGE_SETTING_RAW))
settings = rawSettings = new RawMessageSettings();
else if (type.equalsIgnoreCase(MESSAGE_SETTING_INCOMING))
settings = incomingSettings = new ProcessIncomingSettings();
else if (type.equalsIgnoreCase(MESSAGE_SETTING_OUTGOING))
settings = outgoingSettings = new ProcessOutgoingSettings();
else if (type.equalsIgnoreCase(MESSAGE_SETTING_BAD))
settings = badSettings = new ProcessBadMessageSettings();
if (saveFolder != null && settings != null)
settings.setSaveMessageFolder(new File(saveFolder));
}
use of org.nhindirect.gateway.smtp.ProcessBadMessageSettings in project nhin-d by DirectProject.
the class XMLSmtpAgentConfig method buildBadMessageSettings.
private void buildBadMessageSettings(Node badMsgNode) {
if (badMsgNode.getNodeType() == Node.ELEMENT_NODE) {
Element badMsg = (Element) badMsgNode;
String saveFolder = badMsg.getAttribute("saveFolder");
ProcessBadMessageSettings settings = new ProcessBadMessageSettings();
if (saveFolder != null)
settings.setSaveMessageFolder(new File(saveFolder));
badSettings = settings;
}
}
use of org.nhindirect.gateway.smtp.ProcessBadMessageSettings in project nhin-d by DirectProject.
the class WSSmtpAgentConfig method buildMessageSettings.
protected void buildMessageSettings(String type) {
Setting folderSettings;
try {
folderSettings = cfService.getSettingByName(type + "MessageSaveFolder");
} catch (Exception e) {
throw new SmtpAgentException(SmtpAgentError.InvalidConfigurationFormat, "WebService error getting " + type + " message settings: " + e.getMessage(), e);
}
String saveFolder = (folderSettings == null) ? null : folderSettings.getValue();
MessageProcessingSettings settings = null;
if (type.equalsIgnoreCase(MESSAGE_SETTING_RAW))
settings = rawSettings = new RawMessageSettings();
else if (type.equalsIgnoreCase(MESSAGE_SETTING_INCOMING))
settings = incomingSettings = new ProcessIncomingSettings();
else if (type.equalsIgnoreCase(MESSAGE_SETTING_OUTGOING))
settings = outgoingSettings = new ProcessOutgoingSettings();
else if (type.equalsIgnoreCase(MESSAGE_SETTING_BAD))
settings = badSettings = new ProcessBadMessageSettings();
if (saveFolder != null && settings != null)
settings.setSaveMessageFolder(new File(saveFolder));
}
Aggregations