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:17 UTC
[1/5] syncope git commit: Checkstyle / PMD config in
Repository: syncope
Updated Branches:
refs/heads/2_0_X 06eb20a1b -> b015c443b
Checkstyle / PMD config in
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ad98b98c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ad98b98c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ad98b98c
Branch: refs/heads/2_0_X
Commit: ad98b98cce3a8f06b4134495b6dcf822f7f1e3a0
Parents: 06eb20a
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Jan 13 09:04:14 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Jan 13 09:04:14 2015 +0100
----------------------------------------------------------------------
syncope620/client/lib/pom.xml | 19 +-
syncope620/common/lib/pom.xml | 17 +
syncope620/common/rest-api/pom.xml | 19 +-
syncope620/pom.xml | 22 ++
syncope620/server/logic/pom.xml | 15 +
.../apache/syncope/server/logic/UserLogic.java | 2 +-
syncope620/server/misc/pom.xml | 16 +
syncope620/server/persistence-api/pom.xml | 16 +
syncope620/server/persistence-jpa/pom.xml | 13 +
syncope620/server/provisioning-api/pom.xml | 16 +
syncope620/server/provisioning-java/pom.xml | 13 +
syncope620/server/rest-cxf/pom.xml | 16 +
syncope620/server/workflow-api/pom.xml | 18 +-
syncope620/server/workflow-java/pom.xml | 16 +
.../resources/org/apache/syncope/checkstyle.xml | 214 +++++++++++++
.../org/apache/syncope/java-formatter.xml | 309 +++++++++++++++++++
.../main/resources/org/apache/syncope/pmd.xml | 49 +++
17 files changed, 786 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/client/lib/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/client/lib/pom.xml b/syncope620/client/lib/pom.xml
index 0551c79..c4886be 100644
--- a/syncope620/client/lib/pom.xml
+++ b/syncope620/client/lib/pom.xml
@@ -32,7 +32,11 @@ under the License.
<groupId>org.apache.syncope.client</groupId>
<artifactId>syncope-client-lib</artifactId>
<packaging>jar</packaging>
-
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
@@ -59,4 +63,17 @@ under the License.
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/common/lib/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/pom.xml b/syncope620/common/lib/pom.xml
index e171dad..2bdc6ea 100644
--- a/syncope620/common/lib/pom.xml
+++ b/syncope620/common/lib/pom.xml
@@ -33,6 +33,10 @@ under the License.
<artifactId>syncope-common-lib</artifactId>
<packaging>jar</packaging>
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
@@ -74,4 +78,17 @@ under the License.
<scope>test</scope>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/common/rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/pom.xml b/syncope620/common/rest-api/pom.xml
index 432aa9e..137bfea 100644
--- a/syncope620/common/rest-api/pom.xml
+++ b/syncope620/common/rest-api/pom.xml
@@ -32,7 +32,11 @@ under the License.
<groupId>org.apache.syncope.common</groupId>
<artifactId>syncope-common-rest-api</artifactId>
<packaging>jar</packaging>
-
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
<dependencies>
<dependency>
<groupId>javax.validation</groupId>
@@ -62,4 +66,17 @@ under the License.
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/pom.xml b/syncope620/pom.xml
index fe966f3..a2433a8 100644
--- a/syncope620/pom.xml
+++ b/syncope620/pom.xml
@@ -364,6 +364,7 @@ under the License.
<secretKey>1abcdefghilmnopqrstuvz2!</secretKey>
<targetJdk>1.7</targetJdk>
+ <rootpom.basedir>${basedir}</rootpom.basedir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@@ -810,6 +811,27 @@ under the License.
<argLine>-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.13</version>
+ <configuration>
+ <configLocation>${rootpom.basedir}/src/main/resources/org/apache/syncope/checkstyle.xml</configLocation>
+ <targetJdk>${targetJdk}</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>3.3</version>
+ <configuration>
+ <rulesets>
+ <rulesets>${rootpom.basedir}/src/main/resources/org/apache/syncope/pmd.xml</rulesets>
+ </rulesets>
+ <targetJdk>${targetJdk}</targetJdk>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/logic/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/pom.xml b/syncope620/server/logic/pom.xml
index ec3cacd..84cecb0 100644
--- a/syncope620/server/logic/pom.xml
+++ b/syncope620/server/logic/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-server-logic</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -162,5 +166,16 @@ under the License.
<filtering>true</filtering>
</testResource>
</testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/UserLogic.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/UserLogic.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/UserLogic.java
index 6b6d313..c3b01f6 100644
--- a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/UserLogic.java
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/UserLogic.java
@@ -148,7 +148,7 @@ public class UserLogic extends AbstractSubjectLogic<UserTO, UserMod> {
Set<Long> adminRoleIds = RoleEntitlementUtil.getRoleKeys(AuthContextUtil.getOwnedEntitlementNames());
List<User> users = userDAO.findAll(adminRoleIds, page, size, orderBy);
- List<UserTO> userTOs = new ArrayList<UserTO>(users.size());
+ List<UserTO> userTOs = new ArrayList<>(users.size());
for (User user : users) {
userTOs.add(binder.getUserTO(user));
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/misc/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/misc/pom.xml b/syncope620/server/misc/pom.xml
index fd4ae70..3aa738a 100644
--- a/syncope620/server/misc/pom.xml
+++ b/syncope620/server/misc/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-server-misc</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -98,4 +102,16 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/persistence-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/pom.xml b/syncope620/server/persistence-api/pom.xml
index ff1d632..c65699f 100644
--- a/syncope620/server/persistence-api/pom.xml
+++ b/syncope620/server/persistence-api/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-persistence-api</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -59,4 +63,16 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/persistence-jpa/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/pom.xml b/syncope620/server/persistence-jpa/pom.xml
index 53ca552..2d1f6e0 100644
--- a/syncope620/server/persistence-jpa/pom.xml
+++ b/syncope620/server/persistence-jpa/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-persistence-jpa</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -158,6 +162,15 @@ under the License.
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
</plugins>
<resources>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/provisioning-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-api/pom.xml b/syncope620/server/provisioning-api/pom.xml
index aa27a1c..e068061 100644
--- a/syncope620/server/provisioning-api/pom.xml
+++ b/syncope620/server/provisioning-api/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-provisioning-api</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -51,4 +55,16 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/provisioning-java/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/provisioning-java/pom.xml b/syncope620/server/provisioning-java/pom.xml
index 66a2a85..4d4ac5e 100644
--- a/syncope620/server/provisioning-java/pom.xml
+++ b/syncope620/server/provisioning-java/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-provisioning-java</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -121,6 +125,15 @@ under the License.
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
</plugins>
<resources>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/pom.xml b/syncope620/server/rest-cxf/pom.xml
index c8e020c..38057dd 100644
--- a/syncope620/server/rest-cxf/pom.xml
+++ b/syncope620/server/rest-cxf/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-server-rest-cxf</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -90,4 +94,16 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/workflow-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/workflow-api/pom.xml b/syncope620/server/workflow-api/pom.xml
index af7bed8..a36e65e 100644
--- a/syncope620/server/workflow-api/pom.xml
+++ b/syncope620/server/workflow-api/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-workflow-api</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -40,5 +44,17 @@ under the License.
<version>${project.version}</version>
</dependency>
</dependencies>
-
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/server/workflow-java/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/workflow-java/pom.xml b/syncope620/server/workflow-java/pom.xml
index c70d2c4..1595c44 100644
--- a/syncope620/server/workflow-java/pom.xml
+++ b/syncope620/server/workflow-java/pom.xml
@@ -32,6 +32,10 @@ under the License.
<groupId>org.apache.syncope.server</groupId>
<artifactId>syncope-workflow-java</artifactId>
<packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
<dependencies>
<dependency>
@@ -50,4 +54,16 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/src/main/resources/org/apache/syncope/checkstyle.xml
----------------------------------------------------------------------
diff --git a/syncope620/src/main/resources/org/apache/syncope/checkstyle.xml b/syncope620/src/main/resources/org/apache/syncope/checkstyle.xml
new file mode 100644
index 0000000..e824479
--- /dev/null
+++ b/syncope620/src/main/resources/org/apache/syncope/checkstyle.xml
@@ -0,0 +1,214 @@
+<?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.
+-->
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<!--
+
+ Checkstyle configuration that checks the sun coding conventions from:
+
+ - the Java Language Specification at
+ http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+ - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+ - the Javadoc guidelines at
+ http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+ - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+ - some best practices
+
+ Checkstyle is very configurable. Be sure to read the documentation at
+ http://checkstyle.sf.net (or in your downloaded distribution).
+
+ Most Checks are configurable, be sure to consult the documentation.
+
+ To completely disable a check, just comment it out or delete it from the file.
+
+ Finally, it is worth reading the documentation.
+
+-->
+<module name="Checker">
+ <!--
+ If you set the basedir property below, then all reported file
+ names will be relative to the specified directory. See
+ http://checkstyle.sourceforge.net/5.x/config.html#Checker
+
+ <property name="basedir" value="${basedir}"/>
+ -->
+
+ <!-- Checks that a package-info.java file exists for each package. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
+ <module name="JavadocPackage"/>
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile"/>
+
+ <!-- Checks that property files contain the same keys. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+ <module name="Translation"/>
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="FileLength"/>
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="FileTabCharacter"/>
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="RegexpSingleline">
+ <property name="format" value="\s+$"/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="2"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+
+ <module name="TreeWalker">
+
+ <property name="cacheFile" value="target/checkstyle.cache"/>
+
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+ <module name="JavadocMethod"/>
+ <module name="JavadocType"/>
+ <module name="JavadocVariable"/>
+ <module name="JavadocStyle"/>
+
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <module name="ConstantName"/>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ <module name="TypeName"/>
+
+
+ <!-- Checks for Headers -->
+ <!-- See http://checkstyle.sf.net/config_header.html -->
+ <!-- <module name="Header"> -->
+ <!-- The follow property value demonstrates the ability -->
+ <!-- to have access to ANT properties. In this case it uses -->
+ <!-- the ${basedir} property to allow Checkstyle to be run -->
+ <!-- from any directory within a project. See property -->
+ <!-- expansion, -->
+ <!-- http://checkstyle.sf.net/config.html#properties -->
+ <!-- <property -->
+ <!-- name="headerFile" -->
+ <!-- value="${basedir}/java.header"/> -->
+ <!-- </module> -->
+
+ <!-- Following interprets the header file as regular expressions. -->
+ <!-- <module name="RegexpHeader"/> -->
+
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="LineLength">
+ <property name="max" value="120"/>
+ <property name="ignorePattern" value="^import"/>
+ </module>
+ <module name="MethodLength"/>
+ <module name="ParameterNumber"/>
+
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="EmptyForIteratorPad"/>
+ <module name="GenericWhitespace"/>
+ <module name="MethodParamPad"/>
+ <!--<module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore"/>-->
+ <module name="OperatorWrap"/>
+ <module name="ParenPad"/>
+ <module name="TypecastParenPad"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround"/>
+
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <module name="ModifierOrder"/>
+ <module name="RedundantModifier"/>
+
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <module name="AvoidNestedBlocks"/>
+ <module name="EmptyBlock"/>
+ <module name="LeftCurly"/>
+ <module name="NeedBraces"/>
+ <module name="RightCurly"/>
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <!-- <module name="AvoidInlineConditionals"/>-->
+ <!--module name="DoubleCheckedLocking"/--> <!-- MY FAVOURITE -->
+ <module name="EmptyStatement"/>
+ <module name="EqualsHashCode"/>
+ <module name="HiddenField">
+ <property name="ignoreSetter" value="true"/>
+ <property name="ignoreConstructorParameter" value="true"/>
+ </module>
+ <module name="IllegalInstantiation"/>
+ <module name="InnerAssignment"/>
+ <!--<module name="MagicNumber"/>-->
+ <module name="MissingSwitchDefault"/>
+ <module name="RedundantThrows"/>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!--<module name="DesignForExtension"/>-->
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+ <module name="VisibilityModifier">
+ <property name="protectedAllowed" value="true"/>
+ </module>
+
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="ArrayTypeStyle"/>
+ <module name="FinalParameters"/>
+ <module name="TodoComment"/>
+ <module name="UpperEll"/>
+
+ </module>
+
+</module>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/src/main/resources/org/apache/syncope/java-formatter.xml
----------------------------------------------------------------------
diff --git a/syncope620/src/main/resources/org/apache/syncope/java-formatter.xml b/syncope620/src/main/resources/org/apache/syncope/java-formatter.xml
new file mode 100644
index 0000000..07961a6
--- /dev/null
+++ b/syncope620/src/main/resources/org/apache/syncope/java-formatter.xml
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+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.
+-->
+<profiles version="12">
+ <profile kind="CodeFormatterProfile" name="Syncope" version="12">
+ <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="49"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+ <setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+ <setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+ <setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="32"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+ <setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
+ <setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="48"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="48"/>
+ <setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="32"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+ <setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="120"/>
+ <setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+ <setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+ <setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+ </profile>
+</profiles>
http://git-wip-us.apache.org/repos/asf/syncope/blob/ad98b98c/syncope620/src/main/resources/org/apache/syncope/pmd.xml
----------------------------------------------------------------------
diff --git a/syncope620/src/main/resources/org/apache/syncope/pmd.xml b/syncope620/src/main/resources/org/apache/syncope/pmd.xml
new file mode 100644
index 0000000..28cfb4c
--- /dev/null
+++ b/syncope620/src/main/resources/org/apache/syncope/pmd.xml
@@ -0,0 +1,49 @@
+<?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.
+-->
+<ruleset name="Syncope"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+ <rule ref="rulesets/basic.xml"/>
+ <rule ref="rulesets/naming.xml">
+ <exclude name="ShortVariable"/>
+ <exclude name="LongVariable"/>
+ </rule>
+ <rule ref="rulesets/unusedcode.xml"/>
+ <rule ref="rulesets/design.xml"/>
+ <rule ref="rulesets/imports.xml"/>
+ <rule ref="rulesets/strings.xml">
+ <exclude name="AvoidDuplicateLiterals"/>
+ </rule>
+ <rule ref="rulesets/codesize.xml"/>
+ <rule ref="rulesets/javabeans.xml">
+ <exclude name="BeanMembersShouldSerialize"/>
+ </rule>
+ <rule ref="rulesets/coupling.xml"/>
+ <rule ref="rulesets/controversial.xml">
+ <exclude name="NullAssignment"/>
+ <exclude name="DataflowAnomalyAnalysis"/>
+ </rule>
+ <rule ref="rulesets/strictexception.xml"/>
+ <rule ref="rulesets/typeresolution.xml"/>
+
+</ruleset>
[2/5] syncope git commit: [SYNCOPE-620] FIT module is in,
now time for importing integration tests
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/src/main/resources/wadl2html/index.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/src/main/resources/wadl2html/index.xsl b/syncope620/server/rest-cxf/src/main/resources/wadl2html/index.xsl
new file mode 100644
index 0000000..e238b99
--- /dev/null
+++ b/syncope620/server/rest-cxf/src/main/resources/wadl2html/index.xsl
@@ -0,0 +1,484 @@
+<?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:xalan="http://xml.apache.org/xalan"
+ xmlns:wadl="http://wadl.dev.java.net/2009/02"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="xalan wadl xs"
+ version="1.0">
+
+ <xsl:param name="contextPath"/>
+
+ <xsl:variable name="namespaces">
+ <xsl:for-each select="/*/namespace::*">
+ <namespace prefix="{name()}" url="{.}"/>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="namespacePos">
+ <xsl:for-each select="//xs:schema">
+ <namespace url="{@targetNamespace}" position="{position()}"/>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:template match="/wadl:application">
+ <html lang="en">
+ <head>
+ <meta charset="utf-8"/>
+ <title>
+ <xsl:value-of select="wadl:doc/@title"/>
+ </title>
+
+ <link rel="stylesheet" href="{$contextPath}/webjars/jquery-ui/${jquery-ui.version}/themes/base/minified/jquery-ui.min.css"/>
+ <style>
+ body {
+ font-family: "Verdana,Arial,sans-serif";
+ font-size: 0.9em;
+ }
+
+ table {
+ font-family: "Verdana,Arial,sans-serif";
+ font-size: 0.9em;
+ border-width: 1px;
+ border-color: #666666;
+ border-collapse: collapse;
+ }
+ table th {
+ border-width: 1px;
+ padding: 8px;
+ border-style: solid;
+ border-color: #666666;
+ background-color: #dedede;
+ }
+ td {
+ border-width: 1px;
+ padding: 8px;
+ border-style: solid;
+ border-color: #666666;
+ background-color: #ffffff;
+ vertical-align: top;
+ }
+
+ .methods {
+ padding: 5px;
+ }
+
+ .representation-label {
+ font-weight: bold;
+ width: 80px;
+ }
+
+ .ui-widget { font-size: 0.9em; }
+ .ui-tabs-vertical { width: 60em; }
+ .ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 15em; }
+ .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
+ .ui-tabs-vertical .ui-tabs-nav li a { display:block; }
+ .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
+ .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;}
+ </style>
+
+ <script src="{$contextPath}/webjars/jquery/${jquery.version}/jquery.min.js">
+ </script>
+ <script src="{$contextPath}/webjars/jquery-ui/${jquery-ui.version}/ui/minified/jquery-ui.min.js">
+ </script>
+ <script>
+ //<![CDATA[
+ $(function() {
+ //]]>
+ <xsl:for-each select="wadl:resources/wadl:resource">
+ <xsl:sort select="@path"/>
+ <xsl:text>$( "#accordion-</xsl:text>
+ <xsl:value-of select="position()"/>
+ <xsl:text>" ).accordion({
+ collapsible: true,
+ heightStyle: "content",
+ active: false
+ });
+ </xsl:text>
+
+ <xsl:variable name="parentResourcePath" select="translate(@path, '/{}', '___')"/>
+ <xsl:call-template name="dialog-init">
+ <xsl:with-param name="resourcePath" select="$parentResourcePath"/>
+ </xsl:call-template>
+ <xsl:for-each select="wadl:resource">
+ <xsl:variable name="childResourcePath" select="translate(@path, '/{}', '___')"/>
+ <xsl:call-template name="dialog-init">
+ <xsl:with-param name="resourcePath" select="concat($parentResourcePath, $childResourcePath)"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:for-each>
+ //<![CDATA[
+ $( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" );
+ $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
+ });
+
+ /*
+ * hoverIntent | Copyright 2011 Brian Cherne
+ * http://cherne.net/brian/resources/jquery.hoverIntent.html
+ * modified by the jQuery UI team
+ */
+ $.event.special.hoverintent = {
+ setup: function() {
+ $( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
+ },
+ teardown: function() {
+ $( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
+ },
+ handler: function( event ) {
+ var currentX, currentY, timeout,
+ args = arguments,
+ target = $( event.target ),
+ previousX = event.pageX,
+ previousY = event.pageY;
+
+ function track( event ) {
+ currentX = event.pageX;
+ currentY = event.pageY;
+ };
+
+ function clear() {
+ target
+ .unbind( "mousemove", track )
+ .unbind( "mouseout", clear );
+ clearTimeout( timeout );
+ }
+
+ function handler() {
+ var prop,
+ orig = event;
+
+ if ( ( Math.abs( previousX - currentX ) +
+ Math.abs( previousY - currentY ) ) < 7 ) {
+ clear();
+
+ event = $.Event( "hoverintent" );
+ for ( prop in orig ) {
+ if ( !( prop in event ) ) {
+ event[ prop ] = orig[ prop ];
+ }
+ }
+ // Prevent accessing the original event since the new event
+ // is fired asynchronously and the old event is no longer
+ // usable (#6028)
+ delete event.originalEvent;
+
+ target.trigger( event );
+ } else {
+ previousX = currentX;
+ previousY = currentY;
+ timeout = setTimeout( handler, 100 );
+ }
+ }
+
+ timeout = setTimeout( handler, 100 );
+ target.bind({
+ mousemove: track,
+ mouseout: clear
+ });
+ }
+ };
+ //]]>
+ </script>
+ </head>
+ <body>
+ <h1>
+ <xsl:value-of select="wadl:doc/@title"/>
+ </h1>
+
+ <h3>Namespaces</h3>
+ <table>
+ <tr>
+ <th>Prefix</th>
+ <th>URI</th>
+ <th>XSD</th>
+ </tr>
+ <xsl:apply-templates select="wadl:grammars/xs:schema"/>
+ </table>
+
+ <h3>REST resources</h3>
+ <div id="tabs">
+ <ul>
+ <xsl:for-each select="wadl:resources/wadl:resource">
+ <xsl:sort select="@path"/>
+ <li>
+ <a href="#tabs-{position()}">
+ <xsl:value-of select="@path"/>
+ </a>
+ </li>
+ </xsl:for-each>
+ </ul>
+
+ <xsl:apply-templates select="wadl:resources/wadl:resource">
+ <xsl:sort select="@path"/>
+ </xsl:apply-templates>
+ </div>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="dialog-init">
+ <xsl:param name="resourcePath"/>
+
+ <xsl:for-each select="wadl:method">
+ <xsl:text>$(function() {
+ $( "#dialog</xsl:text>
+ <xsl:value-of select="$resourcePath"/>_<xsl:value-of select="position()"/>
+ <xsl:text>" ).dialog({
+ autoOpen: false,
+ modal: true,
+ height: "auto",
+ width: "auto",
+ resizable: false
+ });
+
+ $( "#opener</xsl:text>
+ <xsl:value-of select="$resourcePath"/>_<xsl:value-of select="position()"/>
+ <xsl:text>" ).click(function() {
+ $( "#dialog</xsl:text>
+ <xsl:value-of select="$resourcePath"/>_<xsl:value-of select="position()"/>
+ <xsl:text>" ).dialog( "open" );
+ });
+ });
+ </xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="xs:schema">
+ <xsl:variable name="targetNamespace" select="@targetNamespace"/>
+
+ <xsl:variable name="prefix"
+ select="xalan:nodeset($namespaces)/namespace[@url = $targetNamespace]/@prefix"/>
+
+ <tr>
+ <td>
+ <xsl:value-of select="$prefix"/>
+ </td>
+ <td>
+ <xsl:value-of select="@targetNamespace"/>
+ </td>
+ <td>
+ <a href="schema_{position()}_{$prefix}.html"
+ onClick="window.open('', 'schema', '', true).focus();" target="schema">
+ <xsl:value-of select="$prefix"/>.xsd</a>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="wadl:resource">
+ <div id="tabs-{position()}">
+ <h2>
+ <xsl:value-of select="@path"/>
+ </h2>
+
+ <xsl:if test="string-length(wadl:doc) > 0">
+ <p>
+ <xsl:value-of select="wadl:doc/text()" disable-output-escaping="yes"/>
+ </p>
+ </xsl:if>
+
+ <xsl:call-template name="parameters"/>
+
+ <xsl:call-template name="methods">
+ <xsl:with-param name="resourcePath" select="@path"/>
+ </xsl:call-template>
+
+ <xsl:variable name="parentPath" select="@path"/>
+ <div id="accordion-{position()}">
+ <xsl:for-each select="descendant::*[local-name() = 'resource']">
+ <xsl:sort select="@path"/>
+ <xsl:call-template name="subresource">
+ <xsl:with-param name="parentPath" select="$parentPath"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </div>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="methods">
+ <xsl:param name="resourcePath"/>
+
+ <xsl:variable name="escapedPath" select="translate($resourcePath, '/{}', '___')"/>
+ <div class="methods">
+ <xsl:for-each select="wadl:method">
+ <button id="opener{$escapedPath}_{position()}">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="string-length(@id) > 0">
+ <br/>
+ (<em>
+ <xsl:value-of select="@id"/>
+ </em>)
+ </xsl:if>
+ </button>
+ <div id="dialog{$escapedPath}_{position()}" title="{@name} {$resourcePath}">
+ <xsl:apply-templates select="."/>
+ </div>
+ </xsl:for-each>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="subresource">
+ <xsl:param name="parentPath"/>
+
+ <h3>
+ <xsl:value-of select="@path"/>
+ </h3>
+
+ <div>
+ <xsl:if test="string-length(wadl:doc) > 0">
+ <p>
+ <xsl:value-of select="wadl:doc/text()" disable-output-escaping="yes"/>
+ </p>
+ </xsl:if>
+
+ <xsl:call-template name="parameters"/>
+
+ <xsl:call-template name="methods">
+ <xsl:with-param name="resourcePath" select="concat($parentPath, @path)"/>
+ </xsl:call-template>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="wadl:method">
+ <xsl:if test="string-length(wadl:doc) > 0">
+ <p>
+ <xsl:value-of select="wadl:doc/text()" disable-output-escaping="yes"/>
+ </p>
+ </xsl:if>
+
+ <xsl:if test="count(wadl:request/@*) + count(wadl:request/*) > 0">
+ <xsl:apply-templates select="wadl:request"/>
+ </xsl:if>
+ <xsl:if test="count(wadl:response/@*) + count(wadl:response/*) > 0">
+ <xsl:apply-templates select="wadl:response"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="wadl:request|wadl:response">
+ <xsl:call-template name="parameters"/>
+
+ <h4>
+ R<xsl:value-of select="substring-after(local-name(), 'r')"/>
+ </h4>
+
+ <xsl:if test="string-length(wadl:doc) > 0">
+ <p>
+ <xsl:value-of select="wadl:doc/text()" disable-output-escaping="yes"/>
+ </p>
+ </xsl:if>
+
+ <table>
+ <xsl:if test="string-length(@status) >0 ">
+ <tr>
+ <td class="representation-label">Status</td>
+ <td>
+ <xsl:value-of select="@status"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="count(wadl:representation) > 0">
+ <tr>
+ <td class="representation-label">Content type</td>
+ <td>
+ <xsl:if test="count(wadl:representation/@element) > 0">
+ <xsl:choose>
+ <xsl:when test="starts-with(wadl:representation/@element, 'xs:')">
+ <xsl:value-of select="wadl:representation/@element"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="schema-prefix"
+ select="substring-before(wadl:representation/@element, ':')"/>
+ <xsl:variable name="nsURL"
+ select="xalan:nodeset($namespaces)/namespace[@prefix = $schema-prefix]/@url"/>
+ <xsl:variable name="schema-position"
+ select="xalan:nodeset($namespacePos)/namespace[@url = $nsURL]/@position"/>
+
+ <a href="schema_{$schema-position}_{$schema-prefix}.html#{substring-after(wadl:representation/@element, ':')}"
+ onClick="window.open('', 'schema', '', true).focus();" target="schema">
+ <xsl:value-of select="wadl:representation/@element"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="count(wadl:representation/wadl:param) > 0">
+ <xsl:value-of select="wadl:representation/wadl:param/@type"/>
+ </xsl:if>
+ <xsl:if test="count(wadl:representation/wadl:doc) > 0">
+ <br/>
+ <xsl:value-of select="wadl:representation/wadl:doc/text()" disable-output-escaping="yes"/>
+ </xsl:if>
+ </td>
+ </tr>
+ <tr>
+ <td class="representation-label">Media types</td>
+ <td>
+ <xsl:for-each select="wadl:representation">
+ <xsl:value-of select="@mediaType"/>
+ <br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="parameters">
+ <xsl:if test="count(wadl:param) > 0">
+ <h5>Parameters</h5>
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Style</th>
+ <th>Type</th>
+ <th>Default</th>
+ </tr>
+ <xsl:for-each select="wadl:param">
+ <tr>
+ <td>
+ <xsl:value-of select="@name"/>
+ </td>
+ <td>
+ <xsl:value-of select="wadl:doc/text()" disable-output-escaping="yes"/>
+ </td>
+ <td>
+ <xsl:value-of select="@style"/>
+ </td>
+ <td>
+ <xsl:value-of select="@type"/>
+ <xsl:if test="count(wadl:option) > 0">
+ <ul>
+ <xsl:for-each select="wadl:option">
+ <li>
+ <xsl:value-of select="@value"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </td>
+ <td>
+ <xsl:value-of select="@default"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/rest-cxf/src/main/resources/wadl2html/schema.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/rest-cxf/src/main/resources/wadl2html/schema.xsl b/syncope620/server/rest-cxf/src/main/resources/wadl2html/schema.xsl
new file mode 100644
index 0000000..6551d09
--- /dev/null
+++ b/syncope620/server/rest-cxf/src/main/resources/wadl2html/schema.xsl
@@ -0,0 +1,148 @@
+<?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:wadl="http://wadl.dev.java.net/2009/02"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ exclude-result-prefixes="wadl xs"
+ version="1.0">
+
+ <xsl:strip-space elements="*"/>
+
+ <xsl:param name="contextPath"/>
+ <xsl:param name="schema-position"/>
+ <xsl:param name="schema-prefix"/>
+
+ <xsl:template match="/wadl:application">
+ <html lang="en">
+ <head>
+ <meta charset="utf-8"/>
+ <title>
+ <xsl:value-of select="wadl:doc/@title"/>
+ </title>
+
+ <link rel="stylesheet" href="{$contextPath}/webjars/highlightjs/${highlightjs.version}/styles/default.min.css"/>
+
+ <script src="{$contextPath}/webjars/highlightjs/${highlightjs.version}/highlight.min.js">
+ </script>
+ <script>
+ hljs.initHighlightingOnLoad();
+ </script>
+ </head>
+ <body>
+ <pre>
+ <code class="xml">
+ <xsl:apply-templates select="//xs:schema[position() = $schema-position]" mode="verb"/>
+ </code>
+ </pre>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="*|@*" mode="verb">
+ <xsl:variable name="node-type">
+ <xsl:call-template name="node-type"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$node-type='element'">
+ <xsl:for-each select="ancestor::node()">
+ <xsl:if test="position() > 3">
+ <xsl:text>  </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:choose>
+ <xsl:when test="name() = 'xs:complexType' or name() = 'xs:simpleType'">
+ <a name="int_{@name}">
+ <xsl:text><</xsl:text>
+ <xsl:value-of select="name()"/>
+ </a>
+ </xsl:when>
+ <xsl:when test="name() = 'xs:element'">
+ <a name="{@name}">
+ <xsl:text><</xsl:text>
+ <xsl:value-of select="name()"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text><</xsl:text>
+ <xsl:value-of select="name()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates select="@*" mode="verb"/>
+
+ <xsl:choose>
+ <xsl:when test="count(descendant::node()) = 0">
+ <xsl:text>/> </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>> </xsl:text>
+
+ <xsl:apply-templates mode="verb"/>
+
+ <xsl:for-each select="ancestor::node()">
+ <xsl:if test="position() > 3">
+ <xsl:text>  </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:text></</xsl:text>
+ <xsl:value-of select="name()"/>
+ <xsl:text>> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$node-type='text'">
+ <xsl:value-of select="self::text()"/>
+ </xsl:when>
+ <xsl:when test="$node-type='attribute'">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name()"/>
+ <xsl:text>="</xsl:text>
+ <xsl:choose>
+ <xsl:when test="contains(., ':') and not(starts-with(., 'xs:'))">
+ <a>
+ <xsl:variable name="current" select="."/>
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="name() = 'ref'">#<xsl:value-of select="substring-after($current, ':')"/></xsl:when>
+ <xsl:otherwise>#int_<xsl:value-of select="substring-after($current, ':')"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:value-of select="$current"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>"</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="node-type">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="nodetype" select="$node"/>
+ </xsl:template>
+ <xsl:template mode="nodetype" match="*">element</xsl:template>
+ <xsl:template mode="nodetype" match="@*">attribute</xsl:template>
+ <xsl:template mode="nodetype" match="text()">text</xsl:template>
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/workflow-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/workflow-api/pom.xml b/syncope620/server/workflow-api/pom.xml
index a36e65e..4108c85 100644
--- a/syncope620/server/workflow-api/pom.xml
+++ b/syncope620/server/workflow-api/pom.xml
@@ -30,7 +30,7 @@ under the License.
<name>Apache Syncope Server Workflow API</name>
<description>Apache Syncope Server Workflow API</description>
<groupId>org.apache.syncope.server</groupId>
- <artifactId>syncope-workflow-api</artifactId>
+ <artifactId>syncope-server-workflow-api</artifactId>
<packaging>jar</packaging>
<properties>
@@ -40,7 +40,7 @@ under the License.
<dependencies>
<dependency>
<groupId>org.apache.syncope.server</groupId>
- <artifactId>syncope-provisioning-api</artifactId>
+ <artifactId>syncope-server-provisioning-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/workflow-java/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/workflow-java/pom.xml b/syncope620/server/workflow-java/pom.xml
index 1595c44..541a541 100644
--- a/syncope620/server/workflow-java/pom.xml
+++ b/syncope620/server/workflow-java/pom.xml
@@ -30,7 +30,7 @@ under the License.
<name>Apache Syncope Server Workflow Java</name>
<description>Apache Syncope Server Workflow Java</description>
<groupId>org.apache.syncope.server</groupId>
- <artifactId>syncope-workflow-java</artifactId>
+ <artifactId>syncope-server-workflow-java</artifactId>
<packaging>jar</packaging>
<properties>
@@ -49,7 +49,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>
</dependencies>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/workflow-java/src/main/resources/workflow.properties
----------------------------------------------------------------------
diff --git a/syncope620/server/workflow-java/src/main/resources/workflow.properties b/syncope620/server/workflow-java/src/main/resources/workflow.properties
new file mode 100644
index 0000000..a72e766
--- /dev/null
+++ b/syncope620/server/workflow-java/src/main/resources/workflow.properties
@@ -0,0 +1,18 @@
+# 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.
+uwfAdapter=org.apache.syncope.server.workflow.java.DefaultUserWorkflowAdapter
+rwfAdapter=org.apache.syncope.server.workflow.java.DefaultRoleWorkflowAdapter
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/workflow-java/src/main/resources/workflowContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/workflow-java/src/main/resources/workflowContext.xml b/syncope620/server/workflow-java/src/main/resources/workflowContext.xml
new file mode 100644
index 0000000..9323891
--- /dev/null
+++ b/syncope620/server/workflow-java/src/main/resources/workflowContext.xml
@@ -0,0 +1,28 @@
+<?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"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean class="${uwfAdapter}"/>
+ <bean class="${rwfAdapter}"/>
+
+</beans>
[5/5] syncope git commit: [SYNCOPE-620] FIT module is in,
now time for importing integration tests
Posted by il...@apache.org.
[SYNCOPE-620] FIT module is in, now time for importing integration tests
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b015c443
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b015c443
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b015c443
Branch: refs/heads/2_0_X
Commit: b015c443b57c01349b61bc490594626451e5b364
Parents: ad98b98
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 14 17:38:08 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 14 17:38:08 2015 +0100
----------------------------------------------------------------------
.../apache/syncope/common/lib/package-info.java | 22 +
.../syncope/common/lib/search/package-info.java | 23 +
.../syncope/common/lib/types/package-info.java | 23 +
syncope620/common/rest-api/pom.xml | 14 +
syncope620/fit/build-tools/pom.xml | 138 ++++++
.../fit/buildtools/ApacheDSRootDseServlet.java | 99 ++++
.../buildtools/ApacheDSStartStopListener.java | 277 +++++++++++
.../fit/buildtools/ConnIdStartStopListener.java | 105 ++++
.../fit/buildtools/H2StartStopListener.java | 82 ++++
.../fit/buildtools/LdifInputStreamLoader.java | 131 +++++
.../fit/buildtools/ServiceTimeoutServlet.java | 105 ++++
.../src/main/resources/buildToolsContext.xml | 58 +++
.../build-tools/src/main/resources/content.ldif | 57 +++
.../build-tools/src/main/resources/log4j2.xml | 39 ++
.../build-tools/src/main/resources/testdb.sql | 46 ++
.../build-tools/src/main/webapp/WEB-INF/web.xml | 60 +++
syncope620/fit/pom.xml | 41 ++
syncope620/fit/reference/pom.xml | 310 ++++++++++++
.../src/main/resources/connid.properties | 18 +
.../reference/src/main/resources/context.xml | 23 +
.../fit/reference/src/main/resources/log4j2.xml | 129 +++++
.../src/main/resources/serverContext.xml | 55 +++
.../reference/src/main/webapp/cacheStats.jsp | 190 ++++++++
syncope620/fit/reference/src/main/webapp/db.jsp | 36 ++
syncope620/pom.xml | 178 ++++++-
syncope620/server/logic/pom.xml | 6 +-
.../syncope/server/logic/ReportLogic.java | 4 +-
.../init/ImplementationClassNamesLoader.java | 11 +-
.../server/logic/init/JobInstanceLoader.java | 224 +--------
.../logic/init/JobInstanceLoaderImpl.java | 270 +++++++++++
.../syncope/server/logic/init/LoggerLoader.java | 98 ++++
.../server/logic/init/LogicInitializer.java | 73 +++
.../logic/init/WorkflowAdapterLoader.java | 9 +-
.../src/main/resources/report/report2csv.xsl | 36 ++
.../src/main/resources/report/report2fo.xsl | 97 ++++
.../src/main/resources/report/report2html.xsl | 77 +++
.../main/resources/report/roleReportlet2csv.xsl | 118 +++++
.../main/resources/report/roleReportlet2fo.xsl | 228 +++++++++
.../resources/report/roleReportlet2html.xsl | 196 ++++++++
.../resources/report/staticReportlet2csv.xsl | 81 ++++
.../resources/report/staticReportlet2fo.xsl | 84 ++++
.../resources/report/staticReportlet2html.xsl | 74 +++
.../main/resources/report/userReportlet2csv.xsl | 119 +++++
.../main/resources/report/userReportlet2fo.xsl | 247 ++++++++++
.../resources/report/userReportlet2html.xsl | 219 +++++++++
.../syncope/server/logic/NotificationTest.java | 1 +
.../logic/src/test/resources/logicTest.xml | 5 +-
syncope620/server/misc/pom.xml | 11 +-
.../misc/src/main/resources/securityContext.xml | 68 +++
syncope620/server/persistence-api/pom.xml | 2 +-
.../server/persistence/api/SyncopeLoader.java | 35 ++
.../persistence/api/content/ContentLoader.java | 4 +-
syncope620/server/persistence-jpa/pom.xml | 4 +-
.../jpa/content/XMLContentLoader.java | 5 +
.../jpa/entity/JPAEntityFactory.java | 3 +
.../src/main/resources/persistence.properties | 3 +-
.../src/main/resources/persistenceContext.xml | 8 +-
.../src/test/resources/content.xml | 8 +-
.../src/test/resources/persistence.properties | 3 +-
syncope620/server/provisioning-api/pom.xml | 9 +-
.../provisioning/api/ConnectorFactory.java | 6 +-
syncope620/server/provisioning-java/pom.xml | 8 +-
.../provisioning/java/ConnectorManager.java | 5 +
.../src/main/resources/mail.properties | 3 +-
.../src/main/resources/provisioningContext.xml | 2 +-
.../server/provisioning/java/AbstractTest.java | 1 +
.../src/test/resources/provisioningTest.xml | 4 +-
syncope620/server/rest-cxf/pom.xml | 33 +-
.../rest/cxf/ThreadLocalCleanupListener.java | 44 ++
.../syncope/server/rest/cxf/WADLServlet.java | 96 ++++
.../main/resources/META-INF/web-fragment.xml | 89 ++++
.../src/main/resources/restCXFContext.xml | 4 +-
.../src/main/resources/wadl2html/index.xsl | 484 +++++++++++++++++++
.../src/main/resources/wadl2html/schema.xsl | 148 ++++++
syncope620/server/workflow-api/pom.xml | 4 +-
syncope620/server/workflow-java/pom.xml | 4 +-
.../src/main/resources/workflow.properties | 18 +
.../src/main/resources/workflowContext.xml | 28 ++
78 files changed, 5396 insertions(+), 284 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
new file mode 100644
index 0000000..8eac5d5
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib;
+
+import javax.xml.bind.annotation.XmlSchema;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
new file mode 100644
index 0000000..ff6b5e7
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.search;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
new file mode 100644
index 0000000..80cb87f
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/common/rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/pom.xml b/syncope620/common/rest-api/pom.xml
index 137bfea..967573e 100644
--- a/syncope620/common/rest-api/pom.xml
+++ b/syncope620/common/rest-api/pom.xml
@@ -69,6 +69,20 @@ under the License.
<build>
<plugins>
+ <!-- Generating javadoc JAR artifact for usage with CXF's WADL generator (for server) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/pom.xml b/syncope620/fit/build-tools/pom.xml
new file mode 100644
index 0000000..04bfe8b
--- /dev/null
+++ b/syncope620/fit/build-tools/pom.xml
@@ -0,0 +1,138 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-fit</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope FIT Build Tools</name>
+ <description>Apache Syncope FIT Build Tools</description>
+ <groupId>org.apache.syncope.fit</groupId>
+ <artifactId>syncope-fit-build-tools</artifactId>
+ <packaging>war</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-all</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.tirasa.connid</groupId>
+ <artifactId>connector-framework</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>net.tirasa.connid</groupId>
+ <artifactId>connector-framework-internal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>net.tirasa.connid</groupId>
+ <artifactId>slf4j-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>net.tirasa.connid.bundles.db</groupId>
+ <artifactId>net.tirasa.connid.bundles.db.table</artifactId>
+ <version>${connid.db.table.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <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/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java
new file mode 100644
index 0000000..bfdbdde
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSRootDseServlet.java
@@ -0,0 +1,99 @@
+/*
+ * 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.fit.buildtools;
+
+import java.io.PrintWriter;
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.directory.server.core.api.DirectoryService;
+import org.apache.directory.server.core.jndi.CoreContextFactory;
+
+public class ApacheDSRootDseServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1514567335969002735L;
+
+ @Override
+ protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException {
+
+ try {
+ resp.setContentType("text/plain");
+ PrintWriter out = resp.getWriter();
+
+ out.println("*** ApacheDS RootDSE ***\n");
+
+ DirContext ctx = new InitialDirContext(this.createEnv());
+
+ SearchControls ctls = new SearchControls();
+ ctls.setReturningAttributes(new String[] { "*", "+" });
+ ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+
+ NamingEnumeration<SearchResult> result = ctx.search("", "(objectClass=*)", ctls);
+ if (result.hasMore()) {
+ SearchResult entry = result.next();
+ Attributes as = entry.getAttributes();
+
+ NamingEnumeration<String> ids = as.getIDs();
+ while (ids.hasMore()) {
+ String id = ids.next();
+ Attribute attr = as.get(id);
+ for (int i = 0; i < attr.size(); ++i) {
+ out.println(id + ": " + attr.get(i));
+ }
+ }
+ }
+ ctx.close();
+
+ out.flush();
+ } catch (Exception e) {
+ throw new ServletException(e);
+ }
+ }
+
+ /**
+ * Creates an environment configuration for JNDI access.
+ */
+ private Hashtable<Object, Object> createEnv() {
+ // Fetch directory service from servlet context
+ ServletContext servletContext = this.getServletContext();
+ DirectoryService directoryService = (DirectoryService) servletContext.getAttribute(DirectoryService.JNDI_KEY);
+
+ Hashtable<Object, Object> env = new Hashtable<>();
+ env.put(DirectoryService.JNDI_KEY, directoryService);
+ env.put(Context.PROVIDER_URL, "");
+ env.put(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
+
+ env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
+ env.put(Context.SECURITY_CREDENTIALS, "secret");
+ env.put(Context.SECURITY_AUTHENTICATION, "simple");
+
+ return env;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java
new file mode 100644
index 0000000..6c2b7b2
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ApacheDSStartStopListener.java
@@ -0,0 +1,277 @@
+/*
+ * 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.fit.buildtools;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.model.schema.registries.SchemaLoader;
+import org.apache.directory.api.ldap.schemaextractor.SchemaLdifExtractor;
+import org.apache.directory.api.ldap.schemaextractor.impl.DefaultSchemaLdifExtractor;
+import org.apache.directory.api.ldap.schemaloader.LdifSchemaLoader;
+import org.apache.directory.api.ldap.schemamanager.impl.DefaultSchemaManager;
+import org.apache.directory.api.util.exception.Exceptions;
+import org.apache.directory.server.constants.ServerDNConstants;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.core.api.CacheService;
+import org.apache.directory.server.core.api.DirectoryService;
+import org.apache.directory.server.core.api.DnFactory;
+import org.apache.directory.server.core.api.InstanceLayout;
+import org.apache.directory.server.core.api.partition.Partition;
+import org.apache.directory.server.core.api.schema.SchemaPartition;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
+import org.apache.directory.server.core.partition.ldif.LdifPartition;
+import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.protocol.shared.transport.TcpTransport;
+import org.apache.directory.server.xdbm.Index;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.io.Resource;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Start and stop an embedded ApacheDS instance alongside with Servlet Context.
+ */
+public class ApacheDSStartStopListener implements ServletContextListener {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ApacheDSStartStopListener.class);
+
+ private DirectoryService service;
+
+ private LdapServer server;
+
+ /**
+ * Add a new partition to the server.
+ *
+ * @param partitionId The partition Id
+ * @param partitionDn The partition DN
+ * @param dnFactory the DN factory
+ * @return The newly added partition
+ * @throws Exception If the partition can't be added
+ */
+ private Partition addPartition(final String partitionId, final String partitionDn, final DnFactory dnFactory)
+ throws Exception {
+
+ // Create a new partition with the given partition id
+ JdbmPartition partition = new JdbmPartition(service.getSchemaManager(), dnFactory);
+ partition.setId(partitionId);
+ partition.setPartitionPath(new File(service.getInstanceLayout().getPartitionsDirectory(), partitionId).toURI());
+ partition.setSuffixDn(new Dn(partitionDn));
+ service.addPartition(partition);
+
+ return partition;
+ }
+
+ /**
+ * Add a new set of index on the given attributes.
+ *
+ * @param partition The partition on which we want to add index
+ * @param attrs The list of attributes to index
+ */
+ private void addIndex(final Partition partition, final String... attrs) {
+ // Index some attributes on the apache partition
+ Set<Index<?, String>> indexedAttributes = new HashSet<>();
+
+ for (String attribute : attrs) {
+ indexedAttributes.add(new JdbmIndex<String>(attribute, false));
+ }
+
+ ((JdbmPartition) partition).setIndexedAttributes(indexedAttributes);
+ }
+
+ /**
+ * Initialize the schema manager and add the schema partition to directory service.
+ *
+ * @throws Exception if the schema LDIF files are not found on the classpath
+ */
+ private void initSchemaPartition() throws Exception {
+ InstanceLayout instanceLayout = service.getInstanceLayout();
+
+ File schemaPartitionDirectory = new File(instanceLayout.getPartitionsDirectory(), "schema");
+
+ // Extract the schema on disk (a brand new one) and load the registries
+ if (schemaPartitionDirectory.exists()) {
+ LOG.debug("schema partition already exists, skipping schema extraction");
+ } else {
+ SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(instanceLayout.getPartitionsDirectory());
+ extractor.extractOrCopy();
+ }
+
+ SchemaLoader loader = new LdifSchemaLoader(schemaPartitionDirectory);
+ SchemaManager schemaManager = new DefaultSchemaManager(loader);
+
+ // We have to load the schema now, otherwise we won't be able
+ // to initialize the Partitions, as we won't be able to parse
+ // and normalize their suffix Dn
+ schemaManager.loadAllEnabled();
+
+ List<Throwable> errors = schemaManager.getErrors();
+ if (!errors.isEmpty()) {
+ throw new IllegalStateException(I18n.err(I18n.ERR_317, Exceptions.printErrors(errors)));
+ }
+
+ service.setSchemaManager(schemaManager);
+
+ // Init the LdifPartition with schema
+ LdifPartition schemaLdifPartition = new LdifPartition(schemaManager, service.getDnFactory());
+ schemaLdifPartition.setPartitionPath(schemaPartitionDirectory.toURI());
+
+ // The schema partition
+ SchemaPartition schemaPartition = new SchemaPartition(schemaManager);
+ schemaPartition.setWrappedPartition(schemaLdifPartition);
+ service.setSchemaPartition(schemaPartition);
+ }
+
+ /**
+ * Initialize the server. It creates the partition, adds the index, and injects the context entries for the created
+ * partitions.
+ *
+ * @param workDir the directory to be used for storing the data
+ * @param loadDefaultContent if default content should be loaded
+ * @throws Exception if there were some problems while initializing
+ */
+ private void initDirectoryService(final ServletContext servletContext, final File workDir,
+ final boolean loadDefaultContent) throws Exception {
+
+ // Initialize the LDAP service
+ service = new DefaultDirectoryService();
+ service.setInstanceLayout(new InstanceLayout(workDir));
+
+ CacheService cacheService = new CacheService();
+ cacheService.initialize(service.getInstanceLayout());
+
+ service.setCacheService(cacheService);
+
+ // first load the schema
+ initSchemaPartition();
+
+ // then the system partition
+ // this is a MANDATORY partition
+ // DO NOT add this via addPartition() method, trunk code complains about duplicate partition
+ // while initializing
+ JdbmPartition systemPartition = new JdbmPartition(service.getSchemaManager(), service.getDnFactory());
+ systemPartition.setId("system");
+ systemPartition.setPartitionPath(
+ new File(service.getInstanceLayout().getPartitionsDirectory(), systemPartition.getId()).toURI());
+ systemPartition.setSuffixDn(new Dn(ServerDNConstants.SYSTEM_DN));
+ systemPartition.setSchemaManager(service.getSchemaManager());
+
+ // mandatory to call this method to set the system partition
+ // Note: this system partition might be removed from trunk
+ service.setSystemPartition(systemPartition);
+
+ // Disable the ChangeLog system
+ service.getChangeLog().setEnabled(false);
+ service.setDenormalizeOpAttrsEnabled(true);
+
+ // Now we can create as many partitions as we need
+ Partition ispPartition = addPartition("isp", "o=isp", service.getDnFactory());
+
+ // Index some attributes on the apache partition
+ addIndex(ispPartition, "objectClass", "ou", "uid");
+
+ // And start the service
+ service.startup();
+
+ if (loadDefaultContent) {
+ Resource contentLdif = WebApplicationContextUtils.getWebApplicationContext(servletContext).
+ getResource("classpath:/content.ldif");
+ LdifInputStreamLoader contentLoader = new LdifInputStreamLoader(service.getAdminSession(),
+ contentLdif.getInputStream());
+ int numEntries = contentLoader.execute();
+ LOG.info("Successfully created {} entries", numEntries);
+ }
+ }
+
+ /**
+ * Startup ApacheDS embedded.
+ *
+ * @param sce ServletContext event
+ */
+ @Override
+ public void contextInitialized(final ServletContextEvent sce) {
+ File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
+ workDir = new File(workDir, "server-work");
+
+ final boolean loadDefaultContent = !workDir.exists();
+
+ if (loadDefaultContent && !workDir.mkdirs()) {
+ throw new RuntimeException("Could not create " + workDir.getAbsolutePath());
+ }
+
+ Entry result;
+ try {
+ initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent);
+
+ server = new LdapServer();
+ server.setTransports(new TcpTransport(Integer.valueOf(
+ WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext()).
+ getBean("testds.port", String.class))));
+ server.setDirectoryService(service);
+
+ server.start();
+
+ // store directoryService in context to provide it to servlets etc.
+ sce.getServletContext().setAttribute(DirectoryService.JNDI_KEY, service);
+
+ result = service.getAdminSession().lookup(new Dn("o=isp"));
+ } catch (Exception e) {
+ LOG.error("Fatal error in context init", e);
+ throw new RuntimeException(e);
+ }
+
+ if (result == null) {
+ throw new RuntimeException("Base DN not found");
+ } else {
+ LOG.info("ApacheDS startup completed succesfully");
+ }
+ }
+
+ /**
+ * Shutdown ApacheDS embedded.
+ *
+ * @param sce ServletContext event
+ */
+ @Override
+ public void contextDestroyed(final ServletContextEvent sce) {
+ try {
+ if (server != null) {
+ server.stop();
+ }
+ if (service != null) {
+ service.shutdown();
+ }
+ } catch (Exception e) {
+ LOG.error("Fatal error in context shutdown", e);
+ throw new RuntimeException(e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java
new file mode 100644
index 0000000..dece02f
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ConnIdStartStopListener.java
@@ -0,0 +1,105 @@
+/*
+ * 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.fit.buildtools;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import org.identityconnectors.common.security.SecurityUtil;
+import org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager;
+import org.identityconnectors.framework.server.ConnectorServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+public class ConnIdStartStopListener implements ServletContextListener {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ConnIdStartStopListener.class);
+
+ private static final String SERVER = "ConnIdConnectorServer";
+
+ /**
+ * Build list of URLs from bundles available under /WEB-INF/lib
+ *
+ * @param ctx ServletContext needed for getting ConnId jar bundles URLs
+ */
+ private List<URL> getBundleURLs(final ServletContext ctx) {
+ final List<URL> bundleURLs = new ArrayList<>();
+
+ for (String bundleFile : new String[] {
+ "testconnectorserver.soap.bundle",
+ "testconnectorserver.db.bundle",
+ "testconnectorserver.csvdir.bundle",
+ "testconnectorserver.ldap.bundle" }) {
+
+ URL url = null;
+ try {
+ url = ctx.getResource("/WEB-INF/lib/"
+ + WebApplicationContextUtils.getWebApplicationContext(ctx).getBean(bundleFile, String.class));
+ } catch (MalformedURLException e) {
+ // ignore
+ }
+ if (url != null) {
+ bundleURLs.add(url);
+ }
+ }
+
+ LOG.info("ConnId bundles loaded: " + bundleURLs);
+
+ return bundleURLs;
+ }
+
+ @Override
+ public void contextInitialized(final ServletContextEvent sce) {
+ ConnectorServer _server = ConnectorServer.newInstance();
+ WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());
+ try {
+ _server.setPort(Integer.parseInt(ctx.getBean("testconnectorserver.port", String.class)));
+
+ _server.setBundleURLs(getBundleURLs(sce.getServletContext()));
+
+ _server.setKeyHash(SecurityUtil.computeBase64SHA1Hash(
+ ctx.getBean("testconnectorserver.key", String.class).toCharArray()));
+
+ _server.start();
+ LOG.info("ConnId connector server listening on port " + _server.getPort());
+ } catch (Exception e) {
+ LOG.error("Could not start ConnId connector server", e);
+ }
+
+ sce.getServletContext().setAttribute(SERVER, _server);
+ }
+
+ @Override
+ public void contextDestroyed(final ServletContextEvent sce) {
+ final ConnectorServer _server = (ConnectorServer) sce.getServletContext().getAttribute(SERVER);
+ if (_server != null && _server.isStarted()) {
+ _server.stop();
+ }
+ ThreadClassLoaderManager.clearInstance();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java
new file mode 100644
index 0000000..feee732
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/H2StartStopListener.java
@@ -0,0 +1,82 @@
+/*
+ * 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.fit.buildtools;
+
+import java.sql.SQLException;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.sql.DataSource;
+import org.h2.tools.Server;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.datasource.init.DataSourceInitializer;
+import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Utility servlet context listener managing H2 test server instance (to be used as external resource).
+ */
+public class H2StartStopListener implements ServletContextListener {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(H2StartStopListener.class);
+
+ private static final String H2_TESTDB = "h2TestDb";
+
+ @Override
+ public void contextInitialized(final ServletContextEvent sce) {
+ ServletContext context = sce.getServletContext();
+ WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
+
+ try {
+ Server h2TestDb = new Server();
+ h2TestDb.runTool("-tcp", "-tcpDaemon", "-web", "-webDaemon",
+ "-webPort", ctx.getBean("testdb.webport", String.class));
+
+ context.setAttribute(H2_TESTDB, h2TestDb);
+ } catch (SQLException e) {
+ LOG.error("Could not start H2 test db", e);
+ }
+
+ DataSource datasource = ctx.getBean(DataSource.class);
+
+ ResourceDatabasePopulator populator = new ResourceDatabasePopulator(ctx.getResource("classpath:/testdb.sql"));
+ populator.setSqlScriptEncoding("UTF-8");
+ DataSourceInitializer init = new DataSourceInitializer();
+ init.setDataSource(datasource);
+ init.setEnabled(true);
+ init.setDatabasePopulator(populator);
+ init.afterPropertiesSet();
+ LOG.info("Database successfully initialized");
+ }
+
+ @Override
+ public void contextDestroyed(final ServletContextEvent sce) {
+ final ServletContext context = sce.getServletContext();
+
+ final Server h2TestDb = (Server) context.getAttribute(H2_TESTDB);
+ if (h2TestDb != null) {
+ h2TestDb.shutdown();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java
new file mode 100644
index 0000000..fd9e9e4
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/LdifInputStreamLoader.java
@@ -0,0 +1,131 @@
+/*
+ * 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.fit.buildtools;
+
+import java.io.InputStream;
+import java.util.List;
+import org.apache.commons.io.IOUtils;
+import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.entry.Modification;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.ldif.LdifEntry;
+import org.apache.directory.api.ldap.model.ldif.LdifReader;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LdifInputStreamLoader {
+
+ /**
+ * The log for this class.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(LdifInputStreamLoader.class);
+
+ /**
+ * A handle on the top core session.
+ */
+ protected CoreSession coreSession;
+
+ /**
+ * The LDIF input stream file containing LDIFs to load.
+ */
+ protected InputStream ldif;
+
+ /**
+ * the total count of entries loaded
+ */
+ private int count;
+
+ /**
+ * Creates a new instance of LdifFileLoader.
+ *
+ * @param coreSession the context to load the entries into.
+ * @param ldif the file of LDIF entries to load.
+ */
+ public LdifInputStreamLoader(final CoreSession coreSession, final InputStream ldif) {
+ this(coreSession, ldif, null);
+ }
+
+ /**
+ * Creates a new instance of LdifFileLoader.
+ *
+ * @param coreSession
+ * @param ldif
+ * @param filters
+ */
+ public LdifInputStreamLoader(
+ final CoreSession coreSession, final InputStream ldif, final List<? extends LdifLoadFilter> filters) {
+
+ this.coreSession = coreSession;
+ this.ldif = ldif;
+ }
+
+ /**
+ * Opens the LDIF file and loads the entries into the context.
+ *
+ * @return The count of entries created.
+ */
+ public int execute() {
+ try {
+ try {
+ for (LdifEntry ldifEntry : new LdifReader(ldif)) {
+ Dn dn = ldifEntry.getDn();
+
+ if (ldifEntry.isEntry()) {
+ Entry entry = ldifEntry.getEntry();
+
+ try {
+ coreSession.lookup(dn);
+ LOG.debug("Found {}, will not create.", dn);
+ } catch (Exception e) {
+ try {
+ coreSession.add(
+ new DefaultEntry(coreSession.getDirectoryService().getSchemaManager(), entry));
+ count++;
+ LOG.debug("Created {}.", dn);
+ } catch (LdapException e1) {
+ LOG.error("Could not create entry " + entry, e1);
+ }
+ }
+ } else {
+ //modify
+ List<Modification> items = ldifEntry.getModifications();
+
+ try {
+ coreSession.modify(dn, items);
+ LOG.debug("Modified: " + dn + " with modificationItems: " + items);
+ } catch (LdapException e) {
+ LOG.debug("Could not modify: " + dn + " with modificationItems: " + items, e);
+ }
+ }
+ }
+ } finally {
+ IOUtils.closeQuietly(ldif);
+ }
+ } catch (Exception ioe) {
+ LOG.error(I18n.err(I18n.ERR_174), ioe);
+ }
+
+ return count;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java
new file mode 100644
index 0000000..dcfe72e
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/java/org/apache/syncope/fit/buildtools/ServiceTimeoutServlet.java
@@ -0,0 +1,105 @@
+/*
+ * 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.fit.buildtools;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Just used to verify a connector request timeout.
+ */
+public class ServiceTimeoutServlet extends HttpServlet {
+
+ private static final long serialVersionUID = -1467488672392710293L;
+
+ /**
+ * Processes requests for both HTTP
+ * <code>GET</code> and
+ * <code>POST</code> methods.
+ *
+ * @param request servlet request
+ * @param response servlet response
+ * @throws ServletException if a servlet-specific error occurs
+ * @throws IOException if an I/O error occurs
+ */
+ protected void processRequest(final HttpServletRequest request, final HttpServletResponse response)
+ throws ServletException, IOException {
+
+ response.setContentType("text/html;charset=UTF-8");
+
+ try {
+ Thread.sleep(60000);
+ } catch (InterruptedException ignore) {
+ // ignore
+ }
+
+ final PrintWriter out = response.getWriter();
+ try {
+ out.println("OK");
+ } finally {
+ out.close();
+ }
+ }
+
+ /**
+ * 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 {
+
+ processRequest(request, response);
+ }
+
+ /**
+ * Handles the HTTP
+ * <code>POST</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 doPost(final HttpServletRequest request, final HttpServletResponse response)
+ throws ServletException, IOException {
+
+ processRequest(request, response);
+ }
+
+ /**
+ * Returns a short description of the servlet.
+ *
+ * @return a String containing servlet description
+ */
+ @Override
+ public String getServletInfo() {
+ return "Service Timeout";
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml b/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml
new file mode 100644
index 0000000..2b63ed6
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/buildToolsContext.xml
@@ -0,0 +1,58 @@
+<?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"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="testDataSource"
+ class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+ <property name="driverClassName" value="${testdb.driver}"/>
+ <property name="url" value="${testdb.url}"/>
+ <property name="username" value="${testdb.username}"/>
+ <property name="password" value="${testdb.password}"/>
+ </bean>
+
+ <bean id="testds.port" class="java.lang.String">
+ <constructor-arg value="${testds.port}"/>
+ </bean>
+ <bean id="testdb.webport" class="java.lang.String">
+ <constructor-arg value="${testdb.webport}"/>
+ </bean>
+ <bean id="testconnectorserver.port" class="java.lang.String">
+ <constructor-arg value="${testconnectorserver.port}"/>
+ </bean>
+ <bean id="testconnectorserver.key" class="java.lang.String">
+ <constructor-arg value="${testconnectorserver.key}"/>
+ </bean>
+ <bean id="testconnectorserver.soap.bundle" class="java.lang.String">
+ <constructor-arg value="net.tirasa.connid.bundles.soap-${connid.soap.version}.jar"/>
+ </bean>
+ <bean id="testconnectorserver.db.bundle" class="java.lang.String">
+ <constructor-arg value="net.tirasa.connid.bundles.db.table-${connid.db.table.version}.jar"/>
+ </bean>
+ <bean id="testconnectorserver.csvdir.bundle" class="java.lang.String">
+ <constructor-arg value="net.tirasa.connid.bundles.csvdir-${connid.csvdir.version}.jar"/>
+ </bean>
+ <bean id="testconnectorserver.ldap.bundle" class="java.lang.String">
+ <constructor-arg value="net.tirasa.connid.bundles.ldap-${connid.ldap.version}.jar"/>
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/content.ldif
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/content.ldif b/syncope620/fit/build-tools/src/main/resources/content.ldif
new file mode 100644
index 0000000..aa47af5
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/content.ldif
@@ -0,0 +1,57 @@
+# Licensed 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.
+DN: o=isp
+objectClass: organization
+objectClass: top
+o: isp
+
+DN: ou=People,o=isp
+objectClass: organizationalUnit
+objectClass: top
+ou: People
+
+DN: ou=Groups,o=isp
+objectClass: organizationalUnit
+objectClass: top
+ou: Groups
+
+DN: cn=testLDAPGroup,ou=Groups,o=isp
+objectClass: groupOfUniqueNames
+objectClass: top
+cn: testLDAPGroup
+uniqueMember: uid=admin,ou=system
+uniqueMember: uid=syncFromLDAP,ou=People,o=isp
+owner: uid=syncFromLDAP,ou=People,o=isp
+
+DN: uid=syncFromLDAP,ou=People,o=isp
+objectClass: organizationalPerson
+objectClass: person
+objectClass: inetOrgPerson
+objectClass: top
+cn: syncFromLDAP
+description: Active
+mail: syncFromLDAP@syncope.apache.org
+sn: Surname
+uid: syncFromLDAP
+userpassword:: cGFzc3dvcmQxMjM=
+givenname: syncFromLDAP
+registeredAddress: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
+jpegPhoto:: /9j/4AAQSkZJRgABAQEBKwErAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH
+ BwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQk
+ UDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wg
+ ARCAAEAAQDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQBAQAAAAAAAAAAAAAAA
+ AAAAAD/2gAMAwEAAhADEAAAAUuf/8QAFhABAQEAAAAAAAAAAAAAAAAAAwAS/9oACAEBAAEFAiLV
+ /8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/
+ aAAgBAgEBPwF//8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABESEiQf/aAAgBAQAGPwI9k2orq//EAB
+ kQAAMAAwAAAAAAAAAAAAAAAAERIQBBYf/aAAgBAQABPyF20CYlpT3P/9oADAMBAAIAAwAAABCf/
+ 8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
+ AAgBAgEBPxB//8QAGhABAAIDAQAAAAAAAAAAAAAAAREhAEFRYf/aAAgBAQABPxCUKGDcAUFrvhoz/9k=
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/log4j2.xml b/syncope620/fit/build-tools/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..ffe88f6
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/log4j2.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<configuration status="WARN">
+
+ <appenders>
+
+ <Console name="main" target="SYSTEM_OUT">
+ <PatternLayout>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+ </PatternLayout>
+ </Console>
+
+ </appenders>
+
+ <loggers>
+
+ <root level="INFO">
+ <appender-ref ref="main"/>
+ </root>
+
+ </loggers>
+</configuration>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/resources/testdb.sql
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/resources/testdb.sql b/syncope620/fit/build-tools/src/main/resources/testdb.sql
new file mode 100644
index 0000000..ff4dd47
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/resources/testdb.sql
@@ -0,0 +1,46 @@
+-- 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.
+ALTER USER sa SET PASSWORD '${testdb.password}';
+
+DROP TABLE test IF EXISTS;
+CREATE TABLE test (
+id VARCHAR(50) PRIMARY KEY,
+password VARCHAR(255) NOT NULL,
+status VARCHAR(5));
+
+INSERT INTO test VALUES ('testuser1', 'password', 'false');
+
+-- this table must be created in order to provide a specific test for issueSYNCOPE68
+DROP TABLE test2 IF EXISTS;
+CREATE TABLE test2 (
+id VARCHAR(50) PRIMARY KEY,
+password VARCHAR(255) NOT NULL,
+status VARCHAR(5));
+
+INSERT INTO test2 VALUES ('testuser2', 'password321', 'false');
+INSERT INTO test2 VALUES ('rossini', 'password321', 'true');
+INSERT INTO test2 VALUES ('verdi', 'password321', 'true');
+
+-- this table is for issueSYNCOPE230
+DROP TABLE testsync IF EXISTS;
+CREATE TABLE TESTSYNC (
+id NUMBER(10) PRIMARY KEY,
+username VARCHAR(80),
+surname VARCHAR(80),
+email VARCHAR(80));
+
+INSERT INTO testsync VALUES (965, 'issuesyncope230', 'Surname', 'syncope230@syncope.apache.org');
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml b/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..df3438d
--- /dev/null
+++ b/syncope620/fit/build-tools/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,60 @@
+<?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-app 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-app_3_1.xsd"
+ version="3.1">
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath*:/buildToolsContext.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.apache.syncope.fit.buildtools.ApacheDSStartStopListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.apache.syncope.fit.buildtools.H2StartStopListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.apache.syncope.fit.buildtools.ConnIdStartStopListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>ApacheDSRootDseServlet</servlet-name>
+ <servlet-class>org.apache.syncope.fit.buildtools.ApacheDSRootDseServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ServiceTimeoutServlet</servlet-name>
+ <servlet-class>org.apache.syncope.fit.buildtools.ServiceTimeoutServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ApacheDSRootDseServlet</servlet-name>
+ <url-pattern>/apacheDS</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ServiceTimeoutServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/pom.xml b/syncope620/fit/pom.xml
new file mode 100644
index 0000000..54c847f
--- /dev/null
+++ b/syncope620/fit/pom.xml
@@ -0,0 +1,41 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope FIT</name>
+ <description>Apache Syncope Full Integration Test</description>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-fit</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>build-tools</module>
+ <module>reference</module>
+ </modules>
+
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/pom.xml b/syncope620/fit/reference/pom.xml
new file mode 100644
index 0000000..148c71a
--- /dev/null
+++ b/syncope620/fit/reference/pom.xml
@@ -0,0 +1,310 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-fit</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope FIT Server Reference</name>
+ <description>Apache Syncope FIT Server Reference</description>
+ <groupId>org.apache.syncope.fit</groupId>
+ <artifactId>syncope-fit-server-reference</artifactId>
+ <packaging>war</packaging>
+
+ <properties>
+ <jdbcdriver.groupId>com.h2database</jdbcdriver.groupId>
+ <jdbcdriver.artifactId>h2</jdbcdriver.artifactId>
+
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>javax.servlet.jsp-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.server</groupId>
+ <artifactId>syncope-server-rest-cxf</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.syncope.server</groupId>
+ <artifactId>syncope-server-workflow-java</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.syncope.server</groupId>
+ <artifactId>syncope-server-persistence-jpa</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.fit</groupId>
+ <artifactId>syncope-fit-build-tools</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.tirasa.connid.bundles.soap</groupId>
+ <artifactId>wssample</artifactId>
+ <version>${connid.soap.version}</version>
+ <type>war</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>highlightjs</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>set-bundles</id>
+ <phase>process-test-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <container>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${jdbcdriver.groupId}</groupId>
+ <artifactId>${jdbcdriver.artifactId}</artifactId>
+ </dependency>
+ </dependencies>
+ </container>
+ <configuration>
+ <type>standalone</type>
+ <properties>
+ <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
+ <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
+ <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
+
+ <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+ </properties>
+ <configfiles>
+ <configfile>
+ <file>${project.build.directory}/classes/context.xml</file>
+ <todir>conf/</todir>
+ <tofile>context.xml</tofile>
+ </configfile>
+ </configfiles>
+ </configuration>
+ <deployables>
+ <deployable>
+ <groupId>net.tirasa.connid.bundles.soap</groupId>
+ <artifactId>wssample</artifactId>
+ <type>war</type>
+ <properties>
+ <context>wssample</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <groupId>org.apache.syncope.fit</groupId>
+ <artifactId>syncope-fit-build-tools</artifactId>
+ <type>war</type>
+ <properties>
+ <context>syncope-fit-build-tools</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <location>${project.build.directory}/${project.build.finalName}</location>
+ <pingURL>http://localhost:${cargo.servlet.port}/syncope/cacheStats.jsp</pingURL>
+ <pingTimeout>60000</pingTimeout>
+ <properties>
+ <context>syncope</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>${basedir}/../../server/persistence-jpa/src/test/resources</directory>
+ <includes>
+ <include>content.xml</include>
+ <include>persistence.properties</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>${basedir}/../../server/misc/src/main/resources</directory>
+ <includes>
+ <include>security.properties</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>debug</id>
+
+ <build>
+ <defaultGoal>clean verify cargo:run</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <configuration>
+ <properties>
+ <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+ -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+ </properties>
+ </configuration>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>none</phase>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/connid.properties
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/connid.properties b/syncope620/fit/reference/src/main/resources/connid.properties
new file mode 100644
index 0000000..54d83c3
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/connid.properties
@@ -0,0 +1,18 @@
+# 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.
+connid.locations=${connid.location},\
+connid://${testconnectorserver.key}@localhost:${testconnectorserver.port}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/context.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/context.xml b/syncope620/fit/reference/src/main/resources/context.xml
new file mode 100644
index 0000000..471d561
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/context.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<Context>
+ <!-- Disable session persistence across Tomcat restarts -->
+ <Manager pathname=""/>
+</Context>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/log4j2.xml b/syncope620/fit/reference/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..d8acf8c
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/log4j2.xml
@@ -0,0 +1,129 @@
+<?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.
+-->
+<configuration status="WARN">
+
+ <appenders>
+
+ <RollingRandomAccessFile name="main" fileName="${log.directory}/server.log"
+ filePattern="${log.directory}/server-%d{yyyy-MM-dd}.log.gz"
+ immediateFlush="false" append="true">
+ <PatternLayout>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+ </PatternLayout>
+ <Policies>
+ <TimeBasedTriggeringPolicy/>
+ <SizeBasedTriggeringPolicy size="250 MB"/>
+ </Policies>
+ </RollingRandomAccessFile>
+
+ <RollingRandomAccessFile name="persistence" fileName="${log.directory}/server-persistence.log"
+ filePattern="${log.directory}/server-persistence-%d{yyyy-MM-dd}.log.gz"
+ immediateFlush="false" append="true">
+ <PatternLayout>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+ </PatternLayout>
+ <Policies>
+ <TimeBasedTriggeringPolicy/>
+ <SizeBasedTriggeringPolicy size="250 MB"/>
+ </Policies>
+ </RollingRandomAccessFile>
+
+ <RollingRandomAccessFile name="rest" fileName="${log.directory}/server-rest.log"
+ filePattern="${log.directory}/server-rest-%d{yyyy-MM-dd}.log.gz"
+ immediateFlush="false" append="true">
+ <PatternLayout>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+ </PatternLayout>
+ <Policies>
+ <TimeBasedTriggeringPolicy/>
+ <SizeBasedTriggeringPolicy size="250 MB"/>
+ </Policies>
+ </RollingRandomAccessFile>
+
+ <RollingRandomAccessFile name="connid" fileName="${log.directory}/server-connid.log"
+ filePattern="${log.directory}/server-connid-%d{yyyy-MM-dd}.log.gz"
+ immediateFlush="false" append="true">
+ <PatternLayout>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %msg%n</pattern>
+ </PatternLayout>
+ <Policies>
+ <TimeBasedTriggeringPolicy/>
+ <SizeBasedTriggeringPolicy size="250 MB"/>
+ </Policies>
+ </RollingRandomAccessFile>
+
+ <!-- Audit -->
+ <Jdbc name="audit" tableName="SYNCOPEAUDIT">
+ <ConnectionFactory class="org.apache.syncope.server.logic.audit.AuditConnectionFactory" method="getConnection"/>
+ <Column name="EVENT_DATE" isEventTimestamp="true"/>
+ <Column name="LOGGER_LEVEL" pattern="%level" isUnicode="false"/>
+ <Column name="LOGGER" pattern="%logger" isUnicode="false"/>
+ <Column name="MESSAGE" pattern="%message" isUnicode="false"/>
+ <Column name="THROWABLE" pattern="%ex{full}" isUnicode="false"/>
+ </Jdbc>
+
+ </appenders>
+
+ <loggers>
+
+ <asyncLogger name="org.apache.syncope.server.persistence" additivity="false" level="INFO">
+ <appender-ref ref="persistence"/>
+ </asyncLogger>
+ <asyncLogger name="org.springframework.orm" additivity="false" level="INFO">
+ <appender-ref ref="persistence"/>
+ </asyncLogger>
+
+ <asyncLogger name="org.apache.syncope.server.rest" additivity="false" level="INFO">
+ <appender-ref ref="rest"/>
+ </asyncLogger>
+ <asyncLogger name="org.springframework.web" additivity="false" level="INFO">
+ <appender-ref ref="rest"/>
+ </asyncLogger>
+ <asyncLogger name="org.apache.http" additivity="false" level="INFO">
+ <appender-ref ref="rest"/>
+ </asyncLogger>
+ <asyncLogger name="org.apache.cxf" additivity="false" level="ERROR">
+ <appender-ref ref="rest"/>
+ </asyncLogger>
+
+ <asyncLogger name="org.identityconnectors" additivity="false" level="DEBUG">
+ <appender-ref ref="connid"/>
+ </asyncLogger>
+ <asyncLogger name="net.tirasa.connid" additivity="false" level="DEBUG">
+ <appender-ref ref="connid"/>
+ </asyncLogger>
+ <asyncLogger name="org.apache.syncope.server.provisioning.api.ConnIdBundleManager" additivity="false" level="INFO">
+ <appender-ref ref="connid"/>
+ </asyncLogger>
+
+ <asyncLogger name="org.springframework" additivity="false" level="INFO">
+ <appender-ref ref="main"/>
+ </asyncLogger>
+
+ <logger name="syncope.audit" additivity="false" level="DEBUG">
+ <appender-ref ref="audit"/>
+ </logger>
+
+ <root level="INFO">
+ <appender-ref ref="main"/>
+ </root>
+
+ </loggers>
+</configuration>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/resources/serverContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/resources/serverContext.xml b/syncope620/fit/reference/src/main/resources/serverContext.xml
new file mode 100644
index 0000000..8ab1eb1
--- /dev/null
+++ b/syncope620/fit/reference/src/main/resources/serverContext.xml
@@ -0,0 +1,55 @@
+<?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"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="confDirectoryPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="order" value="1"/>
+ <property name="ignoreResourceNotFound" value="true"/>
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ <property name="locations">
+ <list>
+ <value>file:${conf.directory}/persistence.properties</value>
+ <value>file:${conf.directory}/security.properties</value>
+ <value>file:${conf.directory}/connid.properties</value>
+ <value>file:${conf.directory}/mail.properties</value>
+ <value>file:${conf.directory}/logic.properties</value>
+ <value>file:${conf.directory}/workflow.properties</value>
+ </list>
+ </property>
+ </bean>
+ <bean id="classpathPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value>classpath:persistence.properties</value>
+ <value>classpath:security.properties</value>
+ <value>classpath:connid.properties</value>
+ <value>classpath:mail.properties</value>
+ <value>classpath:logic.properties</value>
+ <value>classpath:workflow.properties</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean class="org.apache.syncope.server.misc.spring.ApplicationContextProvider"/>
+
+</beans>
[4/5] syncope git commit: [SYNCOPE-620] FIT module is in,
now time for importing integration tests
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/webapp/cacheStats.jsp
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/webapp/cacheStats.jsp b/syncope620/fit/reference/src/main/webapp/cacheStats.jsp
new file mode 100644
index 0000000..5ff8a6b
--- /dev/null
+++ b/syncope620/fit/reference/src/main/webapp/cacheStats.jsp
@@ -0,0 +1,190 @@
+<%--
+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.
+--%>
+<%@page import="org.apache.syncope.common.lib.SyncopeConstants"%>
+<%@page import="org.apache.syncope.server.misc.spring.ApplicationContextProvider"%>
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
+<%@page import="java.text.SimpleDateFormat"%>
+<%@page import="java.util.Date"%>
+<%@page import="org.apache.openjpa.datacache.CacheStatisticsImpl"%>
+<%@page import="javax.persistence.EntityManagerFactory"%>
+<%@page import="org.apache.openjpa.persistence.OpenJPAPersistence"%>
+<%@page import="org.apache.openjpa.persistence.OpenJPAEntityManagerFactory"%>
+<%@page import="org.springframework.context.ConfigurableApplicationContext"%>
+<%@page import="org.apache.openjpa.datacache.QueryKey"%>
+<%@page import="org.apache.openjpa.kernel.QueryStatistics"%>
+<%@page import="org.apache.openjpa.persistence.QueryResultCacheImpl"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Cache Statistics</title>
+ <style type="text/css">
+ .c{
+ text-align: center;
+ }
+ .r{
+ text-align: right;
+ }
+ .l{
+ text-align: left;
+ }
+ .t{
+ vertical-align: top;
+ }
+ .b{
+ vertical-align: bottom;
+ }
+ .odd{
+ background-color: #D4D4D4;
+ }
+ .even{
+ background-color: #EEEEEE;
+ }
+ .bd1{
+ border: solid #888888 1px;
+ }
+ .bg1{
+ background-color: #CCCCCC;
+ }
+ .bg2{
+ background-color: #DDDDDD;
+ }
+ </style>
+ </head>
+ <body>
+ <p/>
+ <%
+ ConfigurableApplicationContext context = ApplicationContextProvider.getApplicationContext();
+
+ EntityManagerFactory emf = context.getBean(EntityManagerFactory.class);
+ OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(emf);
+
+ QueryStatistics<QueryKey> queryStatistics =
+ ((QueryResultCacheImpl) oemf.getQueryResultCache()).getDelegate().getStatistics();
+
+ CacheStatisticsImpl statistics = (CacheStatisticsImpl) oemf.getStoreCache().getStatistics();
+
+ String action = request.getParameter("do");
+ StringBuilder info = new StringBuilder(512);
+
+ if ("activate".equals(action) && !statistics.isEnabled()) {
+ statistics.enable();
+ info.append("Statistics enabled\n");
+ } else if ("deactivate".equals(action) && !statistics.isEnabled()) {
+ statistics.disable();
+ info.append("Statistics disabled\n");
+ } else if ("clear".equals(action)) {
+ queryStatistics.reset();
+ statistics.reset();
+ info.append("Statistics cleared\n");
+ }
+
+ SimpleDateFormat sdf = new SimpleDateFormat(SyncopeConstants.DEFAULT_DATE_PATTERN);
+ if (info.length() > 0) {
+ %>
+ <p/><div class="success">
+ <c:out value="${fn:escapeXml(info)}"/>
+ </div>
+ <% }%>
+ <p/>
+ <a href="?">Reload</a>
+ <p/>
+ <a href="?do=<%=(statistics.isEnabled() ? "deactivate" : "activate")%>">
+ <%=(statistics.isEnabled() ? "DEACTIVATE" : "ACTIVATE")%></a>
+ <a href="?do=clear">CLEAR</a>
+ <p/>
+ Last update: <%=sdf.format(statistics.since())%><br/>
+ Activation: <%=sdf.format(statistics.start())%><br/>
+ <p/>
+ <table>
+ <tr>
+ <th class="c bd1 bg1">Hits</th>
+ <td><%=statistics.getHitCount()%></td>
+ </tr>
+ <tr>
+ <th class="c bd1 bg1">Reads</th>
+ <td><%=statistics.getReadCount()%></td>
+ </tr>
+ <tr>
+ <th class="c bd1 bg1">Writes</th>
+ <td><%=statistics.getWriteCount()%></td>
+ </tr>
+ <tr>
+ <th class="c bd1 bg1">Query Hits</th>
+ <td><%=queryStatistics.getHitCount()%></td>
+ </tr>
+ <tr>
+ <th class="c bd1 bg1">Query Executions</th>
+ <td><%=queryStatistics.getExecutionCount()%></td>
+ </tr>
+ <tr>
+ <th class="c bd1 bg1">Query Evictions</th>
+ <td><%=queryStatistics.getEvictionCount()%></td>
+ </tr>
+ </table>
+ <p/>
+ <table width="100%">
+ <tr><th colspan="3" class="c bd1 bg2">Query statistics</th></tr>
+ <tr>
+ <th class="c bd1 bg1">Query</th>
+ <th class="c bd1 bg1">Hits</th>
+ <th class="c bd1 bg1">Executions</th>
+ </tr>
+ <%
+ boolean odd = true;
+ for (QueryKey key : queryStatistics.keys()) {
+ %>
+ <tr class="<%=(odd ? "odd" : "even")%>">
+ <td><%=key%></td>
+ <td><%=queryStatistics.getHitCount(key)%></td>
+ <td><%=queryStatistics.getExecutionCount(key)%></td>
+ </tr>
+ <%
+ odd = !odd;
+ }
+ %>
+ </table>
+ <p/>
+ <table width="100%">
+ <tr><th colspan="4" class="c bd1 bg2">2nd level cache statistics</th></tr>
+ <tr>
+ <th class="c bd1 bg1">Region</th>
+ <th class="c bd1 bg1">Hits</th>
+ <th class="c bd1 bg1">Reads</th>
+ <th class="c bd1 bg1">Writes</th>
+ </tr>
+ <%
+ odd = true;
+ for (String className : statistics.classNames()) {
+ %>
+ <tr class="<%=(odd ? "odd" : "even")%>">
+ <td><%=className%></td>
+ <td><%=statistics.getHitCount(className)%></td>
+ <td><%=statistics.getReadCount(className)%></td>
+ <td><%=statistics.getWriteCount(className)%></td>
+ </tr>
+ <%
+ odd = !odd;
+ }
+ %>
+ </table>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/fit/reference/src/main/webapp/db.jsp
----------------------------------------------------------------------
diff --git a/syncope620/fit/reference/src/main/webapp/db.jsp b/syncope620/fit/reference/src/main/webapp/db.jsp
new file mode 100644
index 0000000..2a4c6ac
--- /dev/null
+++ b/syncope620/fit/reference/src/main/webapp/db.jsp
@@ -0,0 +1,36 @@
+<%--
+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.
+--%>
+<%@page import="java.sql.SQLException"%>
+<%@page import="org.h2.tools.Server"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%
+ Server h2Datastore = (Server) getServletConfig().getServletContext().getAttribute("H2_DATASTORE");
+ if (h2Datastore == null || !h2Datastore.isRunning(true)) {
+ try {
+ h2Datastore = Server.createWebServer("-webPort", "8082");
+ h2Datastore.start();
+
+ getServletConfig().getServletContext().setAttribute("H2_DATASTORE", h2Datastore);
+ } catch (SQLException e) {
+ getServletConfig().getServletContext().log("Could not start H2 web console (datastore)", e);
+ }
+
+ response.sendRedirect("http://localhost:8082");
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/pom.xml b/syncope620/pom.xml
index a2433a8..96b475f 100644
--- a/syncope620/pom.xml
+++ b/syncope620/pom.xml
@@ -325,7 +325,7 @@ under the License.
<jackson.version>2.5.0</jackson.version>
<spring.version>4.1.4.RELEASE</spring.version>
- <spring-security.version>4.0.0.RC1</spring-security.version>
+ <spring-security.version>3.2.5.RELEASE</spring-security.version>
<openjpa.version>2.3.0</openjpa.version>
<commons-dbcp.version>2.0.1</commons-dbcp.version>
@@ -337,8 +337,11 @@ under the License.
<cocoon.version>3.0.0-alpha-3</cocoon.version>
+ <groovy.version>2.3.9</groovy.version>
+
<slf4j.version>1.7.10</slf4j.version>
<log4j.version>2.1</log4j.version>
+ <disruptor.version>3.3.0</disruptor.version>
<commons-io.version>2.4</commons-io.version>
<commons-codec.version>1.10</commons-codec.version>
@@ -355,8 +358,31 @@ under the License.
<log.directory>${project.build.directory}/log</log.directory>
<activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory>
- <testconnectorserver.key>testconnectorserver</testconnectorserver.key>
+ <jquery.version>1.11.1</jquery.version>
+ <jquery-ui.version>1.10.4</jquery-ui.version>
+ <highlightjs.version>8.0</highlightjs.version>
+ <codemirror.version>3.23</codemirror.version>
+
+ <testds.port>1389</testds.port>
+ <testdb.webport>9082</testdb.webport>
+
+ <testdb.driver>org.h2.Driver</testdb.driver>
+ <testdb.url>jdbc:h2:tcp://localhost:9092/mem:testdb;DB_CLOSE_DELAY=-1</testdb.url>
+ <testdb.username>sa</testdb.username>
+ <testdb.password>sa</testdb.password>
+
<testconnectorserver.port>4554</testconnectorserver.port>
+ <testconnectorserver.key>testconnectorserver</testconnectorserver.key>
+
+ <test.csvdir.path>${project.build.directory}/test-csvdir</test.csvdir.path>
+
+ <cargo.servlet.port>9080</cargo.servlet.port>
+ <cargo.tomcat.ajp.port>9889</cargo.tomcat.ajp.port>
+ <cargo.rmi.port>9805</cargo.rmi.port>
+ <cargo.log>${log.directory}/cargo.log</cargo.log>
+ <cargo.output>${log.directory}/cargo-output.log</cargo.output>
+
+ <tomcat.version>8.0.15</tomcat.version>
<anonymousUser>anonymous</anonymousUser>
<!-- static keys, only used for build: generated overlays will override during archetype:generate -->
@@ -397,7 +423,24 @@ under the License.
<artifactId>geronimo-javamail_1.4_mail</artifactId>
<version>1.8.4</version>
</dependency>
-
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>javax.servlet.jsp-api</artifactId>
+ <version>2.3.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+
<!-- CXF -->
<dependency>
<groupId>org.apache.cxf</groupId>
@@ -506,11 +549,46 @@ under the License.
<version>${spring.version}</version>
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
-
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>${spring-security.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-config</artifactId>
+ <version>${spring-security.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
@@ -555,10 +633,22 @@ under the License.
</dependency>
<dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>${groovy.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-all</artifactId>
+ <version>2.0.0-M19</version>
+ </dependency>
<dependency>
<groupId>org.jasypt</groupId>
@@ -658,7 +748,7 @@ under the License.
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
-
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -674,6 +764,48 @@ under the License.
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ <version>${disruptor.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons.logging.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery</artifactId>
+ <version>${jquery.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery-ui</artifactId>
+ <version>${jquery-ui.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>highlightjs</artifactId>
+ <version>${highlightjs.version}-3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>codemirror</artifactId>
+ <version>${codemirror.version}</version>
+ </dependency>
<!-- TEST -->
<dependency>
@@ -709,16 +841,6 @@ under the License.
<enabled>true</enabled>
</snapshots>
</repository>
-
- <!-- TMP for Spring Security 4.0.0-RC1 -->
- <repository>
- <id>spring-milestones</id>
- <name>Spring Milestones</name>
- <url>http://repo.spring.io/milestone</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
</repositories>
<pluginRepositories>
@@ -802,6 +924,31 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.4.11</version>
+ <configuration>
+ <container>
+ <containerId>tomcat8x</containerId>
+ <zipUrlInstaller>
+ <url>http://archive.apache.org/dist/tomcat/tomcat-8/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip</url>
+ <downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
+ <extractDir>${project.build.directory}/cargo/extract</extractDir>
+ </zipUrlInstaller>
+ <timeout>240000</timeout>
+ <log>${cargo.log}</log>
+ <output>${cargo.output}</output>
+ </container>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<configuration>
@@ -843,5 +990,6 @@ under the License.
<module>common</module>
<module>server</module>
<module>client</module>
+ <module>fit</module>
</modules>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/pom.xml b/syncope620/server/logic/pom.xml
index 84cecb0..ad1a791 100644
--- a/syncope620/server/logic/pom.xml
+++ b/syncope620/server/logic/pom.xml
@@ -99,7 +99,7 @@ under the License.
<dependency>
<groupId>org.apache.syncope.server</groupId>
- <artifactId>syncope-provisioning-java</artifactId>
+ <artifactId>syncope-server-provisioning-java</artifactId>
<version>${project.version}</version>
</dependency>
@@ -111,7 +111,7 @@ under the License.
</dependency>
<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>
@@ -122,7 +122,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/logic/src/main/java/org/apache/syncope/server/logic/ReportLogic.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/ReportLogic.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/ReportLogic.java
index dbf0833..bb369ab 100644
--- a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/ReportLogic.java
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/ReportLogic.java
@@ -235,10 +235,10 @@ public class ReportLogic extends AbstractTransactionalLogic<ReportTO> {
// a single ZipEntry in the ZipInputStream (see ReportJob)
zis.getNextEntry();
- Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
+ Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<>();
pipeline.addComponent(new XMLGenerator(zis));
- Map<String, Object> parameters = new HashMap<String, Object>();
+ Map<String, Object> parameters = new HashMap<>();
parameters.put("status", reportExec.getStatus());
parameters.put("message", reportExec.getMessage());
parameters.put("startDate", reportExec.getStartDate());
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/ImplementationClassNamesLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/ImplementationClassNamesLoader.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/ImplementationClassNamesLoader.java
index cba2839..f7f608f 100644
--- a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/ImplementationClassNamesLoader.java
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/ImplementationClassNamesLoader.java
@@ -33,6 +33,7 @@ import org.apache.syncope.server.provisioning.api.sync.PushActions;
import org.apache.syncope.server.provisioning.api.sync.SyncActions;
import org.apache.syncope.server.provisioning.api.sync.SyncCorrelationRule;
import org.apache.syncope.server.logic.report.Reportlet;
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,7 +48,7 @@ import org.springframework.util.ClassUtils;
* Cache class names for all implementations of Syncope interfaces found in classpath, for later usage.
*/
@Component
-public class ImplementationClassNamesLoader {
+public class ImplementationClassNamesLoader implements SyncopeLoader {
public enum Type {
@@ -72,10 +73,16 @@ public class ImplementationClassNamesLoader {
private Map<Type, Set<String>> classNames;
+ @Override
+ public Integer getPriority() {
+ return 400;
+ }
+
+ @Override
public void load() {
CachingMetadataReaderFactory factory = new CachingMetadataReaderFactory();
- classNames = new EnumMap<Type, Set<String>>(Type.class);
+ classNames = new EnumMap<>(Type.class);
for (Type type : Type.values()) {
classNames.put(type, new HashSet<String>());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoader.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoader.java
index 2d74da0..3f6f753 100644
--- a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoader.java
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoader.java
@@ -19,231 +19,23 @@
package org.apache.syncope.server.logic.init;
import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.server.persistence.api.dao.ConfDAO;
-import org.apache.syncope.server.persistence.api.dao.NotFoundException;
-import org.apache.syncope.server.persistence.api.dao.ReportDAO;
-import org.apache.syncope.server.persistence.api.dao.TaskDAO;
import org.apache.syncope.server.persistence.api.entity.Report;
-import org.apache.syncope.server.persistence.api.entity.conf.CPlainAttr;
-import org.apache.syncope.server.persistence.api.entity.task.PushTask;
-import org.apache.syncope.server.persistence.api.entity.task.SchedTask;
-import org.apache.syncope.server.persistence.api.entity.task.SyncTask;
import org.apache.syncope.server.persistence.api.entity.task.Task;
-import org.apache.syncope.server.provisioning.api.job.JobNamer;
-import org.apache.syncope.server.provisioning.api.job.SyncJob;
-import org.apache.syncope.server.provisioning.api.job.TaskJob;
-import org.apache.syncope.server.provisioning.api.sync.SyncActions;
-import org.apache.syncope.server.logic.notification.NotificationJob;
-import org.apache.syncope.server.logic.report.ReportJob;
-import org.apache.syncope.server.misc.spring.ApplicationContextProvider;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobKey;
-import org.quartz.Scheduler;
import org.quartz.SchedulerException;
-import org.quartz.TriggerKey;
-import org.quartz.impl.JobDetailImpl;
-import org.quartz.impl.triggers.CronTriggerImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.support.AbstractBeanDefinition;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-@Component
-public class JobInstanceLoader {
+public interface JobInstanceLoader {
- private static final Logger LOG = LoggerFactory.getLogger(JobInstanceLoader.class);
+ void registerJob(Task task, String jobClassName, String cronExpression)
+ throws ClassNotFoundException, SchedulerException, ParseException;
- @Autowired
- private SchedulerFactoryBean scheduler;
+ void registerJob(Report report) throws SchedulerException, ParseException;
- @Autowired
- private TaskDAO taskDAO;
+ void registerReportJob(Long reportKey) throws SchedulerException, ParseException;
- @Autowired
- private ReportDAO reportDAO;
+ void registerTaskJob(Long taskKey) throws ClassNotFoundException, SchedulerException, ParseException;
- @Autowired
- private ConfDAO confDAO;
+ void unregisterJob(Task task);
- private void registerJob(final String jobName, final Job jobInstance, final String cronExpression)
- throws SchedulerException, ParseException {
+ void unregisterJob(Report report);
- synchronized (scheduler.getScheduler()) {
- boolean jobAlreadyRunning = false;
- for (JobExecutionContext jobCtx : scheduler.getScheduler().getCurrentlyExecutingJobs()) {
- if (jobName.equals(jobCtx.getJobDetail().getKey().getName())
- && Scheduler.DEFAULT_GROUP.equals(jobCtx.getJobDetail().getKey().getGroup())) {
-
- jobAlreadyRunning = true;
-
- LOG.debug("Job {} already running, cancel", jobCtx.getJobDetail().getKey());
- }
- }
-
- if (jobAlreadyRunning) {
- return;
- }
- }
-
- // 0. unregister job
- unregisterJob(jobName);
-
- // 1. Job bean
- ApplicationContextProvider.getBeanFactory().registerSingleton(jobName, jobInstance);
-
- // 2. JobDetail bean
- JobDetailImpl jobDetail = new JobDetailImpl();
- jobDetail.setName(jobName);
- jobDetail.setGroup(Scheduler.DEFAULT_GROUP);
- jobDetail.setJobClass(jobInstance.getClass());
-
- // 3. Trigger
- if (cronExpression == null) {
- // Jobs added with no trigger must be durable
- jobDetail.setDurability(true);
- scheduler.getScheduler().addJob(jobDetail, true);
- } else {
- CronTriggerImpl cronTrigger = new CronTriggerImpl();
- cronTrigger.setName(JobNamer.getTriggerName(jobName));
- cronTrigger.setCronExpression(cronExpression);
-
- scheduler.getScheduler().scheduleJob(jobDetail, cronTrigger);
- }
- }
-
- @SuppressWarnings("unchecked")
- public void registerJob(final Task task, final String jobClassName, final String cronExpression)
- throws ClassNotFoundException, SchedulerException, ParseException {
-
- final Class<?> jobClass = Class.forName(jobClassName);
- Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
- createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
- if (jobInstance instanceof TaskJob) {
- ((TaskJob) jobInstance).setTaskId(task.getKey());
- }
-
- // In case of synchronization job/task retrieve and set synchronization actions:
- // actions cannot be changed at runtime but connector and synchronization policies (reloaded at execution time).
- if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
- final List<SyncActions> actions = new ArrayList<>();
- for (String className : ((SyncTask) task).getActionsClassNames()) {
- try {
- Class<?> actionsClass = Class.forName(className);
-
- final SyncActions syncActions =
- (SyncActions) ApplicationContextProvider.getBeanFactory().
- createBean(actionsClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, true);
-
- actions.add(syncActions);
- } catch (Exception e) {
- LOG.info("Class '{}' not found", className, e);
- }
- }
-
- ((SyncJob) jobInstance).setActions(actions);
- }
-
- registerJob(JobNamer.getJobName(task), jobInstance, cronExpression);
- }
-
- @Transactional(readOnly = true)
- public void registerTaskJob(final Long taskId)
- throws ClassNotFoundException, SchedulerException, ParseException {
-
- SchedTask task = taskDAO.find(taskId);
- if (task == null) {
- throw new NotFoundException("Task " + taskId);
- } else {
- registerJob(task, task.getJobClassName(), task.getCronExpression());
- }
- }
-
- public void registerJob(final Report report) throws SchedulerException, ParseException {
- Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
- createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
- ((ReportJob) jobInstance).setReportKey(report.getKey());
-
- registerJob(JobNamer.getJobName(report), jobInstance, report.getCronExpression());
- }
-
- @Transactional(readOnly = true)
- public void registerReportJob(final Long reportId) throws SchedulerException, ParseException {
- Report report = reportDAO.find(reportId);
- if (report == null) {
- throw new NotFoundException("Report " + reportId);
- } else {
- registerJob(report);
- }
- }
-
- private void unregisterJob(final String jobName) {
- try {
- scheduler.getScheduler().unscheduleJob(new TriggerKey(jobName, Scheduler.DEFAULT_GROUP));
- scheduler.getScheduler().deleteJob(new JobKey(jobName, Scheduler.DEFAULT_GROUP));
- } catch (SchedulerException e) {
- LOG.error("Could not remove job " + jobName, e);
- }
-
- if (ApplicationContextProvider.getBeanFactory().containsSingleton(jobName)) {
- ApplicationContextProvider.getBeanFactory().destroySingleton(jobName);
- }
- }
-
- public void unregisterJob(final Task task) {
- unregisterJob(JobNamer.getJobName(task));
- }
-
- public void unregisterJob(final Report report) {
- unregisterJob(JobNamer.getJobName(report));
- }
-
- @Transactional
- public void load() {
- // 1. jobs for SchedTasks
- Set<SchedTask> tasks = new HashSet<>(taskDAO.<SchedTask>findAll(TaskType.SCHEDULED));
- tasks.addAll(taskDAO.<SyncTask>findAll(TaskType.SYNCHRONIZATION));
- tasks.addAll(taskDAO.<PushTask>findAll(TaskType.PUSH));
- for (SchedTask task : tasks) {
- try {
- registerJob(task, task.getJobClassName(), task.getCronExpression());
- } catch (Exception e) {
- LOG.error("While loading job instance for task " + task.getKey(), e);
- }
- }
-
- // 2. NotificationJob
- CPlainAttr notificationJobCronExp =
- confDAO.find("notificationjob.cronExpression", NotificationJob.DEFAULT_CRON_EXP);
- if (StringUtils.isBlank(notificationJobCronExp.getValuesAsStrings().get(0))) {
- LOG.debug("Empty value provided for NotificationJob's cron, not registering anything on Quartz");
- } else {
- LOG.debug("NotificationJob's cron expression: {} - registering Quartz job and trigger",
- notificationJobCronExp);
-
- try {
- registerJob(null, NotificationJob.class.getName(), notificationJobCronExp.getValuesAsStrings().get(0));
- } catch (Exception e) {
- LOG.error("While loading NotificationJob instance", e);
- }
- }
-
- // 3. ReportJobs
- for (Report report : reportDAO.findAll()) {
- try {
- registerJob(report);
- } catch (Exception e) {
- LOG.error("While loading job instance for report " + report.getName(), e);
- }
- }
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoaderImpl.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoaderImpl.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoaderImpl.java
new file mode 100644
index 0000000..48e7db4
--- /dev/null
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/JobInstanceLoaderImpl.java
@@ -0,0 +1,270 @@
+/*
+ * 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.logic.init;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.types.TaskType;
+import org.apache.syncope.server.persistence.api.dao.ConfDAO;
+import org.apache.syncope.server.persistence.api.dao.NotFoundException;
+import org.apache.syncope.server.persistence.api.dao.ReportDAO;
+import org.apache.syncope.server.persistence.api.dao.TaskDAO;
+import org.apache.syncope.server.persistence.api.entity.Report;
+import org.apache.syncope.server.persistence.api.entity.conf.CPlainAttr;
+import org.apache.syncope.server.persistence.api.entity.task.PushTask;
+import org.apache.syncope.server.persistence.api.entity.task.SchedTask;
+import org.apache.syncope.server.persistence.api.entity.task.SyncTask;
+import org.apache.syncope.server.persistence.api.entity.task.Task;
+import org.apache.syncope.server.provisioning.api.job.JobNamer;
+import org.apache.syncope.server.provisioning.api.job.SyncJob;
+import org.apache.syncope.server.provisioning.api.job.TaskJob;
+import org.apache.syncope.server.provisioning.api.sync.SyncActions;
+import org.apache.syncope.server.logic.notification.NotificationJob;
+import org.apache.syncope.server.logic.report.ReportJob;
+import org.apache.syncope.server.misc.spring.ApplicationContextProvider;
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
+import org.apache.syncope.server.provisioning.api.job.PushJob;
+import org.apache.syncope.server.provisioning.java.sync.PushJobImpl;
+import org.apache.syncope.server.provisioning.java.sync.SyncJobImpl;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobKey;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.TriggerKey;
+import org.quartz.impl.JobDetailImpl;
+import org.quartz.impl.triggers.CronTriggerImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+@Component
+public class JobInstanceLoaderImpl implements JobInstanceLoader, SyncopeLoader {
+
+ private static final Logger LOG = LoggerFactory.getLogger(JobInstanceLoader.class);
+
+ @Autowired
+ private SchedulerFactoryBean scheduler;
+
+ @Autowired
+ private TaskDAO taskDAO;
+
+ @Autowired
+ private ReportDAO reportDAO;
+
+ @Autowired
+ private ConfDAO confDAO;
+
+ private void registerJob(final String jobName, final Job jobInstance, final String cronExpression)
+ throws SchedulerException, ParseException {
+
+ synchronized (scheduler.getScheduler()) {
+ boolean jobAlreadyRunning = false;
+ for (JobExecutionContext jobCtx : scheduler.getScheduler().getCurrentlyExecutingJobs()) {
+ if (jobName.equals(jobCtx.getJobDetail().getKey().getName())
+ && Scheduler.DEFAULT_GROUP.equals(jobCtx.getJobDetail().getKey().getGroup())) {
+
+ jobAlreadyRunning = true;
+
+ LOG.debug("Job {} already running, cancel", jobCtx.getJobDetail().getKey());
+ }
+ }
+
+ if (jobAlreadyRunning) {
+ return;
+ }
+ }
+
+ // 0. unregister job
+ unregisterJob(jobName);
+
+ // 1. Job bean
+ ApplicationContextProvider.getBeanFactory().registerSingleton(jobName, jobInstance);
+
+ // 2. JobDetail bean
+ JobDetailImpl jobDetail = new JobDetailImpl();
+ jobDetail.setName(jobName);
+ jobDetail.setGroup(Scheduler.DEFAULT_GROUP);
+ jobDetail.setJobClass(jobInstance.getClass());
+
+ // 3. Trigger
+ if (cronExpression == null) {
+ // Jobs added with no trigger must be durable
+ jobDetail.setDurability(true);
+ scheduler.getScheduler().addJob(jobDetail, true);
+ } else {
+ CronTriggerImpl cronTrigger = new CronTriggerImpl();
+ cronTrigger.setName(JobNamer.getTriggerName(jobName));
+ cronTrigger.setCronExpression(cronExpression);
+
+ scheduler.getScheduler().scheduleJob(jobDetail, cronTrigger);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void registerJob(final Task task, final String jobClassName, final String cronExpression)
+ throws ClassNotFoundException, SchedulerException, ParseException {
+
+ Class<?> jobClass = Class.forName(jobClassName);
+ if (SyncJob.class.equals(jobClass)) {
+ jobClass = SyncJobImpl.class;
+ } else if (PushJob.class.equals(jobClass)) {
+ jobClass = PushJobImpl.class;
+ }
+ Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
+ createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
+ if (jobInstance instanceof TaskJob) {
+ ((TaskJob) jobInstance).setTaskId(task.getKey());
+ }
+
+ // In case of synchronization job/task retrieve and set synchronization actions:
+ // actions cannot be changed at runtime but connector and synchronization policies (reloaded at execution time).
+ if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
+ final List<SyncActions> actions = new ArrayList<>();
+ for (String className : ((SyncTask) task).getActionsClassNames()) {
+ try {
+ Class<?> actionsClass = Class.forName(className);
+
+ final SyncActions syncActions =
+ (SyncActions) ApplicationContextProvider.getBeanFactory().
+ createBean(actionsClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, true);
+
+ actions.add(syncActions);
+ } catch (Exception e) {
+ LOG.info("Class '{}' not found", className, e);
+ }
+ }
+
+ ((SyncJob) jobInstance).setActions(actions);
+ }
+
+ registerJob(JobNamer.getJobName(task), jobInstance, cronExpression);
+ }
+
+ @Transactional(readOnly = true)
+ @Override
+ public void registerTaskJob(final Long taskKey)
+ throws ClassNotFoundException, SchedulerException, ParseException {
+
+ SchedTask task = taskDAO.find(taskKey);
+ if (task == null) {
+ throw new NotFoundException("Task " + taskKey);
+ } else {
+ registerJob(task, task.getJobClassName(), task.getCronExpression());
+ }
+ }
+
+ @Override
+ public void registerJob(final Report report) throws SchedulerException, ParseException {
+ Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
+ createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
+ ((ReportJob) jobInstance).setReportKey(report.getKey());
+
+ registerJob(JobNamer.getJobName(report), jobInstance, report.getCronExpression());
+ }
+
+ @Transactional(readOnly = true)
+ @Override
+ public void registerReportJob(final Long reportKey) throws SchedulerException, ParseException {
+ Report report = reportDAO.find(reportKey);
+ if (report == null) {
+ throw new NotFoundException("Report " + reportKey);
+ } else {
+ registerJob(report);
+ }
+ }
+
+ private void unregisterJob(final String jobName) {
+ try {
+ scheduler.getScheduler().unscheduleJob(new TriggerKey(jobName, Scheduler.DEFAULT_GROUP));
+ scheduler.getScheduler().deleteJob(new JobKey(jobName, Scheduler.DEFAULT_GROUP));
+ } catch (SchedulerException e) {
+ LOG.error("Could not remove job " + jobName, e);
+ }
+
+ if (ApplicationContextProvider.getBeanFactory().containsSingleton(jobName)) {
+ ApplicationContextProvider.getBeanFactory().destroySingleton(jobName);
+ }
+ }
+
+ @Override
+ public void unregisterJob(final Task task) {
+ unregisterJob(JobNamer.getJobName(task));
+ }
+
+ @Override
+ public void unregisterJob(final Report report) {
+ unregisterJob(JobNamer.getJobName(report));
+ }
+
+ @Override
+ public Integer getPriority() {
+ return 200;
+ }
+
+ @Transactional
+ @Override
+ public void load() {
+ // 1. jobs for SchedTasks
+ Set<SchedTask> tasks = new HashSet<>(taskDAO.<SchedTask>findAll(TaskType.SCHEDULED));
+ tasks.addAll(taskDAO.<SyncTask>findAll(TaskType.SYNCHRONIZATION));
+ tasks.addAll(taskDAO.<PushTask>findAll(TaskType.PUSH));
+ for (SchedTask task : tasks) {
+ try {
+ registerJob(task, task.getJobClassName(), task.getCronExpression());
+ } catch (Exception e) {
+ LOG.error("While loading job instance for task " + task.getKey(), e);
+ }
+ }
+
+ // 2. NotificationJob
+ CPlainAttr notificationJobCronExp =
+ confDAO.find("notificationjob.cronExpression", NotificationJob.DEFAULT_CRON_EXP);
+ if (StringUtils.isBlank(notificationJobCronExp.getValuesAsStrings().get(0))) {
+ LOG.debug("Empty value provided for NotificationJob's cron, not registering anything on Quartz");
+ } else {
+ LOG.debug("NotificationJob's cron expression: {} - registering Quartz job and trigger",
+ notificationJobCronExp);
+
+ try {
+ registerJob(null, NotificationJob.class.getName(), notificationJobCronExp.getValuesAsStrings().get(0));
+ } catch (Exception e) {
+ LOG.error("While loading NotificationJob instance", e);
+ }
+ }
+
+ // 3. ReportJobs
+ for (Report report : reportDAO.findAll()) {
+ try {
+ registerJob(report);
+ } catch (Exception e) {
+ LOG.error("While loading job instance for report " + report.getName(), e);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LoggerLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LoggerLoader.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LoggerLoader.java
new file mode 100644
index 0000000..d25a3d6
--- /dev/null
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LoggerLoader.java
@@ -0,0 +1,98 @@
+/*
+ * 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.logic.init;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+import org.apache.syncope.common.lib.types.LoggerType;
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
+import org.apache.syncope.server.persistence.api.dao.LoggerDAO;
+import org.apache.syncope.server.persistence.api.entity.EntityFactory;
+import org.apache.syncope.server.persistence.api.entity.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+@Component
+public class LoggerLoader implements SyncopeLoader {
+
+ @Autowired
+ private LoggerDAO loggerDAO;
+
+ @Autowired
+ private EntityFactory entityFactory;
+
+ @Override
+ public Integer getPriority() {
+ return 300;
+ }
+
+ @Transactional
+ @Override
+ public void load() {
+ Map<String, Logger> syncopeLoggers = new HashMap<>();
+ for (Logger syncopeLogger : loggerDAO.findAll(LoggerType.LOG)) {
+ syncopeLoggers.put(syncopeLogger.getKey(), syncopeLogger);
+ }
+
+ for (Logger syncopeLogger : loggerDAO.findAll(LoggerType.AUDIT)) {
+ syncopeLoggers.put(syncopeLogger.getKey(), syncopeLogger);
+ }
+
+ LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+
+ /*
+ * Traverse all defined log4j loggers: if there is a matching SyncopeLogger, set log4j level accordingly,
+ * otherwise create a SyncopeLogger instance with given name and level.
+ */
+ for (LoggerConfig logConf : ctx.getConfiguration().getLoggers().values()) {
+ final String loggerName = LogManager.ROOT_LOGGER_NAME.equals(logConf.getName())
+ ? SyncopeConstants.ROOT_LOGGER : logConf.getName();
+ if (logConf.getLevel() != null) {
+ if (syncopeLoggers.containsKey(loggerName)) {
+ logConf.setLevel(syncopeLoggers.get(loggerName).getLevel().getLevel());
+ syncopeLoggers.remove(loggerName);
+ } else if (!loggerName.equals(LoggerType.AUDIT.getPrefix())) {
+ Logger syncopeLogger = entityFactory.newEntity(Logger.class);
+ syncopeLogger.setKey(loggerName);
+ syncopeLogger.setLevel(LoggerLevel.fromLevel(logConf.getLevel()));
+ syncopeLogger.setType(loggerName.startsWith(LoggerType.AUDIT.getPrefix())
+ ? LoggerType.AUDIT
+ : LoggerType.LOG);
+ loggerDAO.save(syncopeLogger);
+ }
+ }
+ }
+
+ /*
+ * Foreach SyncopeLogger not found in log4j create a new log4j logger with given name and level.
+ */
+ for (Logger syncopeLogger : syncopeLoggers.values()) {
+ LoggerConfig logConf = ctx.getConfiguration().getLoggerConfig(syncopeLogger.getKey());
+ logConf.setLevel(syncopeLogger.getLevel().getLevel());
+ }
+
+ ctx.updateLoggers();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LogicInitializer.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LogicInitializer.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LogicInitializer.java
new file mode 100644
index 0000000..7a17121
--- /dev/null
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/LogicInitializer.java
@@ -0,0 +1,73 @@
+/*
+ * 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.logic.init;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.BeanFactoryAware;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * Take care of all initializations needed by Syncope logic to run up and safe.
+ */
+@Component
+public class LogicInitializer implements InitializingBean, BeanFactoryAware {
+
+ @Autowired
+ private WorkflowAdapterLoader workflowAdapterLoader;
+
+ private DefaultListableBeanFactory beanFactory;
+
+ @Override
+ public void setBeanFactory(final BeanFactory beanFactory) throws BeansException {
+ this.beanFactory = (DefaultListableBeanFactory) beanFactory;
+ }
+
+ @Override
+ public void afterPropertiesSet() throws Exception {
+ Map<String, SyncopeLoader> loaderMap = beanFactory.getBeansOfType(SyncopeLoader.class);
+
+ List<SyncopeLoader> loaders = new ArrayList<>(loaderMap.values());
+ Collections.sort(loaders, new PriorityComparator());
+
+ for (SyncopeLoader loader : loaders) {
+ loader.load();
+ }
+
+ workflowAdapterLoader.init();
+ }
+
+ private static class PriorityComparator implements Comparator<SyncopeLoader> {
+
+ @Override
+ public int compare(final SyncopeLoader o1, final SyncopeLoader o2) {
+ return o1.getPriority().compareTo(o2.getPriority());
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/WorkflowAdapterLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/WorkflowAdapterLoader.java b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/WorkflowAdapterLoader.java
index 5844277..b89e165 100644
--- a/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/WorkflowAdapterLoader.java
+++ b/syncope620/server/logic/src/main/java/org/apache/syncope/server/logic/init/WorkflowAdapterLoader.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.server.logic.init;
+import org.apache.syncope.server.persistence.api.SyncopeLoader;
import org.apache.syncope.server.workflow.api.RoleWorkflowAdapter;
import org.apache.syncope.server.workflow.api.UserWorkflowAdapter;
import org.apache.syncope.server.workflow.api.WorkflowInstanceLoader;
@@ -32,7 +33,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.stereotype.Component;
@Component
-public class WorkflowAdapterLoader implements BeanFactoryAware {
+public class WorkflowAdapterLoader implements BeanFactoryAware, SyncopeLoader {
private static final Logger LOG = LoggerFactory.getLogger(WorkflowAdapterLoader.class);
@@ -76,6 +77,12 @@ public class WorkflowAdapterLoader implements BeanFactoryAware {
}
}
+ @Override
+ public Integer getPriority() {
+ return Integer.MIN_VALUE;
+ }
+
+ @Override
public void load() {
lazyInit();
if (wfLoader == null) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/report2csv.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/report2csv.xsl b/syncope620/server/logic/src/main/resources/report/report2csv.xsl
new file mode 100644
index 0000000..b1e2c71
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/report2csv.xsl
@@ -0,0 +1,36 @@
+<?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:import href="userReportlet2csv.xsl"/>
+ <xsl:import href="roleReportlet2csv.xsl"/>
+ <xsl:import href="staticReportlet2csv.xsl"/>
+
+ <xsl:param name="status"/>
+ <xsl:param name="message"/>
+ <xsl:param name="startDate"/>
+ <xsl:param name="endDate"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </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/report2fo.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/report2fo.xsl b/syncope620/server/logic/src/main/resources/report/report2fo.xsl
new file mode 100644
index 0000000..7da9cab
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/report2fo.xsl
@@ -0,0 +1,97 @@
+<?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:import href="userReportlet2fo.xsl"/>
+ <xsl:import href="roleReportlet2fo.xsl"/>
+ <xsl:import href="staticReportlet2fo.xsl"/>
+
+ <xsl:param name="status"/>
+ <xsl:param name="message"/>
+ <xsl:param name="startDate"/>
+ <xsl:param name="endDate"/>
+
+ <xsl:template match="/">
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" font-size="10pt">
+
+ <!-- defines the layout master -->
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm"
+ margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+ <fo:region-body margin-top="1cm"/>
+ <fo:region-before extent="1cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <!-- starts actual layout -->
+ <fo:page-sequence master-reference="first">
+
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="24pt" font-weight="bold" text-align="center" space-after="1cm">
+ Apache Syncope Report - <xsl:value-of select="report/@name"/>
+ </fo:block>
+
+ <fo:table table-layout="fixed" border-width="0.5mm" border-style="solid" width="100%" space-after="1cm">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block font-size="18pt" font-weight="bold">Report Name:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-size="18pt" font-weight="bold">
+ <xsl:value-of select="report/@name"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block font-size="18pt" font-weight="bold">Start Date:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-size="18pt" font-weight="bold">
+ <xsl:value-of select="$startDate"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block font-size="18pt" font-weight="bold">End Date:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-size="18pt" font-weight="bold">
+ <xsl:value-of select="$endDate"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <xsl:apply-templates/>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </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/report2html.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/report2html.xsl b/syncope620/server/logic/src/main/resources/report/report2html.xsl
new file mode 100644
index 0000000..c1d6b67
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/report2html.xsl
@@ -0,0 +1,77 @@
+<?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:import href="userReportlet2html.xsl"/>
+ <xsl:import href="roleReportlet2html.xsl"/>
+ <xsl:import href="staticReportlet2html.xsl"/>
+
+ <xsl:param name="status"/>
+ <xsl:param name="message"/>
+ <xsl:param name="startDate"/>
+ <xsl:param name="endDate"/>
+
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Apache Syncope Report - <xsl:value-of select="report/@name"/></title>
+ </head>
+ <body>
+ <table style="border: 1px solid black;">
+ <tr>
+ <td>
+ <h1>Report Name:</h1>
+ </td>
+ <td>
+ <h1>
+ <xsl:value-of select="report/@name"/>
+ </h1>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h2>Start Date:</h2>
+ </td>
+ <td>
+ <h2>
+ <xsl:value-of select="$startDate"/>
+ </h2>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h2>End Date:</h2>
+ </td>
+ <td>
+ <h2>
+ <xsl:value-of select="$endDate"/>
+ </h2>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:apply-templates/>
+ </body>
+ </html>
+ </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/roleReportlet2csv.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/roleReportlet2csv.xsl b/syncope620/server/logic/src/main/resources/report/roleReportlet2csv.xsl
new file mode 100644
index 0000000..ad092d5
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/roleReportlet2csv.xsl
@@ -0,0 +1,118 @@
+<?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.RoleReportlet']">
+
+ <xsl:call-template name="header">
+ <xsl:with-param name="node" select="configurations/roleAttributes"/>
+ </xsl:call-template>
+ <xsl:for-each select="role">
+ <xsl:call-template name="roleAttributes">
+ <xsl:with-param name="header" select="../configurations/roleAttributes"/>
+ <xsl:with-param name="attrs" select="."/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="header">
+ <xsl:param name="node"/>
+ <xsl:for-each select="$node/*">
+ <xsl:value-of select="text()"/>
+ <xsl:if test="position() != last()">
+ <xsl:value-of select="$delimiter"/>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template name="roleAttributes">
+ <xsl:param name="header"/>
+ <xsl:param name="attrs"/>
+
+ <xsl:for-each select="$header/*">
+ <xsl:variable name="nameAttr" select="text()"/>
+
+ <xsl:choose>
+ <xsl:when test="string-length($attrs/@*[name()=$nameAttr]) > 0">
+ <xsl:variable name="roleAttr" select="$attrs/@*[name()=$nameAttr]"/>
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="$roleAttr/."/>
+ <xsl:text>"</xsl:text>
+ </xsl:when>
+ <xsl:when test="name($attrs/*[name(.)=$nameAttr]/*[name(.)='entitlement'])
+ and count($attrs/*[name(.)=$nameAttr]/node()) > 0">
+ <xsl:text>"</xsl:text>
+ <xsl:for-each select="$attrs/*/entitlement">
+ <xsl:variable name="value" select="@id"/>
+ <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()) > 0">
+ <xsl:text>"</xsl:text>
+ <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:when test="name($attrs/*[name(.)=$nameAttr]/*[name(.)='user'])
+ and count($attrs/*[name(.)=$nameAttr]/node()) > 0">
+ <xsl:text>"</xsl:text>
+ <xsl:for-each select="$attrs/*/user">
+ <xsl:variable name="value" select="@userUsername"/>
+ <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:if test="string-length($attrs/*/*[@name=$nameAttr]/value/text()) > 0">
+ <xsl:variable name="value" select="$attrs/*/*[@name=$nameAttr]/value/text()"/>
+ <xsl:value-of select="$value"/>
+ </xsl:if>
+ <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>
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/b015c443/syncope620/server/logic/src/main/resources/report/roleReportlet2fo.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/roleReportlet2fo.xsl b/syncope620/server/logic/src/main/resources/report/roleReportlet2fo.xsl
new file mode 100644
index 0000000..bb319a4
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/roleReportlet2fo.xsl
@@ -0,0 +1,228 @@
+<?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.RoleReportlet']">
+
+ <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="role">
+ <fo:block font-size="14pt" font-weight="bold" space-before="15mm" space-after="5mm" background-color="(#8888ff)">Role <xsl:value-of select="@name"/></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>Id:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-style="italic">
+ <xsl:value-of select="@id"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:if test="@roleOwner != 'null'">
+ <fo:table-row background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>Role Owner:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-style="italic">
+ <xsl:value-of select="@roleOwner"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:if>
+ <xsl:if test="@userOwner != 'null'">
+ <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="@userOwner"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:if>
+ </fo:table-body>
+ </fo:table>
+ <xsl:choose>
+ <xsl:when test="string-length(attributes/attribute) > 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="9pt" space-after="3mm">THIS ROLE HASN'T ANY ATTRIBUTE</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="string-length(derivedAttributes/derivedAttribute) > 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 ROLE HASN'T ANY DERIVED ATTRIBUTE</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="string-length(virtualAttributes/virtualAttribute) > 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 ROLE HASN'T ANY VIRTUAL ATTRIBUTE</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!--entitlements-->
+ <xsl:choose>
+ <xsl:when test="entitlements/entitlement">
+ <xsl:call-template name="entitlements">
+ <xsl:with-param name="label">Entitlements</xsl:with-param>
+ <xsl:with-param name="node" select="entitlements/entitlement"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY ENTITLEMENT</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="users/user">
+ <fo:block font-size="11pt" font-weight="bold">Users</fo:block>
+ <xsl:for-each select="users/user">
+ <fo:block background-color="(#ccccff)" font-size="9pt" font-weight="bold" space-before="4mm">User: <xsl:value-of select="@userUsername"/> (Id: <xsl:value-of select="@userId"/>)</fo:block>
+
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY USER ASSIGNED TO</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="roleResources">
+ <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()) > 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>•</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>
+ <!--entitlements template-->
+ <xsl:template name="entitlements">
+ <xsl:param name="label"/>
+ <xsl:param name="node"/>
+ <fo:block font-size="11pt" font-weight="bold" space-after="2mm" space-before="5mm">
+ <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">Name</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:for-each select="$node">
+ <fo:table-row height="4mm" background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>
+ <xsl:value-of select="@id"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </fo:table>
+ </xsl:template>
+
+ <xsl:template name="roleResources">
+ <xsl:param name="node"/>
+ <fo:block font-size="11pt" font-weight="bold" space-after="3mm" space-before="5mm">Role Resources</fo:block>
+ <xsl:for-each select="$node">
+ <fo:block></fo:block> <!-- <fo:block>•</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/roleReportlet2html.xsl
----------------------------------------------------------------------
diff --git a/syncope620/server/logic/src/main/resources/report/roleReportlet2html.xsl b/syncope620/server/logic/src/main/resources/report/roleReportlet2html.xsl
new file mode 100644
index 0000000..9f5825f
--- /dev/null
+++ b/syncope620/server/logic/src/main/resources/report/roleReportlet2html.xsl
@@ -0,0 +1,196 @@
+<?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.RoleReportlet']">
+ <h2>Reportlet: <xsl:value-of select="@name"/></h2>
+ <xsl:for-each select="role">
+ <h3>Role <xsl:value-of select="@name"/></h3>
+
+ <table style="border: 1px solid black;">
+ <tr>
+ <td>Id:</td>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ </tr>
+ <xsl:if test="@roleOwner != 'null'"> <!--!= null test="not(USER/FIRSTNAME)" -->
+ <tr>
+ <td>Role Owner:</td>
+ <td>
+ <xsl:value-of select="@roleOwner"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@userOwner != 'null'">
+ <tr>
+ <td>User Owner:</td>
+ <td>
+ <xsl:value-of select="@userOwner"/>
+ </td>
+ </tr>
+ </xsl:if>
+
+ </table>
+
+ <xsl:choose>
+ <xsl:when test="string-length(attributes/attribute) > 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 ANY ATTRIBUTE</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="string-length(derivedAttributes/derivedAttribute) > 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 ANY DERIVED ATTRIBUTE</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--</xsl:if>-->
+ <xsl:choose>
+ <xsl:when test="string-length(virtualAttributes/virtualAttribute) > 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 ANY VIRTUAL ATTRIBUTE</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="entitlements/entitlement">
+ <xsl:call-template name="entitlements">
+ <xsl:with-param name="label">Entitlements: </xsl:with-param>
+ <xsl:with-param name="node" select="entitlements/entitlement"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY ENTITLEMENT</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="users/user">
+ <h4>Users</h4>
+ <xsl:for-each select="users/user">
+ <h5>User: <xsl:value-of select="@userUsername"/> (Id: <xsl:value-of select="@userId"/>)</h5>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY USER ASSIGNED TO</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="roleResources">
+ <xsl:with-param name="node" select="resources/resource"/>
+ </xsl:call-template>
+ <hr/>
+
+ </xsl:for-each>
+ </xsl:template>
+
+ <!--entitlement template-->
+ <xsl:template name="entitlements">
+ <xsl:param name="label"/>
+ <xsl:param name="node"/>
+
+ <h4>
+ <xsl:value-of select="$label"/>
+ </h4>
+
+ <table>
+
+ <tbody>
+ <xsl:for-each select="$node">
+ <tr>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </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()) > 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="roleResources">
+ <xsl:param name="node"/>
+
+ <h4>Role 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
[3/5] syncope git commit: [SYNCOPE-620] FIT module is in,
now time for importing integration tests
Posted by il...@apache.org.
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> </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()) > 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()) > 0
+ and count($attrs/*[name(.)=$nameAttr]/*/node()) > 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()) > 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()) > 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()) > 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()) > 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()) > 0">
+ <fo:block font-size="11pt">Enum value:
+ <xsl:value-of select="enum/text()"/>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="string-length(list) > 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()) > 0">
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</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()) > 0">
+ <p>String value:
+ <xsl:value-of select="string/text()"/>
+ </p>
+ </xsl:if>
+
+ <xsl:if test="string-length(long/text()) > 0">
+ <p>Long value:
+ <xsl:value-of select="long/text()"/>
+ </p>
+ </xsl:if>
+
+ <xsl:if test="string-length(double/text()) > 0">
+ <p>Double value:
+ <xsl:value-of select="double/text()"/>
+ </p>
+ </xsl:if>
+
+ <xsl:if test="string-length(date/text()) > 0">
+ <p>Date value:
+ <xsl:value-of select="date/text()"/>
+ </p>
+ </xsl:if>
+
+ <xsl:if test="string-length(enum/text()) > 0">
+ <p>Enum value:
+ <xsl:value-of select="enum/text()"/>
+ </p>
+ </xsl:if>
+
+ <xsl:if test="string-length(list) > 0">
+ <p>List values:</p>
+
+ <ul>
+ <xsl:for-each select="list/string">
+ <xsl:if test="string-length(string/text()) > 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> </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> </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]) > 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()) > 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()) > 0
+ and count($attrs/*/*[@name=$nameAttr]/node()) > 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()) > 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()) > 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) > 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) > 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) > 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) > 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) > 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) > 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) > 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) > 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) > 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) > 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) > 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()) > 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>•</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>•</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) > 0">
+ <tr>
+ <td>Creation Date:</td>
+ <td>
+ <xsl:value-of select="@creationDate"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string-length(@lastLoginDate) > 0">
+ <tr>
+ <td>Last Login Date:</td>
+ <td>
+ <xsl:value-of select="@lastLoginDate"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string-length(@changePwdDate) > 0">
+ <tr>
+ <td>Change Password Date:</td>
+ <td>
+ <xsl:value-of select="@changePwdDate"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string-length(@passwordHistorySize) > 0">
+ <tr>
+ <td>Password History Size:</td>
+ <td>
+ <xsl:value-of select="@passwordHistorySize"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string-length(@failedLoginCount) > 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) > 0">-->
+ <xsl:choose>
+ <xsl:when test="string-length(derivedAttributes/derivedAttribute) > 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) > 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) > 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) > 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) > 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) > 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) > 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()) > 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">