svn commit: r1430794 - in /syncope/trunk/core/src: main/java/org/apache/syncope/core/init/ main/java/org/apache/syncope/core/rest/controller/ test/java/org/apache/syncope/core/rest/

2013-01-09 Thread ilgrosso
Author: ilgrosso
Date: Wed Jan  9 11:29:37 2013
New Revision: 1430794

URL: http://svn.apache.org/viewvc?rev=1430794view=rev
Log:
[SYNCOPE-259] Fixing minor issues on WorkflowTestITCase

Modified:

syncope/trunk/core/src/main/java/org/apache/syncope/core/init/SpringContextInitializer.java

syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java

syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java

syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java

Modified: 
syncope/trunk/core/src/main/java/org/apache/syncope/core/init/SpringContextInitializer.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/SpringContextInitializer.java?rev=1430794r1=1430793r2=1430794view=diff
==
--- 
syncope/trunk/core/src/main/java/org/apache/syncope/core/init/SpringContextInitializer.java
 (original)
+++ 
syncope/trunk/core/src/main/java/org/apache/syncope/core/init/SpringContextInitializer.java
 Wed Jan  9 11:29:37 2013
@@ -52,9 +52,11 @@ public class SpringContextInitializer im
 
 private static String uwfAdapterClassName;
 
