Skip to content

Commit c1c6aba

Browse files
author
gm2552
committed
Updating ability to read properties from app context.
1 parent 9fa2f38 commit c1c6aba

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

src/main/java/org/nhindirect/gateway/smtp/dsn/impl/FailedDeliveryDSNCreator.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,25 @@ public FailedDeliveryDSNCreator(Mailet mailet)
7777
this.dsnStatus = DSNStatus.DELIVERY_OTHER;
7878

7979
generator = new DSNGenerator(GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_FAILED_PREFIX,
80-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_PREFIX));
80+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_PREFIX));
8181

8282
postmasterMailbox = GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_POSTMASTER,
83-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_POSTMASTER);
83+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_POSTMASTER);
8484

8585
reportingMta = GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_MTA_NAME,
86-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_MTA_NAME);
86+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_MTA_NAME);
8787

8888

8989
textGenerator = new DefaultDSNFailureTextBodyPartGenerator(
9090
GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_FAILED_HEADER,
91-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_HEADER),
91+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_HEADER),
9292
GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_FAILED_FOOTER,
93-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_FOOTER),
93+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_FOOTER),
9494
GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_FAILED_RECIP_TITLE,
95-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_FAILED_RECIP_TITLE),
95+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_FAILED_RECIP_TITLE),
9696
FailedDeliveryDSNCreatorOptions.DEFAULT_ERROR_MESSAGE_TITLE,
9797
GatewayConfiguration.getConfigurationParam(FailedDeliveryDSNCreatorOptions.DSN_FAILED_ERROR_MESSAGE,
98-
mailet, FailedDeliveryDSNCreatorOptions.DEFAULT_ERROR_MESSAGE),
98+
mailet, null, FailedDeliveryDSNCreatorOptions.DEFAULT_ERROR_MESSAGE),
9999
HumanReadableTextAssemblerFactory.getInstance());
100100
}
101101
}

src/main/java/org/nhindirect/gateway/smtp/dsn/impl/RejectedRecipientDSNCreator.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,25 @@ public RejectedRecipientDSNCreator(Mailet mailet)
8181
this.dsnStatus = DSNStatus.UNDEFINED_STATUS;
8282

8383
generator = new DSNGenerator(GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_FAILED_PREFIX,
84-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_PREFIX));
84+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_PREFIX));
8585

8686
postmasterMailbox = GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_POSTMASTER,
87-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_POSTMASTER);
87+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_POSTMASTER);
8888

8989
reportingMta = GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_MTA_NAME,
90-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_MTA_NAME);
90+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_MTA_NAME);
9191

9292

9393
textGenerator = new DefaultDSNFailureTextBodyPartGenerator(
9494
GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_FAILED_HEADER,
95-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_HEADER),
95+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_HEADER),
9696
GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_FAILED_FOOTER,
97-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_FOOTER),
97+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_FOOTER),
9898
GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_FAILED_RECIP_TITLE,
99-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_FAILED_RECIP_TITLE),
99+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_FAILED_RECIP_TITLE),
100100
RejectedRecipientDSNCreatorOptions.DEFAULT_ERROR_MESSAGE_TITLE,
101101
GatewayConfiguration.getConfigurationParam(RejectedRecipientDSNCreatorOptions.DSN_FAILED_ERROR_MESSAGE,
102-
mailet, RejectedRecipientDSNCreatorOptions.DEFAULT_ERROR_MESSAGE),
102+
mailet, null, RejectedRecipientDSNCreatorOptions.DEFAULT_ERROR_MESSAGE),
103103
HumanReadableTextAssemblerFactory.getInstance());
104104
}
105105

src/main/java/org/nhindirect/gateway/smtp/james/mailet/NHINDSecurityAndTrustMailet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void init() throws MessagingException
113113
try
114114
{
115115
final boolean useOutboundPolicy = Boolean.parseBoolean(
116-
GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.USE_OUTGOING_POLICY_FOR_INCOMING_NOTIFICATIONS, this, "false"));
116+
GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.USE_OUTGOING_POLICY_FOR_INCOMING_NOTIFICATIONS, this, ctx, "false"));
117117

118118
// we don't know if this parameter came from the mailet config or the options manager, so just go ahead and set it at
119119
// the options manager level because that it where the agent reads the value... no danger that we will overwrite the value that we want...
@@ -132,7 +132,7 @@ public void init() throws MessagingException
132132
try
133133
{
134134
final boolean rejectOnTamperPolicy = Boolean.parseBoolean(
135-
GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.REJECT_ON_ROUTING_TAMPER, this, "false"));
135+
GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.REJECT_ON_ROUTING_TAMPER, this, ctx, "false"));
136136

137137
OptionsManager.getInstance().setOptionsParameter(
138138
new OptionsParameter(OptionsParameter.REJECT_ON_ROUTING_TAMPER, Boolean.toString(rejectOnTamperPolicy)));
@@ -143,12 +143,12 @@ public void init() throws MessagingException
143143
}
144144

145145
// set the JCE providers if available
146-
final String JCEName = GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.JCE_PROVIDER_NAME, this, "");
146+
final String JCEName = GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.JCE_PROVIDER_NAME, this, ctx, "");
147147
if (!StringUtils.isEmpty(JCEName))
148148
OptionsManager.getInstance().setOptionsParameter(
149149
new OptionsParameter(OptionsParameter.JCE_PROVIDER, JCEName));
150150

151-
final String sensitiveJCEName = GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.JCE_SENTITIVE_PROVIDER, this, "");
151+
final String sensitiveJCEName = GatewayConfiguration.getConfigurationParam(SecurityAndTrustMailetOptions.JCE_SENTITIVE_PROVIDER, this, ctx, "");
152152
if (!StringUtils.isEmpty(sensitiveJCEName))
153153
OptionsManager.getInstance().setOptionsParameter(
154154
new OptionsParameter(OptionsParameter.JCE_SENTITIVE_PROVIDER, sensitiveJCEName));

src/main/java/org/nhindirect/gateway/smtp/james/mailet/NotificationSuppressor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void init() throws MessagingException
8585
// get the consume processed MDN message setting
8686
// default is false
8787
consumeMDNProcessed = GatewayConfiguration.getConfigurationParamAsBoolean(SecurityAndTrustMailetOptions.CONSUME_MND_PROCESSED_PARAM,
88-
this, false);
88+
this, ctx, false);
8989

9090

9191
LOGGER.info("NotificationSupressor initialization complete.");

src/main/java/org/nhindirect/gateway/smtp/james/mailet/TimelyAndReliableLocalDelivery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void init() throws MessagingException
118118
try
119119
{
120120
final String sDispatchedDelay = GatewayConfiguration.getConfigurationParam(DISPATCHED_MDN_DELAY,
121-
this, "0");
121+
this, ctx, "0");
122122

123123
try
124124
{

0 commit comments

Comments
 (0)