You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/01/14 17:38:19 UTC

[3/5] syncope git commit: [SYNCOPE-620] FIT module is in, now time for importing integration tests

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/staticReportlet2csv.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/staticReportlet2csv.xsl b/syncope620/server/logic/src/main/resources/report/staticReportlet2csv.xsl
new file mode 100644
index 0000000..90879d9
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/staticReportlet2csv.xsl
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:variable name="delimiter" select="';'"/>
+   
+  <xsl:template match="reportlet[@class='org.apache.syncope.core.report.StaticReportlet']">
+    <xsl:call-template name="header">
+      <xsl:with-param name="node" select="configurations/staticAttributes"/>
+    </xsl:call-template>
+    
+    <xsl:call-template name="staticAttributes">
+      <xsl:with-param name="header" select="configurations/staticAttributes"/>
+    </xsl:call-template>
+  </xsl:template>
+  
+  <xsl:template name="header">
+    <xsl:param name="node"/>  
+    <xsl:for-each select="$node/*">
+      <xsl:text>"</xsl:text>
+      <xsl:value-of select="text()"/>
+      <xsl:text>"</xsl:text> 
+      <xsl:if test="position() != last()">
+        <xsl:value-of select="$delimiter"/>
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:template>
+    
+  <xsl:template name="staticAttributes">
+    <xsl:param name="header"/>
+    
+    <xsl:variable name="attrs" select="."/>
+    <xsl:for-each select="$header/*">
+      <xsl:variable name="nameAttr" select="text()"/> 
+      <xsl:if test="string-length($attrs/*[name(.)=$nameAttr]/text()) &gt; 0 
+                      and count($attrs/*[name(.)=$nameAttr]/*/node()) = 0">
+        <xsl:variable name="value" select="$attrs/*[name(.)=$nameAttr]/text()"/>
+        <xsl:text>"</xsl:text>
+        <xsl:value-of select="$value"/>
+        <xsl:text>"</xsl:text>
+      </xsl:if>
+      
+      <xsl:if test="string-length($attrs/*[name(.)=$nameAttr]/*/text()) &gt; 0 
+                      and count($attrs/*[name(.)=$nameAttr]/*/node()) &gt; 0">
+        <xsl:text>"</xsl:text>
+        <xsl:for-each select="$attrs/*[name(.)=$nameAttr]/*">
+          <xsl:variable name="value" select="text()"/>
+          <xsl:text></xsl:text>
+          <xsl:value-of select="$value"/>
+          <xsl:if test="position() != last()">
+            <xsl:value-of select="$delimiter"/>
+          </xsl:if>
+        </xsl:for-each>
+        <xsl:text>"</xsl:text>
+      </xsl:if>
+      
+      <xsl:if test="position() != last()">
+        <xsl:value-of select="$delimiter"/>
+      </xsl:if>
+    
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/staticReportlet2fo.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/staticReportlet2fo.xsl b/syncope620/server/logic/src/main/resources/report/staticReportlet2fo.xsl
new file mode 100644
index 0000000..c123d51
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/staticReportlet2fo.xsl
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  <xsl:template match="reportlet[@class='org.apache.syncope.core.report.StaticReportlet']">
+
+    <fo:block font-size="14pt" font-weight="bold" space-after="0.5cm">Reportlet: 
+      <xsl:value-of select="@name"/>
+    </fo:block>
+
+    <xsl:if test="string-length(string/text()) &gt; 0">
+      <fo:block font-size="11pt">String value: 
+        <xsl:value-of select="string/text()"/>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:if test="string-length(long/text()) &gt; 0">
+      <fo:block font-size="11pt">Long value: 
+        <xsl:value-of select="long/text()"/>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:if test="string-length(double/text()) &gt; 0">
+      <fo:block font-size="11pt">Double value: 
+        <xsl:value-of select="double/text()"/>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:if test="string-length(date/text()) &gt; 0">
+      <fo:block font-size="11pt">Date value: 
+        <xsl:value-of select="date/text()"/>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:if test="string-length(enum/text()) &gt; 0">
+      <fo:block font-size="11pt">Enum value: 
+        <xsl:value-of select="enum/text()"/>
+      </fo:block>
+    </xsl:if>
+
+    <xsl:if test="string-length(list) &gt; 0">
+      <fo:block font-size="11pt">List values:</fo:block>
+            
+      <fo:list-block provisional-label-separation="4mm" provisional-distance-between-starts="2mm">
+        <xsl:for-each select="list/string">
+          <xsl:if test="string-length(string/text()) &gt; 0">
+            <fo:list-item>
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>&#x2022;</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  <xsl:value-of select="text()"/>
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </xsl:if>
+        </xsl:for-each>
+      </fo:list-block>
+    </xsl:if>
+        
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/staticReportlet2html.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/staticReportlet2html.xsl b/syncope620/server/logic/src/main/resources/report/staticReportlet2html.xsl
new file mode 100644
index 0000000..da0ba85
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/staticReportlet2html.xsl
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:template match="reportlet[@class='org.apache.syncope.core.report.StaticReportlet']">
+    <h2>Reportlet: 
+      <xsl:value-of select="@name"/>
+    </h2>
+        
+    <xsl:if test="string-length(string/text()) &gt; 0">
+      <p>String value:                 
+        <xsl:value-of select="string/text()"/>
+      </p>
+    </xsl:if>
+
+    <xsl:if test="string-length(long/text()) &gt; 0">
+      <p>Long value: 
+        <xsl:value-of select="long/text()"/>
+      </p>
+    </xsl:if>
+
+    <xsl:if test="string-length(double/text()) &gt; 0">
+      <p>Double value: 
+        <xsl:value-of select="double/text()"/>
+      </p>
+    </xsl:if>
+
+    <xsl:if test="string-length(date/text()) &gt; 0">
+      <p>Date value: 
+        <xsl:value-of select="date/text()"/>
+      </p>
+    </xsl:if>
+
+    <xsl:if test="string-length(enum/text()) &gt; 0">
+      <p>Enum value: 
+        <xsl:value-of select="enum/text()"/>
+      </p>
+    </xsl:if>
+
+    <xsl:if test="string-length(list) &gt; 0">
+      <p>List values:</p>
+            
+      <ul>
+        <xsl:for-each select="list/string">
+          <xsl:if test="string-length(string/text()) &gt; 0">
+            <li>
+              <xsl:value-of select="text()"/>
+            </li>
+          </xsl:if>
+        </xsl:for-each>
+      </ul>
+    </xsl:if>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/userReportlet2csv.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/userReportlet2csv.xsl b/syncope620/server/logic/src/main/resources/report/userReportlet2csv.xsl
new file mode 100644
index 0000000..87c670f
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/userReportlet2csv.xsl
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:variable name="delimiter" select="';'"/>
+  
+  <xsl:template match="reportlet[@class='org.apache.syncope.core.report.UserReportlet']">
+    
+    <xsl:call-template name="header">
+      <xsl:with-param name="node" select="configurations/userAttributes"/>
+    </xsl:call-template>
+    <xsl:for-each select="user">
+      <xsl:call-template name="userAttributes">
+        <xsl:with-param name="header" select="../configurations/userAttributes"/>
+      </xsl:call-template>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:for-each>
+  </xsl:template>
+  
+  <xsl:template name="header">
+    <xsl:param name="node"/>  
+    <xsl:for-each select="$node/*">
+      <xsl:text>"</xsl:text>
+      <xsl:value-of select="text()"/>   
+      <xsl:text>"</xsl:text>
+      <xsl:if test="position() != last()">
+        <xsl:value-of select="$delimiter"/>
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:template>
+    
+  <xsl:template name="userAttributes">
+    <xsl:param name="header"/>
+  
+    <xsl:variable name="attrs" select="."/>
+    <xsl:for-each select="$header/*">
+      <xsl:variable name="nameAttr" select="text()"/>
+      <xsl:choose>      
+        <xsl:when test="count($attrs/@*[name()=$nameAttr]) &gt; 0">
+          <xsl:variable name="userAttr" select="$attrs/@*[name()=$nameAttr]"/>
+          <xsl:text>"</xsl:text>
+          <xsl:value-of select="$userAttr/."/>
+          <xsl:text>"</xsl:text>
+        </xsl:when>
+        <xsl:when test="string-length($attrs/*/*[@name=$nameAttr]/value/text()) &gt; 0 
+                        and count($attrs/*/*[@name=$nameAttr]/node()) = 0">
+          <xsl:variable name="value" select="$attrs/*/*[@name=$nameAttr]/value/text()"/>
+          <xsl:text>"</xsl:text>
+          <xsl:value-of select="$value"/>
+          <xsl:text>"</xsl:text>
+        </xsl:when>
+        <xsl:when test="string-length($attrs/*/*[@name=$nameAttr]/value/text()) &gt; 0 
+                        and count($attrs/*/*[@name=$nameAttr]/node()) &gt; 0">
+          <xsl:text>"</xsl:text>
+          <xsl:for-each select="$attrs/*/*[@name=$nameAttr]/*">
+            <xsl:variable name="value" select="$attrs/*/*[@name=$nameAttr]/value/text()"/>
+            <xsl:value-of select="$value"/>
+            <xsl:if test="position() != last()">
+              <xsl:value-of select="$delimiter"/>
+            </xsl:if>
+          </xsl:for-each>
+          <xsl:text>"</xsl:text>
+        </xsl:when>
+        <xsl:when test="name($attrs/*[name(.)=$nameAttr]/*[name(.)='membership']) 
+                        and count($attrs/*[name(.)=$nameAttr]/node()) &gt; 0">
+          <xsl:text>"</xsl:text>       
+          <xsl:variable name="value" select="@roleName"/>
+          <xsl:for-each select="$attrs/*/membership">
+            <xsl:variable name="value" select="@roleName"/>
+            <xsl:value-of select="$value"/>
+            <xsl:if test="position() != last()">
+              <xsl:value-of select="$delimiter"/>
+            </xsl:if>
+          </xsl:for-each>
+          <xsl:text>"</xsl:text>
+        </xsl:when>
+        <xsl:when test="name($attrs/*[name(.)=$nameAttr]/*[name(.)='resource']) 
+                        and count($attrs/*[name(.)=$nameAttr]/node()) &gt; 0">
+          <xsl:text>"</xsl:text>
+          <xsl:variable name="value" select="@name"/>
+          <xsl:for-each select="$attrs/*/resource">
+            <xsl:variable name="value" select="@name"/>
+            <xsl:value-of select="$value"/>
+            <xsl:if test="position() != last()">
+              <xsl:value-of select="$delimiter"/>
+            </xsl:if>
+          </xsl:for-each>
+          <xsl:text>"</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>""</xsl:text> 
+        </xsl:otherwise>  
+      </xsl:choose>
+      <xsl:if test="position() != last()">
+        <xsl:value-of select="$delimiter"/>
+      </xsl:if>  
+    </xsl:for-each>
+  </xsl:template>
+  
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/userReportlet2fo.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/userReportlet2fo.xsl b/syncope620/server/logic/src/main/resources/report/userReportlet2fo.xsl
new file mode 100644
index 0000000..977ef4c
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/userReportlet2fo.xsl
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  <xsl:template match="reportlet[@class='org.apache.syncope.core.report.UserReportlet']">
+   
+    <fo:block font-size="16pt" font-weight="bold" space-after="0.5cm" space-before="5mm">Reportlet: <xsl:value-of select="@name"/></fo:block>
+        
+    <xsl:for-each select="user">
+      <fo:block font-size="14pt" font-weight="bold" space-before="15mm" space-after="5mm" background-color="(#8888ff)">User <xsl:value-of select="@username"/></fo:block>
+      <fo:table table-layout="fixed" space-after="7mm">
+        <fo:table-column/>
+        <fo:table-column/>
+        <fo:table-body>
+          <fo:table-row background-color="(#ccccff)">
+            <fo:table-cell>
+              <fo:block>Status:</fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block font-style="italic">
+                <xsl:value-of select="@status"/>
+              </fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+          <xsl:if test="string-length(@creationDate) &gt; 0">
+            <fo:table-row background-color="(#ccccff)">
+              <fo:table-cell>
+                <fo:block>Creation Date:</fo:block>
+              </fo:table-cell>
+              <fo:table-cell>
+                <fo:block font-style="italic">
+                  <xsl:value-of select="@creationDate"/>
+                </fo:block>
+              </fo:table-cell>
+            </fo:table-row>
+          </xsl:if>
+          <xsl:if test="string-length(@lastLoginDate) &gt; 0">
+            <fo:table-row background-color="(#ccccff)">
+              <fo:table-cell>
+                <fo:block>Last Login Date:</fo:block>
+              </fo:table-cell>
+              <fo:table-cell>
+                <fo:block font-style="italic">
+                  <xsl:value-of select="@lastLoginDate"/>
+                </fo:block>
+              </fo:table-cell>
+            </fo:table-row>
+          </xsl:if>
+          <xsl:if test="string-length(@changePwdDate) &gt; 0">
+            <fo:table-row background-color="(#ccccff)">
+              <fo:table-cell>
+                <fo:block>Change Password Date:</fo:block>
+              </fo:table-cell>
+              <fo:table-cell>
+                <fo:block font-style="italic">
+                  <xsl:value-of select="@changePwdDate"/>
+                </fo:block>
+              </fo:table-cell>
+            </fo:table-row>
+          </xsl:if>
+          <xsl:if test="string-length(@passwordHistorySize) &gt; 0">
+            <fo:table-row background-color="(#ccccff)">
+              <fo:table-cell>
+                <fo:block>Password History Size:</fo:block>
+              </fo:table-cell>
+              <fo:table-cell>
+                <fo:block font-style="italic">
+                  <xsl:value-of select="@passwordHistorySize"/>
+                </fo:block>
+              </fo:table-cell>
+            </fo:table-row>
+          </xsl:if>
+          <xsl:if test="string-length(@failedLoginCount) &gt; 0">
+            <fo:table-row background-color="(#ccccff)">
+              <fo:table-cell>
+                <fo:block>Number of Failed Login Attempts:</fo:block>
+              </fo:table-cell>
+              <fo:table-cell>
+                <fo:block font-style="italic">
+                  <xsl:value-of select="@failedLoginCount"/>
+                </fo:block>
+              </fo:table-cell>
+            </fo:table-row>
+          </xsl:if>
+        </fo:table-body>
+      </fo:table>
+      <xsl:call-template name="attributes">
+        <xsl:with-param name="label">Attributes</xsl:with-param>
+        <xsl:with-param name="node" select="attributes/attribute"/>
+      </xsl:call-template>
+      <xsl:choose>
+        <xsl:when test="string-length(derivedAttributes/derivedAttribute) &gt; 0">
+          <xsl:call-template name="attributes">
+            <xsl:with-param name="label">Derived Attributes</xsl:with-param>
+            <xsl:with-param name="node" select="derivedAttributes/derivedAttribute"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block color="red" font-size="9pt" space-after="3mm">THIS USER HASN'T ANY DERIVED ATTRIBUTE</fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="string-length(virtualAttributes/virtualAttribute) &gt; 0">
+          <xsl:call-template name="attributes">
+            <xsl:with-param name="label">Virtual Attributes</xsl:with-param>
+            <xsl:with-param name="node" select="virtualAttributes/virtualAttribute"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block color="red" font-size="9pt" space-after="3mm">THIS USER HASN'T ANY VIRTUAL ATTRIBUTE</fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="string-length(memberships/membership) &gt; 0">
+          <fo:block font-size="11pt" font-weight="bold">Memberships</fo:block>
+          <xsl:for-each select="memberships/membership">
+            <fo:block font-size="10pt" font-weight="bold" space-before="2mm">Role: <xsl:value-of select="@roleName"/>(<xsl:value-of select="@roleId"/>)</fo:block>
+            <fo:block start-indent="1cm" space-before="3mm" space-after="0.5cm">
+              <xsl:choose>
+                <xsl:when test="string-length(attributes/attribute) &gt; 0">
+                  <xsl:call-template name="attributes">
+                    <xsl:with-param name="label">Attributes</xsl:with-param>
+                    <xsl:with-param name="node" select="attributes/attribute"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <fo:block color="red" font-size="8pt" space-after="2mm">THIS ROLE HASN'T ANY ATTRIBUTE</fo:block>
+                </xsl:otherwise>
+              </xsl:choose>
+              <xsl:choose>
+                <xsl:when test="string-length(derivedAttributes/derivedAttribute) &gt; 0">
+                  <xsl:call-template name="attributes">
+                    <xsl:with-param name="label">Derived Attributes</xsl:with-param>
+                    <xsl:with-param name="node" select="derivedAttributes/derivedAttribute"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <fo:block color="red" font-size="8pt" space-after="2mm">THIS ROLE HASN'T ANY DERIVED ATTRIBUTE</fo:block>
+                </xsl:otherwise>
+              </xsl:choose>
+              <xsl:choose>
+                <xsl:when test="string-length(virtualAttributes/virtualAttribute) &gt; 0">
+                  <xsl:call-template name="attributes">
+                    <xsl:with-param name="label">Virtual Attributes</xsl:with-param>
+                    <xsl:with-param name="node" select="virtualAttributes/virtualAttribute"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <fo:block color="red" font-size="8pt" space-after="2mm">THIS ROLE HASN'T ANY VIRTUAL ATTRIBUTE</fo:block>
+                </xsl:otherwise>
+              </xsl:choose>
+              <!-- 'roleResources" is defined in roleReportlet2fo.xsl -->
+              <xsl:call-template name="roleResources">
+                <xsl:with-param name="node" select="resources/resource"/>
+              </xsl:call-template>
+            </fo:block>
+          </xsl:for-each>
+        </xsl:when>
+        <xsl:otherwise>
+          <fo:block color="red" font-size="9pt" space-after="3mm">THIS USER HASN'T BEEN ASSIGNED TO ANY ROLE</fo:block>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:call-template name="resources">
+        <xsl:with-param name="node" select="resources/resource"/>
+      </xsl:call-template>
+    </xsl:for-each>
+  </xsl:template>
+  <xsl:template name="attributes">
+    <xsl:param name="label"/>
+    <xsl:param name="node"/>
+    <fo:block font-size="11pt" font-weight="bold" space-after="2mm">
+      <xsl:value-of select="$label"/>
+    </fo:block>
+    <fo:table table-layout="fixed" space-after="7mm">
+      <fo:table-column/>
+      <fo:table-column/>
+      <fo:table-header>
+        <fo:table-row height="7mm" background-color="(#ccccba)">
+          <fo:table-cell>
+            <fo:block font-weight="bold">Schema name</fo:block>
+          </fo:table-cell>
+          <fo:table-cell>
+            <fo:block font-weight="bold">Value(s)</fo:block>
+          </fo:table-cell>
+        </fo:table-row>
+      </fo:table-header>
+      <fo:table-body>
+        <xsl:for-each select="$node">
+          <xsl:if test="string-length(value/text()) &gt; 0">
+            <fo:table-row height="4mm" background-color="(#ccccff)">
+              <fo:table-cell>
+                <fo:block>
+                  <xsl:value-of select="@name"/>
+                </fo:block>
+              </fo:table-cell>
+              <fo:table-cell>
+                <xsl:for-each select="value">
+                  <fo:block></fo:block><!--                        <fo:block>&#x2022;</fo:block>-->
+                  <fo:block font-style="italic">
+                    <xsl:value-of select="text()"/>
+                  </fo:block>
+                </xsl:for-each>
+              </fo:table-cell>
+            </fo:table-row>
+          </xsl:if>
+          <fo:table-row>
+            <fo:table-cell>
+              <fo:block></fo:block>
+            </fo:table-cell>
+            <fo:table-cell>
+              <fo:block></fo:block>
+            </fo:table-cell>
+          </fo:table-row>
+        </xsl:for-each>
+      </fo:table-body>
+    </fo:table>
+  </xsl:template>
+  <xsl:template name="resources">
+    <xsl:param name="node"/>
+    <fo:block font-size="11pt" font-weight="bold" space-after="3mm">Resources</fo:block>
+    <xsl:for-each select="$node">
+      <fo:block></fo:block> <!--            <fo:block>&#x2022;</fo:block>-->
+      <fo:block background-color="(#ccccff)">
+        <xsl:value-of select="@name"/>
+      </fo:block>
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/userReportlet2html.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/userReportlet2html.xsl b/syncope620/server/logic/src/main/resources/report/userReportlet2html.xsl
new file mode 100644
index 0000000..751cb4c
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/userReportlet2html.xsl
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:template match="reportlet[@class='org.apache.syncope.core.report.UserReportlet']">
+    
+    <h3>Reportlet: <xsl:value-of select="@name"/></h3>
+    
+    <xsl:for-each select="user">
+      <h4>User <xsl:value-of select="@username"/></h4>
+      
+      <table style="border: 1px solid black;">
+        <tr>
+          <td>Status:</td>
+          <td>
+            <xsl:value-of select="@status"/>
+          </td>
+        </tr>
+        <xsl:if test="string-length(@creationDate) &gt; 0">
+          <tr>
+            <td>Creation Date:</td>
+            <td>
+              <xsl:value-of select="@creationDate"/>
+            </td>
+          </tr>
+        </xsl:if>
+        <xsl:if test="string-length(@lastLoginDate) &gt; 0">
+          <tr>
+            <td>Last Login Date:</td>
+            <td>
+              <xsl:value-of select="@lastLoginDate"/>
+            </td>
+          </tr>
+        </xsl:if>
+        <xsl:if test="string-length(@changePwdDate) &gt; 0">
+          <tr>
+            <td>Change Password Date:</td>
+            <td>
+              <xsl:value-of select="@changePwdDate"/>
+            </td>
+          </tr>
+        </xsl:if>
+        <xsl:if test="string-length(@passwordHistorySize) &gt; 0">
+          <tr>
+            <td>Password History Size:</td>
+            <td>
+              <xsl:value-of select="@passwordHistorySize"/>
+            </td>
+          </tr>
+        </xsl:if>
+        <xsl:if test="string-length(@failedLoginCount) &gt; 0">
+          <tr>
+            <td>Number of Failed Login Attempts:</td>
+            <td>
+              <xsl:value-of select="@failedLoginCount"/>
+            </td>
+          </tr>
+        </xsl:if>
+      </table>
+
+      <xsl:call-template name="attributes">
+        <xsl:with-param name="label">Attributes</xsl:with-param>
+        <xsl:with-param name="node" select="attributes/attribute"/>
+      </xsl:call-template>
+
+      <!--<xsl:if test="string-length(derivedAttributes/derivedAttribute) &gt; 0">-->
+      <xsl:choose>
+        <xsl:when test="string-length(derivedAttributes/derivedAttribute) &gt; 0">
+          <xsl:call-template name="attributes">
+            <xsl:with-param name="label">Derived Attributes</xsl:with-param>
+            <xsl:with-param name="node" select="derivedAttributes/derivedAttribute"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <h5>THIS USER HASN'T DERIVED ATTRIBUTES</h5>
+        </xsl:otherwise>
+      </xsl:choose>
+      <!--</xsl:if>-->
+      <xsl:choose>
+        <xsl:when test="string-length(virtualAttributes/virtualAttribute) &gt; 0">
+          <xsl:call-template name="attributes">
+            <xsl:with-param name="label">Virtual Attributes</xsl:with-param>
+            <xsl:with-param name="node" select="virtualAttributes/virtualAttribute"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <h5>THIS USER HASN'T VIRTUAL ATTRIBUTES</h5>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:choose>
+        <xsl:when test="string-length(memberships/membership) &gt; 0">
+          <h4>Memberships</h4>
+          <xsl:for-each select="memberships/membership">
+            <h5>Role: <xsl:value-of select="@roleName"/>(<xsl:value-of select="@roleId"/>)</h5>
+            <blockquote>
+              <xsl:choose>
+                <xsl:when test="string-length(attributes/attribute) &gt; 0">
+                  <xsl:call-template name="attributes">
+                    <xsl:with-param name="label">Attributes</xsl:with-param>
+                    <xsl:with-param name="node" select="attributes/attribute"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <h5>THIS ROLE HASN'T ATTRIBUTES</h5>
+                </xsl:otherwise>
+              </xsl:choose>
+              <xsl:choose>
+                <xsl:when test="string-length(derivedAttributes/derivedAttribute) &gt; 0">
+                  <xsl:call-template name="attributes">
+                    <xsl:with-param name="label">Derived Attributes</xsl:with-param>
+                    <xsl:with-param name="node" select="derivedAttributes/derivedAttribute"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <h5>THIS ROLE HASN'T DERIVED ATTRIBUTES</h5>
+                </xsl:otherwise>
+              </xsl:choose>
+              <xsl:choose>
+                <xsl:when test="string-length(virtualAttributes/virtualAttribute) &gt; 0">
+                  <xsl:call-template name="attributes">
+                    <xsl:with-param name="label">Virtual Attributes</xsl:with-param>
+                    <xsl:with-param name="node" select="virtualAttributes/virtualAttribute"/>
+                  </xsl:call-template>
+                </xsl:when>
+                <xsl:otherwise>
+                  <h5>THIS ROLE HASN'T VIRTUAL ATTRIBUTES</h5>
+                </xsl:otherwise>
+              </xsl:choose>
+              <!-- 'roleResources" is defined in roleReportlet2html.xsl -->
+              <xsl:call-template name="roleResources">
+                <xsl:with-param name="node" select="resources/resource"/>
+              </xsl:call-template>
+            </blockquote>
+          </xsl:for-each>
+        </xsl:when>
+        <xsl:otherwise>
+          <h5>THIS USER ISN'T ASSIGNED TO A ROLE</h5>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:if test="string-length(resources) &gt; 0">
+        <xsl:call-template name="resources">
+          <xsl:with-param name="node" select="resources/resource"/>
+        </xsl:call-template>
+      </xsl:if>
+      <hr/>
+    </xsl:for-each>
+       
+  </xsl:template>
+
+  <xsl:template name="attributes">
+    <xsl:param name="label"/>
+    <xsl:param name="node"/>
+
+    <h4>
+      <xsl:value-of select="$label"/>
+    </h4>
+    
+    <table>
+      <thead>
+        <tr>
+          <th>Schema name</th>
+          <th>Value(s)</th>
+        </tr>
+      </thead>
+      <tbody>
+        <xsl:for-each select="$node">
+          <xsl:if test="string-length(value/text()) &gt; 0">
+            <tr>
+              <td>
+                <xsl:value-of select="@name"/>
+              </td>
+              <td>
+                <ul>
+                  <xsl:for-each select="value">
+                    <li>
+                      <xsl:value-of select="text()"/>
+                    </li>
+                  </xsl:for-each>
+                </ul>
+              </td>
+            </tr>
+          </xsl:if>
+        </xsl:for-each>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <xsl:template name="resources">
+    <xsl:param name="node"/>
+    
+    <h4>Resources</h4>
+    <ul>
+      <xsl:for-each select="$node">
+        <li>
+          <xsl:value-of select="@name"/>
+        </li>
+      </xsl:for-each>
+    </ul>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/test/java/org/apache/syncope/server/logic/NotificationTest.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/test/java/org/apache/syncope/server/logic/NotificationTest.java b/syncope620/server/logic/src/test/java/org/apache/syncope/server/logic/NotificationTest.java
index 4db9bba..de655d8 100644
--- a/syncope620/server/logic/src/test/java/org/apache/syncope/server/logic/NotificationTest.java
+++ b/syncope620/server/logic/src/test/java/org/apache/syncope/server/logic/NotificationTest.java
@@ -89,6 +89,7 @@ import org.springframework.transaction.annotation.Transactional;
 @ContextConfiguration(locations = {
     "classpath:provisioningContext.xml",
     "classpath:logicContext.xml",
+    "classpath:workflowContext.xml",
     "classpath:persistenceTest.xml",
     "classpath:logicTest.xml"
 })

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/test/resources/logicTest.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/test/resources/logicTest.xml b/syncope620/server/logic/src/test/resources/logicTest.xml
index c3f5942..d3b1bd8 100644
--- a/syncope620/server/logic/src/test/resources/logicTest.xml
+++ b/syncope620/server/logic/src/test/resources/logicTest.xml
@@ -30,6 +30,7 @@ under the License.
         <value>classpath:connid.properties</value>
         <value>classpath:mail.properties</value>
         <value>classpath:logic.properties</value>
+        <value>classpath:workflow.properties</value>
       </list>
     </property>
     <property name="ignoreResourceNotFound" value="true"/>
@@ -40,9 +41,5 @@ under the License.
     <property name="primary" value="file:${conf.directory}/content.xml"/>
     <property name="fallback" value="classpath:content.xml"/>
   </bean>
-  <bean class="org.apache.syncope.server.persistence.jpa.content.XMLContentLoader" init-method="load"/>
-  
-  <bean class="org.apache.syncope.server.workflow.java.DefaultUserWorkflowAdapter"/>
-  <bean class="org.apache.syncope.server.workflow.java.DefaultRoleWorkflowAdapter"/>
   
 </beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/misc/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/misc/pom.xml b/syncope620/server/misc/pom.xml
index 3aa738a..513ea91 100644
--- a/syncope620/server/misc/pom.xml
+++ b/syncope620/server/misc/pom.xml
@@ -77,6 +77,15 @@ under the License.
       <groupId>org.jasypt</groupId>
       <artifactId>jasypt</artifactId>
     </dependency>
+    
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aop</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-expression</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.springframework.security</groupId>
       <artifactId>spring-security-core</artifactId>
@@ -84,7 +93,7 @@ under the License.
     
     <dependency>
       <groupId>org.apache.syncope.server</groupId>
-      <artifactId>syncope-provisioning-api</artifactId>
+      <artifactId>syncope-server-provisioning-api</artifactId>
       <version>${project.version}</version>
     </dependency>
     

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/misc/src/main/resources/securityContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/misc/src/main/resources/securityContext.xml b/syncope620/server/misc/src/main/resources/securityContext.xml
new file mode 100644
index 0000000..5dddb07
--- /dev/null
+++ b/syncope620/server/misc/src/main/resources/securityContext.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:security="http://www.springframework.org/schema/security"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/security
+                           http://www.springframework.org/schema/security/spring-security.xsd">
+
+  <bean id="adminUser" class="java.lang.String">
+    <constructor-arg value="${adminUser}"/>
+  </bean>
+  <bean id="anonymousUser" class="java.lang.String">
+    <constructor-arg value="${anonymousUser}"/>
+  </bean>
+  
+  <security:global-method-security pre-post-annotations="enabled"/>
+  
+  <bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy">
+    <security:filter-chain-map path-type="ant">
+      <security:filter-chain pattern="/**" filters="securityContextPersistenceFilter"/>
+    </security:filter-chain-map>
+  </bean>
+  
+  <bean id="securityContextRepository" class='org.springframework.security.web.context.NullSecurityContextRepository'/>
+
+  <bean id="securityContextPersistenceFilter"
+        class="org.springframework.security.web.context.SecurityContextPersistenceFilter">
+    <property name="securityContextRepository" ref="securityContextRepository"/>
+  </bean>
+
+  <security:http security-context-repository-ref="securityContextRepository" realm="Apache Syncope authentication">
+    <security:http-basic/>
+    <security:anonymous username="${anonymousUser}"/>
+    <security:intercept-url pattern="/**"/>
+  </security:http>
+
+  <bean id="syncopeUserDetailsService" class="org.apache.syncope.server.misc.security.SyncopeUserDetailsService"/>
+
+  <bean id="syncopeAuthenticationProvider" class="org.apache.syncope.server.misc.security.SyncopeAuthenticationProvider">
+    <property name="adminPassword" value="${adminPassword}"/>
+    <property name="adminPasswordAlgorithm" value="${adminPasswordAlgorithm}"/>
+    <property name="anonymousKey" value="${anonymousKey}"/>
+    <property name="userDetailsService" ref="syncopeUserDetailsService"/>
+  </bean>
+
+  <security:authentication-manager>
+    <security:authentication-provider ref="syncopeAuthenticationProvider"/>
+  </security:authentication-manager>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/pom.xml b/syncope620/server/persistence-api/pom.xml
index c65699f..54f0663 100644
--- a/syncope620/server/persistence-api/pom.xml
+++ b/syncope620/server/persistence-api/pom.xml
@@ -30,7 +30,7 @@ under the License.
   <name>Apache Syncope Server Persistence API</name>
   <description>Apache Syncope Server Persistence API</description>
   <groupId>org.apache.syncope.server</groupId>
-  <artifactId>syncope-persistence-api</artifactId>
+  <artifactId>syncope-server-persistence-api</artifactId>
   <packaging>jar</packaging>
   
   <properties>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/SyncopeLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/SyncopeLoader.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/SyncopeLoader.java
new file mode 100644
index 0000000..0bbc3ae
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/SyncopeLoader.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.server.persistence.api;
+
+/**
+ * Marker interface for Syncope components initialization.
+ */
+public interface SyncopeLoader {
+
+    /**
+     * @return the priority that the implementing class has in the initialization process.
+     */
+    Integer getPriority();
+
+    /**
+     * Perform initialization operations.
+     */
+    void load();
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/content/ContentLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/content/ContentLoader.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/content/ContentLoader.java
index 8e351b5..ed9ae6f 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/content/ContentLoader.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/server/persistence/api/content/ContentLoader.java
@@ -18,8 +18,8 @@
  */
 package org.apache.syncope.server.persistence.api.content;
 
-public interface ContentLoader {
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
 
-    void load();
+public interface ContentLoader extends SyncopeLoader {
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/pom.xml b/syncope620/server/persistence-jpa/pom.xml
index 2d1f6e0..aa65227 100644
--- a/syncope620/server/persistence-jpa/pom.xml
+++ b/syncope620/server/persistence-jpa/pom.xml
@@ -30,7 +30,7 @@ under the License.
   <name>Apache Syncope Server Persistence JPA</name>
   <description>Apache Syncope Server Persistence JPA</description>
   <groupId>org.apache.syncope.server</groupId>
-  <artifactId>syncope-persistence-jpa</artifactId>
+  <artifactId>syncope-server-persistence-jpa</artifactId>
   <packaging>jar</packaging>
   
   <properties>
@@ -95,7 +95,7 @@ under the License.
       
     <dependency>
       <groupId>org.apache.syncope.server</groupId>
-      <artifactId>syncope-workflow-api</artifactId>
+      <artifactId>syncope-server-workflow-api</artifactId>
       <version>${project.version}</version>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/XMLContentLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/XMLContentLoader.java b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/XMLContentLoader.java
index ac24f8c..9f44ac9 100644
--- a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/XMLContentLoader.java
+++ b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/XMLContentLoader.java
@@ -41,6 +41,11 @@ public class XMLContentLoader extends AbstractContentDealer implements ContentLo
     @Resource(name = "contentXML")
     private ResourceWithFallbackLoader contentXML;
 
+    @Override
+    public Integer getPriority() {
+        return 0;
+    }
+
     @Transactional
     @Override
     public void load() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/entity/JPAEntityFactory.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/entity/JPAEntityFactory.java b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/entity/JPAEntityFactory.java
index b1128b3..ec61b84 100644
--- a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/entity/JPAEntityFactory.java
+++ b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/entity/JPAEntityFactory.java
@@ -25,6 +25,7 @@ import org.apache.syncope.server.persistence.api.entity.Entitlement;
 import org.apache.syncope.server.persistence.api.entity.Entity;
 import org.apache.syncope.server.persistence.api.entity.EntityFactory;
 import org.apache.syncope.server.persistence.api.entity.ExternalResource;
+import org.apache.syncope.server.persistence.api.entity.Logger;
 import org.apache.syncope.server.persistence.api.entity.Notification;
 import org.apache.syncope.server.persistence.api.entity.PasswordPolicy;
 import org.apache.syncope.server.persistence.api.entity.Policy;
@@ -252,6 +253,8 @@ public class JPAEntityFactory implements EntityFactory {
             result = (T) new JPATaskExec();
         } else if (reference.equals(SecurityQuestion.class)) {
             result = (T) new JPASecurityQuestion();
+        } else if (reference.equals(Logger.class)) {
+            result = (T) new JPALogger();
         } else {
             throw new IllegalArgumentException("Could not find a JPA implementation of " + reference.getName());
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/src/main/resources/persistence.properties
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/resources/persistence.properties b/syncope620/server/persistence-jpa/src/main/resources/persistence.properties
index a737b93..664afd0 100644
--- a/syncope620/server/persistence-jpa/src/main/resources/persistence.properties
+++ b/syncope620/server/persistence-jpa/src/main/resources/persistence.properties
@@ -14,6 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+content.directory=${conf.directory}
 jpa.driverClassName=org.postgresql.Driver
 jpa.url=jdbc:postgresql://localhost:5432/syncope
 jpa.username=syncope
@@ -24,4 +25,4 @@ jpa.pool.validationQuery=SELECT 1
 quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
 quartz.sql=tables_postgres.sql
 audit.sql=audit.sql
-database.schema=
\ No newline at end of file
+database.schema=

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml b/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
index 7b48b71..60b9940 100644
--- a/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
+++ b/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
@@ -60,19 +60,19 @@ under the License.
     <constructor-arg value="${database.schema}"/>
   </bean>
   <bean id="persistenceProperties" class="org.apache.syncope.server.misc.spring.ResourceWithFallbackLoader">
-    <property name="primary" value="file:${conf.directory}/persistence.properties"/>
+    <property name="primary" value="file:${content.directory}/persistence.properties"/>
     <property name="fallback" value="classpath:persistence.properties"/>
   </bean>
   <bean id="contentXML" class="org.apache.syncope.server.misc.spring.ResourceWithFallbackLoader">
-    <property name="primary" value="file:${conf.directory}/content.xml"/>
+    <property name="primary" value="file:${content.directory}/content.xml"/>
     <property name="fallback" value="classpath:content.xml"/>
   </bean>
   <bean id="viewsXML" class="org.apache.syncope.server.misc.spring.ResourceWithFallbackLoader">
-    <property name="primary" value="file:${conf.directory}/views.xml"/>
+    <property name="primary" value="file:${content.directory}/views.xml"/>
     <property name="fallback" value="classpath:views.xml"/>
   </bean>
   <bean id="indexesXML" class="org.apache.syncope.server.misc.spring.ResourceWithFallbackLoader">
-    <property name="primary" value="file:${conf.directory}/indexes.xml"/>
+    <property name="primary" value="file:${content.directory}/indexes.xml"/>
     <property name="fallback" value="classpath:indexes.xml"/>
   </bean>
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/src/test/resources/content.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/test/resources/content.xml b/syncope620/server/persistence-jpa/src/test/resources/content.xml
index 1f9c8b8..0fb3b79 100644
--- a/syncope620/server/persistence-jpa/src/test/resources/content.xml
+++ b/syncope620/server/persistence-jpa/src/test/resources/content.xml
@@ -445,7 +445,7 @@ under the License.
                 bundleName="net.tirasa.connid.bundles.soap"
                 connectorName="net.tirasa.connid.bundles.soap.WebServiceConnector"
                 version="${connid.soap.version}"
-                jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["http://localhost:9080/wssample/services/provisioning"]},{"schema":{"name":"servicename","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["net.tirasa.connid.bundles.soap.provisioning.interfaces.Provisioning"]}]'/>
+                jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["http://localhost:${cargo.servlet.port}/wssample/services/provisioning"]},{"schema":{"name":"servicename","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["net.tirasa.connid.bundles.soap.provisioning.interfaces.Provisioning"]}]'/>
   <ConnInstance_capabilities ConnInstance_id="100" capabilities="ONE_PHASE_CREATE"/>
   <ConnInstance_capabilities ConnInstance_id="100" capabilities="ONE_PHASE_UPDATE"/>
   <ConnInstance_capabilities ConnInstance_id="100" capabilities="ONE_PHASE_DELETE"/>
@@ -476,7 +476,7 @@ under the License.
                 connectorName="net.tirasa.connid.bundles.soap.WebServiceConnector"
                 version="${connid.soap.version}"
                 connRequestTimeout="10"
-                jsonConf='[{"schema":{"name":"servicename","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["net.tirasa.connid.bundles.soap.provisioning.interfaces.Provisioning"]},{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":true,"values":["http://localhost:9080/wssample/services/provisioning"]}]'/>
+                jsonConf='[{"schema":{"name":"servicename","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["net.tirasa.connid.bundles.soap.provisioning.interfaces.Provisioning"]},{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":true,"values":["http://localhost:${cargo.servlet.port}/wssample/services/provisioning"]}]'/>
   <ConnInstance_capabilities ConnInstance_id="102" capabilities="ONE_PHASE_CREATE"/>
   <ConnInstance_capabilities ConnInstance_id="102" capabilities="ONE_PHASE_UPDATE"/>
   <ConnInstance_capabilities ConnInstance_id="102" capabilities="ONE_PHASE_DELETE"/>
@@ -490,7 +490,7 @@ under the License.
                 bundleName="net.tirasa.connid.bundles.soap"
                 connectorName="net.tirasa.connid.bundles.soap.WebServiceConnector"
                 version="${connid.soap.version}"
-                jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["http://localhost:9080/wssample/services/provisioning"]},{"schema":{"name":"servicename","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["net.tirasa.connid.bundles.soap.provisioning.interfaces.Provisioning"]}]'/>
+                jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["http://localhost:${cargo.servlet.port}/wssample/services/provisioning"]},{"schema":{"name":"servicename","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":false,"values":["net.tirasa.connid.bundles.soap.provisioning.interfaces.Provisioning"]}]'/>
 
   <ConnInstance id="104" displayName="CSVDir"
                 location="${connid.location}"
@@ -555,7 +555,7 @@ under the License.
   <ExternalResource name="ws-target-resource-timeout" connector_id="102"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" propagationMode="TWO_PHASES"
                     propagationPriority="0" propagationPrimary="1" createTraceLevel="FAILURES" deleteTraceLevel="NONE" updateTraceLevel="ALL" syncTraceLevel="ALL"
-                    jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":true,"values":["http://localhost:9080/syncope-build-tools/services/provisioning"]}]'
+                    jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":true,"values":["http://localhost:${cargo.servlet.port}/syncope-fit-build-tools/services/provisioning"]}]'
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-list-mappings-1" connector_id="100"

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/persistence-jpa/src/test/resources/persistence.properties
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/test/resources/persistence.properties b/syncope620/server/persistence-jpa/src/test/resources/persistence.properties
index 3106b69..384d108 100644
--- a/syncope620/server/persistence-jpa/src/test/resources/persistence.properties
+++ b/syncope620/server/persistence-jpa/src/test/resources/persistence.properties
@@ -14,6 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+content.directory=${conf.directory}
 jpa.driverClassName=org.h2.Driver
 jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1
 jpa.username=sa
@@ -25,4 +26,4 @@ quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 quartz.scheduler.idleWaitTime=5000
 quartz.sql=tables_h2.sql
 audit.sql=audit.sql
-database.schema=
\ No newline at end of file
+database.schema=

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-api/pom.xml b/syncope620/server/provisioning-api/pom.xml
index e068061..968fa71 100644
--- a/syncope620/server/provisioning-api/pom.xml
+++ b/syncope620/server/provisioning-api/pom.xml
@@ -30,7 +30,7 @@ under the License.
   <name>Apache Syncope Server Provisioning API</name>
   <description>Apache Syncope Server Provisioning API</description>
   <groupId>org.apache.syncope.server</groupId>
-  <artifactId>syncope-provisioning-api</artifactId>
+  <artifactId>syncope-server-provisioning-api</artifactId>
   <packaging>jar</packaging>
   
   <properties>
@@ -39,18 +39,13 @@ under the License.
 
   <dependencies>
     <dependency>
-      <groupId>net.tirasa.connid</groupId>
-      <artifactId>connector-framework</artifactId>
-    </dependency>
-
-    <dependency>
       <groupId>org.quartz-scheduler</groupId>
       <artifactId>quartz</artifactId>
     </dependency>
 
     <dependency>
       <groupId>org.apache.syncope.server</groupId>
-      <artifactId>syncope-persistence-api</artifactId>
+      <artifactId>syncope-server-persistence-api</artifactId>
       <version>${project.version}</version>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-api/src/main/java/org/apache/syncope/server/provisioning/api/ConnectorFactory.java
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-api/src/main/java/org/apache/syncope/server/provisioning/api/ConnectorFactory.java b/syncope620/server/provisioning-api/src/main/java/org/apache/syncope/server/provisioning/api/ConnectorFactory.java
index 616f01e..b98895e 100644
--- a/syncope620/server/provisioning-api/src/main/java/org/apache/syncope/server/provisioning/api/ConnectorFactory.java
+++ b/syncope620/server/provisioning-api/src/main/java/org/apache/syncope/server/provisioning/api/ConnectorFactory.java
@@ -20,15 +20,16 @@ package org.apache.syncope.server.provisioning.api;
 
 import java.util.Set;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
 import org.apache.syncope.server.persistence.api.entity.ConnInstance;
 import org.apache.syncope.server.persistence.api.entity.ExternalResource;
 
 /**
  * Entry point for creating and destroying connectors for external resources.
  *
- * @see org.apache.syncope.core.propagation.Connector
+ * @see Connector
  */
-public interface ConnectorFactory {
+public interface ConnectorFactory extends SyncopeLoader {
 
     /**
      * Create connector from given connector instance and configuration properties.
@@ -52,6 +53,7 @@ public interface ConnectorFactory {
      *
      * @see ExternalResource
      */
+    @Override
     void load();
 
     /**

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-java/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/pom.xml b/syncope620/server/provisioning-java/pom.xml
index 4d4ac5e..fa5d588 100644
--- a/syncope620/server/provisioning-java/pom.xml
+++ b/syncope620/server/provisioning-java/pom.xml
@@ -30,7 +30,7 @@ under the License.
   <name>Apache Syncope Server Provisioning Java</name>
   <description>Apache Syncope Server Provisioning Java</description>
   <groupId>org.apache.syncope.server</groupId>
-  <artifactId>syncope-provisioning-java</artifactId>
+  <artifactId>syncope-server-provisioning-java</artifactId>
   <packaging>jar</packaging>
   
   <properties>
@@ -59,7 +59,7 @@ under the License.
     
     <dependency>
       <groupId>org.apache.syncope.server</groupId>
-      <artifactId>syncope-workflow-api</artifactId>
+      <artifactId>syncope-server-workflow-api</artifactId>
       <version>${project.version}</version>
     </dependency>
     <dependency>
@@ -71,7 +71,7 @@ under the License.
     <!-- TEST -->
     <dependency>
       <groupId>org.apache.syncope.server</groupId>
-      <artifactId>syncope-workflow-java</artifactId>
+      <artifactId>syncope-server-workflow-java</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>
     </dependency>
@@ -82,7 +82,7 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.syncope.server</groupId>
-      <artifactId>syncope-persistence-jpa</artifactId>
+      <artifactId>syncope-server-persistence-jpa</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>
     </dependency>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-java/src/main/java/org/apache/syncope/server/provisioning/java/ConnectorManager.java
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/src/main/java/org/apache/syncope/server/provisioning/java/ConnectorManager.java b/syncope620/server/provisioning-java/src/main/java/org/apache/syncope/server/provisioning/java/ConnectorManager.java
index 5269a8b..2485458 100644
--- a/syncope620/server/provisioning-java/src/main/java/org/apache/syncope/server/provisioning/java/ConnectorManager.java
+++ b/syncope620/server/provisioning-java/src/main/java/org/apache/syncope/server/provisioning/java/ConnectorManager.java
@@ -134,6 +134,11 @@ public class ConnectorManager implements ConnectorRegistry, ConnectorFactory {
         ApplicationContextProvider.getBeanFactory().destroySingleton(id);
     }
 
+    @Override
+    public Integer getPriority() {
+        return 100;
+    }
+
     @Transactional(readOnly = true)
     @Override
     public void load() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-java/src/main/resources/mail.properties
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/src/main/resources/mail.properties b/syncope620/server/provisioning-java/src/main/resources/mail.properties
index 17bda2e..12f04e7 100644
--- a/syncope620/server/provisioning-java/src/main/resources/mail.properties
+++ b/syncope620/server/provisioning-java/src/main/resources/mail.properties
@@ -14,6 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+templates.directory=${conf.directory}
 smtpHost=none.syncope.apache.org
 smtpPort=25
 smtpUser=
@@ -21,4 +22,4 @@ smtpPassword=
 smtpProtocol=smtp
 smtpEncoding=UTF-8
 smtpConnectionTimeout=3000
-mailDebug=false
\ No newline at end of file
+mailDebug=false

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-java/src/main/resources/provisioningContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/src/main/resources/provisioningContext.xml b/syncope620/server/provisioning-java/src/main/resources/provisioningContext.xml
index a93ba4e..d3fa665 100644
--- a/syncope620/server/provisioning-java/src/main/resources/provisioningContext.xml
+++ b/syncope620/server/provisioning-java/src/main/resources/provisioningContext.xml
@@ -81,7 +81,7 @@ under the License.
   </bean>
 
   <bean id="velocityResourceLoader" class="org.apache.syncope.server.misc.spring.ResourceWithFallbackLoader">
-    <property name="primary" value="file:${conf.directory}/"/>
+    <property name="primary" value="file:${templates.directory}/"/>
     <property name="fallback" value="classpath:"/>
   </bean>
   <bean id="velocityEngine" class="org.apache.syncope.server.provisioning.java.notification.VelocityEngineFactoryBean">

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-java/src/test/java/org/apache/syncope/server/provisioning/java/AbstractTest.java
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/src/test/java/org/apache/syncope/server/provisioning/java/AbstractTest.java b/syncope620/server/provisioning-java/src/test/java/org/apache/syncope/server/provisioning/java/AbstractTest.java
index 62b0d6c..3b76fb7 100644
--- a/syncope620/server/provisioning-java/src/test/java/org/apache/syncope/server/provisioning/java/AbstractTest.java
+++ b/syncope620/server/provisioning-java/src/test/java/org/apache/syncope/server/provisioning/java/AbstractTest.java
@@ -26,6 +26,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 @ContextConfiguration(locations = {
     "classpath:persistenceTest.xml",
     "classpath:provisioningContext.xml",
+    "classpath:workflowContext.xml",
     "classpath:provisioningTest.xml"
 })
 public abstract class AbstractTest {

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/provisioning-java/src/test/resources/provisioningTest.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/src/test/resources/provisioningTest.xml b/syncope620/server/provisioning-java/src/test/resources/provisioningTest.xml
index e739b8c..398f3fc 100644
--- a/syncope620/server/provisioning-java/src/test/resources/provisioningTest.xml
+++ b/syncope620/server/provisioning-java/src/test/resources/provisioningTest.xml
@@ -29,6 +29,7 @@ under the License.
         <value>classpath:security.properties</value>
         <value>classpath:connid.properties</value>
         <value>classpath:mail.properties</value>
+        <value>classpath:workflow.properties</value>
       </list>
     </property>
     <property name="ignoreResourceNotFound" value="true"/>
@@ -41,7 +42,4 @@ under the License.
   </bean>
   <bean class="org.apache.syncope.server.persistence.jpa.content.XMLContentLoader" init-method="load"/>
   
-  <bean class="org.apache.syncope.server.workflow.java.DefaultUserWorkflowAdapter"/>
-  <bean class="org.apache.syncope.server.workflow.java.DefaultRoleWorkflowAdapter"/>
-  
 </beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/pom.xml b/syncope620/server/rest-cxf/pom.xml
index 38057dd..f164e43 100644
--- a/syncope620/server/rest-cxf/pom.xml
+++ b/syncope620/server/rest-cxf/pom.xml
@@ -38,6 +38,12 @@ under the License.
   </properties>
 
   <dependencies>
+    <dependency> 
+      <groupId>javax.servlet</groupId> 
+      <artifactId>javax.servlet-api</artifactId> 
+      <scope>provided</scope>
+    </dependency>
+    
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jpa_2.0_spec</artifactId>
@@ -46,8 +52,20 @@ under the License.
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-orm</artifactId>
+    </dependency>      
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
     </dependency>
-
+    <dependency>
+      <groupId>org.springframework.security</groupId>
+      <artifactId>spring-security-web</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.security</groupId>
+      <artifactId>spring-security-config</artifactId>
+    </dependency>
+    
     <dependency>
       <groupId>com.fasterxml.jackson.jaxrs</groupId>
       <artifactId>jackson-jaxrs-json-provider</artifactId>
@@ -83,6 +101,12 @@ under the License.
     </dependency>  
     
     <dependency>
+      <groupId>org.apache.syncope.common</groupId>
+      <artifactId>syncope-common-rest-api</artifactId>
+      <version>${project.version}</version>
+      <classifier>javadoc</classifier>
+    </dependency>
+    <dependency>
       <groupId>org.apache.syncope.server</groupId>
       <artifactId>syncope-server-logic</artifactId>
       <version>${project.version}</version>
@@ -105,5 +129,12 @@ under the License.
         <artifactId>maven-pmd-plugin</artifactId>
       </plugin>
     </plugins>
+    
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/ThreadLocalCleanupListener.java
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/ThreadLocalCleanupListener.java b/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/ThreadLocalCleanupListener.java
new file mode 100644
index 0000000..bc139a6
--- /dev/null
+++ b/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/ThreadLocalCleanupListener.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.server.rest.cxf;
+
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.ServletRequestListener;
+import org.apache.syncope.server.misc.DataFormat;
+import org.identityconnectors.common.l10n.CurrentLocale;
+import org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager;
+
+/**
+ * Remove any known thread-local variable when the servlet request is destroyed.
+ */
+public class ThreadLocalCleanupListener implements ServletRequestListener {
+
+    @Override
+    public void requestInitialized(final ServletRequestEvent sre) {
+        // nothing to do while setting up this request (and thread)
+    }
+
+    @Override
+    public void requestDestroyed(final ServletRequestEvent sre) {
+        DataFormat.clear();
+
+        ThreadClassLoaderManager.clearInstance();
+        CurrentLocale.clear();
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/WADLServlet.java
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/WADLServlet.java b/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/WADLServlet.java
new file mode 100644
index 0000000..76f1897
--- /dev/null
+++ b/syncope620/server/rest-cxf/src/main/java/org/apache/syncope/server/rest/cxf/WADLServlet.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.server.rest.cxf;
+
+import java.io.IOException;
+import java.net.URL;
+import java.rmi.ServerException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.cocoon.pipeline.CachingPipeline;
+import org.apache.cocoon.pipeline.Pipeline;
+import org.apache.cocoon.sax.SAXPipelineComponent;
+import org.apache.cocoon.sax.component.XMLGenerator;
+import org.apache.cocoon.sax.component.XMLSerializer;
+import org.apache.cocoon.sax.component.XSLTTransformer;
+
+public class WADLServlet extends HttpServlet {
+
+    private static final long serialVersionUID = -6737005675471095560L;
+
+    private static final Pattern SCHEMA_PATTERN = Pattern.compile("/schema_(.*)_(.*)\\.html");
+
+    /**
+     * Handles the HTTP <code>GET</code> method.
+     *
+     * @param request servlet request
+     * @param response servlet response
+     * @throws ServletException if a servlet-specific error occurs
+     * @throws IOException if an I/O error occurs
+     */
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
+            throws ServletException, IOException {
+
+        String requestURI = request.getRequestURI().substring(
+                request.getRequestURI().indexOf(request.getServletPath()) + request.getServletPath().length());
+        Matcher schemaMatcher = SCHEMA_PATTERN.matcher(requestURI);
+
+        Pipeline<SAXPipelineComponent> pipeline = new CachingPipeline<SAXPipelineComponent>();
+        final String wadlURL = request.getRequestURL().
+                substring(0, request.getRequestURL().indexOf("/doc")) + "/?_wadl";
+        pipeline.addComponent(new XMLGenerator(new URL(wadlURL)));
+        if ("/".equals(requestURI)) {
+            XSLTTransformer xslt = new XSLTTransformer(getClass().getResource("/wadl2html/index.xsl"));
+
+            Map<String, Object> parameters = new HashMap<>();
+            parameters.put("contextPath", request.getContextPath());
+            xslt.setParameters(parameters);
+
+            pipeline.addComponent(xslt);
+        } else if (schemaMatcher.matches()) {
+            XSLTTransformer xslt = new XSLTTransformer(getClass().getResource("/wadl2html/schema.xsl"));
+
+            Map<String, Object> parameters = new HashMap<>();
+            parameters.put("contextPath", request.getContextPath());
+            parameters.put("schema-position", schemaMatcher.group(1));
+            parameters.put("schema-prefix", schemaMatcher.group(2));
+            xslt.setParameters(parameters);
+
+            pipeline.addComponent(xslt);
+        } else {
+            throw new ServerException("URL not supported: " + request.getRequestURI());
+        }
+
+        pipeline.addComponent(XMLSerializer.createHTML4Serializer());
+        pipeline.setup(response.getOutputStream());
+        try {
+            pipeline.execute();
+        } catch (Exception e) {
+            throw new ServletException(e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/src/main/resources/META-INF/web-fragment.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/src/main/resources/META-INF/web-fragment.xml b/syncope620/server/rest-cxf/src/main/resources/META-INF/web-fragment.xml
new file mode 100644
index 0000000..a320aee
--- /dev/null
+++ b/syncope620/server/rest-cxf/src/main/resources/META-INF/web-fragment.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
+                                  http://xmlns.jcp.org/xml/ns/javaee/web-fragment_3_1.xsd"
+              id="${pom.artifactId}" version="3.1">
+  
+  <display-name>Apache Syncope ${syncope.version} Server</display-name>
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>classpath*:/*Context.xml</param-value>
+  </context-param>
+
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.server.rest.cxf.ThreadLocalCleanupListener</listener-class>
+  </listener>
+  
+  <servlet>
+    <servlet-name>CXFServlet</servlet-name>
+    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+    <load-on-startup>1</load-on-startup> 
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>CXFServlet</servlet-name>
+    <url-pattern>/rest/*</url-pattern>
+  </servlet-mapping>
+  <servlet>
+    <servlet-name>WADLServlet</servlet-name>
+    <servlet-class>org.apache.syncope.server.rest.cxf.WADLServlet</servlet-class>
+    <load-on-startup>2</load-on-startup> 
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>WADLServlet</servlet-name>
+    <url-pattern>/rest/doc/*</url-pattern>
+  </servlet-mapping>
+
+  <filter>
+    <filter-name>encodingFilter</filter-name>
+    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+    <init-param>
+      <param-name>encoding</param-name>
+      <param-value>UTF-8</param-value>
+    </init-param>
+    <init-param>
+      <param-name>forceEncoding</param-name>
+      <param-value>true</param-value>
+    </init-param>
+  </filter>
+  <filter>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>encodingFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <login-config>
+    <auth-method>CLIENT-CERT</auth-method>
+  </login-config>
+
+</web-fragment>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/src/main/resources/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/src/main/resources/restCXFContext.xml b/syncope620/server/rest-cxf/src/main/resources/restCXFContext.xml
index 2b6155d..ddb3e5c 100644
--- a/syncope620/server/rest-cxf/src/main/resources/restCXFContext.xml
+++ b/syncope620/server/rest-cxf/src/main/resources/restCXFContext.xml
@@ -85,11 +85,11 @@ under the License.
     <property name="useJaxbContextForQnames" value="true"/>
     <property name="ignoreMessageWriters" value="true"/>
     <property name="addResourceAndMethodIds" value="true"/>
-    <property name="javaDocPath" value="/WEB-INF/lib/syncope-common-${syncope.version}-javadoc.jar"/>
+    <property name="javaDocPath" value="/WEB-INF/lib/syncope-common-rest-api-${syncope.version}-javadoc.jar"/>
   </bean>
   
   <bean id="addETagFilter" class="org.apache.syncope.server.rest.cxf.service.AddETagFilter"/>
-
+  
   <jaxrs:server id="restContainer" address="/" 
                 basePackages="org.apache.syncope.common.rest.api.service, org.apache.syncope.server.rest.cxf.service" 
                 staticSubresourceResolution="true">