+private static String rwfAdapterClassName;
+
 static {
 try {
-initUWFAdapterClassName();
+initWFAdapterClassNames();
 } catch (IOException e) {
 LOG.error(Could not init uwfAdapterClassName, e);
 }
@@ -65,13 +67,14 @@ public class SpringContextInitializer im
  *
  * @throws IOException if anything goes wrong
  */
-private static void initUWFAdapterClassName() throws IOException {
+private static void initWFAdapterClassNames() throws IOException {
 Properties props = new java.util.Properties();
 InputStream propStream = null;
 try {
 propStream = 
ContentLoader.class.getResourceAsStream(/workflow.properties);
 props.load(propStream);
 uwfAdapterClassName = props.getProperty(uwfAdapter);
+rwfAdapterClassName = props.getProperty(rwfAdapter);
 } catch (Exception e) {
 LOG.error(Could not load workflow.properties, e);
 } finally {
@@ -84,12 +87,23 @@ public class SpringContextInitializer im
 /**
  * Check if the configured user workflow adapter is Activiti's.
  *
- * @return whether Activiti is configured for workflow or not
+ * @return whether Activiti is configured for user workflow or not
  */
 public static boolean isActivitiEnabledForUsers() {
 return uwfAdapterClassName != null  
uwfAdapterClassName.equals(ActivitiUserWorkflowAdapter.class.getName());
 }
 
+/**
+ * Check if the configured role workflow adapter is Activiti's.
+ *
+ * @return whether Activiti is configured for role workflow or not
+ */
+public static boolean isActivitiEnabledForRoles() {
+// ActivitiRoleWorkflowAdapter hasn't been developed (yet) as part of 
SYNCOPE-173 
+//return rwfAdapterClassName != null  
rwfAdapterClassName.equals(ActivitiRoleWorkflowAdapter.class.getName());
+return false;
+}
+
 @Autowired
 private ConnectorFactory connInstanceLoader;
 

Modified: 
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java?rev=1430794r1=1430793r2=1430794view=diff
==
--- 
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
 (original)
+++ 
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
 Wed Jan  9 11:29:37 2013
@@ -50,6 +50,7 @@ public class WorkflowController extends 
 
 @Autowired
 private RoleWorkflowAdapter rwfAdapter;
+
 private WorkflowDefinitionTO getDefinition(final WorkflowAdapter adapter) 
throws WorkflowException {
 WorkflowDefinitionTO result = adapter.getDefinition();
 
@@ -86,6 +87,7 @@ public class WorkflowController extends 
 @RequestMapping(method = RequestMethod.PUT, value = /definition/user)
 public void updateUserDefinition(@RequestBody final WorkflowDefinitionTO 
definition)
 throws NotFoundException, WorkflowException {
+
 updateDefinition(uwfAdapter, definition);
 }
 

Modified: 
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1430794r1=1430793r2=1430794view=diff
==
--- 
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
 (original)
+++ 

[CONF] Apache Syncope Manage notification e-mail templates

2013-01-09 Thread confluence







Manage notification e-mail templates
Page edited by Francesco Chicchiricco


 Changes (8)
 




...
 Besides standard expressions, you can use the following Syncope-specific variables: 
* {{user}} 
  [UserTO|http://syncope.apache.org/apidocs/org/apache/syncope/client/to/UserTO.html] instance representing the subject of the current notification 
* {{syncopeConf}} 
  {{MapString, String}} containing all defined configurations as {{key, value}} 
* {{recipients}} 
  list of [UserTO|http://syncope.apache.org/apidocs/org/apache/syncope/client/to/UserTO.html] instances for all the actual recipients of the current notification e-mail 
* {{events}} 
  list of {{String}} containing all the events that triggered the current notification 


Full Content



Introduction
Template files
Template location
Template format


Introduction

You can create new (and modify existing) template messages to customize the body of notification messages. This can be achieved by creating and / or modifying the notification e-mail template files.

Template files

Templates are defined by their name. 

Each template is made up of a couple of files:

	the rich-text HTML variant (with extension .html.vm)
	the plain text variant (with extension .txt.vm)



For example, the default optin template is defined by:

	optin.html.vm
	optin.txt.vm



Template location

Assuming you have generated and built your own project, existing templates (including the default optin template) are located under 

core/target/syncope/WEB-INF/classes/mailTemplates/


You need to create your own template files (or copy existing to modify) under 

core/src/main/resources/mailTemplates/


Template format

Template files are interpreted using the Velocity engine; check the language reference.

Besides standard expressions, you can use the following Syncope-specific variables:

	user
  UserTO instance representing the subject of the current notification
	syncopeConf
  MapString, String containing all defined configurations as key, value
	recipients
  list of UserTO instances for all the actual recipients of the current notification e-mail
	events
  list of String containing all the events that triggered the current notification





Change Notification Preferences

View Online
|
View Changes
|
Add Comment









svn commit: r1430834 - in /syncope/trunk: ./ src/site/xdoc/ src/site/xdoc/features.xml

2013-01-09 Thread ilgrosso
Author: ilgrosso
Date: Wed Jan  9 13:07:15 2013
New Revision: 1430834

URL: http://svn.apache.org/viewvc?rev=1430834view=rev
Log:
Merge from 1_0_X

Modified:
syncope/trunk/   (props changed)
syncope/trunk/src/site/xdoc/   (props changed)
syncope/trunk/src/site/xdoc/features.xml

Propchange: syncope/trunk/
--
  Merged /syncope/branches/1_0_X:r1430777-1430833

Propchange: syncope/trunk/src/site/xdoc/
--
--- svn:ignore (added)
+++ svn:ignore Wed Jan  9 13:07:15 2013
@@ -0,0 +1 @@
+.features.xml.swp

Modified: syncope/trunk/src/site/xdoc/features.xml
URL: 
http://svn.apache.org/viewvc/syncope/trunk/src/site/xdoc/features.xml?rev=1430834r1=1430833r2=1430834view=diff
==
--- syncope/trunk/src/site/xdoc/features.xml (original)
+++ syncope/trunk/src/site/xdoc/features.xml Wed Jan  9 13:07:15 2013
@@ -69,7 +69,7 @@ under the License.
 section name=System Administration
   ul
 liRESTFul interface/li
-liWeb-based AJAX administration console/li
+liWeb-based multilingual AJAX administration console/li
 liRole-based administration/li
 liAttribute schema, Derived attribute schema and Virtual Attribute 
schema management/li
 liRole tree management/li