You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2012/05/31 12:03:16 UTC
svn commit: r1344635 - in /incubator/syncope/trunk/core/src/main:
java/org/apache/syncope/core/notification/NotificationManager.java
resources/mailTemplates/optin.html.vm resources/mailTemplates/optin.txt.vm
Author: mdisabatino
Date: Thu May 31 10:03:15 2012
New Revision: 1344635
URL: http://svn.apache.org/viewvc?rev=1344635&view=rev
Log:
SYNCOPE-74 SyncopeConf parameters are available in mail templates
Modified:
incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm
incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm
Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java?rev=1344635&r1=1344634&r2=1344635&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java Thu May 31 10:03:15 2012
@@ -27,6 +27,7 @@ import java.util.Set;
import javassist.NotFoundException;
import org.apache.syncope.core.persistence.beans.Notification;
import org.apache.syncope.core.persistence.beans.NotificationTask;
+import org.apache.syncope.core.persistence.beans.SyncopeConf;
import org.apache.syncope.core.persistence.beans.TaskExec;
import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
import org.apache.syncope.core.persistence.beans.user.UAttr;
@@ -167,6 +168,7 @@ public class NotificationManager {
final Map<String, Object> model = new HashMap<String, Object>();
model.put("user", userDataBinder.getUserTO(user));
+ model.put("syncopeConf", this.findAll());
String htmlBody;
String textBody;
@@ -273,4 +275,12 @@ public class NotificationManager {
task.setLatestExecStatus(execution.getStatus());
taskDAO.save(task);
}
+
+ public Map<String, String> findAll() {
+ Map<String, String> syncopeConfMap = new HashMap<String, String>();
+ for (SyncopeConf conf : confDAO.findAll()) {
+ syncopeConfMap.put(conf.getKey(), conf.getValue());
+ }
+ return syncopeConfMap;
+ }
}
Modified: incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm?rev=1344635&r1=1344634&r2=1344635&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm (original)
+++ incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm Thu May 31 10:03:15 2012
@@ -35,5 +35,6 @@ You have been provided with the followin
</ul>
#end
+SMPT HOST is $syncopeConf.get("smtp.host").
</body>
</html>
\ No newline at end of file
Modified: incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm?rev=1344635&r1=1344634&r2=1344635&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm (original)
+++ incubator/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm Thu May 31 10:03:15 2012
@@ -19,4 +19,6 @@ You have been provided with the followin
#foreach($membership in $user.getMemberships())
* $membership.roleName
#end
-#end
\ No newline at end of file
+#end
+
+SMPT HOST is $syncopeConf.get("smtp.host").
\ No newline at end of file