syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [31/32] syncope git commit: [SYNCOPE-620] JPA entities + basic tests
Date Thu, 01 Jan 2015 18:12:26 GMT
http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
new file mode 100644
index 0000000..79ddfb3
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
@@ -0,0 +1,258 @@
+/*
+ * 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.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "role")
+@XmlType
+@JsonIgnoreProperties({ "displayName" })
+public class RoleTO extends AbstractSubjectTO {
+
+    private static final long serialVersionUID = -7785920258290147542L;
+
+    private String name;
+
+    private long parent;
+
+    private Long userOwner;
+
+    private Long roleOwner;
+
+    private boolean inheritOwner;
+
+    private boolean inheritTemplates;
+
+    private boolean inheritAttrs;
+
+    private boolean inheritDerAttrs;
+
+    private boolean inheritVirAttrs;
+
+    private boolean inheritPasswordPolicy;
+
+    private boolean inheritAccountPolicy;
+
+    private final List<String> entitlements = new ArrayList<>();
+
+    private List<String> rAttrTemplates = new ArrayList<>();
+
+    private List<String> rDerAttrTemplates = new ArrayList<>();
+
+    private List<String> rVirAttrTemplates = new ArrayList<>();
+
+    private List<String> mAttrTemplates = new ArrayList<>();
+
+    private List<String> mDerAttrTemplates = new ArrayList<>();
+
+    private List<String> mVirAttrTemplates = new ArrayList<>();
+
+    private Long passwordPolicy;
+
+    private Long accountPolicy;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public long getParent() {
+        return parent;
+    }
+
+    public void setParent(final long parent) {
+        this.parent = parent;
+    }
+
+    public Long getUserOwner() {
+        return userOwner;
+    }
+
+    public void setUserOwner(final Long userOwner) {
+        this.userOwner = userOwner;
+    }
+
+    public Long getRoleOwner() {
+        return roleOwner;
+    }
+
+    public void setRoleOwner(final Long roleOwner) {
+        this.roleOwner = roleOwner;
+    }
+
+    public boolean isInheritOwner() {
+        return inheritOwner;
+    }
+
+    public void setInheritOwner(final boolean inheritOwner) {
+        this.inheritOwner = inheritOwner;
+    }
+
+    public boolean isInheritTemplates() {
+        return inheritTemplates;
+    }
+
+    public void setInheritTemplates(boolean inheritTemplates) {
+        this.inheritTemplates = inheritTemplates;
+    }
+
+    public boolean isInheritAttrs() {
+        return inheritAttrs;
+    }
+
+    public void setInheritAttrs(final boolean inheritAttrs) {
+        this.inheritAttrs = inheritAttrs;
+    }
+
+    public boolean isInheritDerAttrs() {
+        return inheritDerAttrs;
+    }
+
+    public void setInheritDerAttrs(final boolean inheritDerAttrs) {
+        this.inheritDerAttrs = inheritDerAttrs;
+    }
+
+    public boolean isInheritVirAttrs() {
+        return inheritVirAttrs;
+    }
+
+    public void setInheritVirAttrs(final boolean inheritVirAttrs) {
+        this.inheritVirAttrs = inheritVirAttrs;
+    }
+
+    @XmlElementWrapper(name = "entitlements")
+    @XmlElement(name = "entitlement")
+    @JsonProperty("entitlements")
+    public List<String> getEntitlements() {
+        return entitlements;
+    }
+
+    @XmlElementWrapper(name = "rAttrTemplates")
+    @XmlElement(name = "rAttrTemplate")
+    @JsonProperty("rAttrTemplates")
+    public List<String> getRAttrTemplates() {
+        return rAttrTemplates;
+    }
+
+    @XmlElementWrapper(name = "rDerAttrTemplates")
+    @XmlElement(name = "rDerAttrTemplate")
+    @JsonProperty("rDerAttrTemplates")
+    public List<String> getRDerAttrTemplates() {
+        return rDerAttrTemplates;
+    }
+
+    @XmlElementWrapper(name = "rVirAttrTemplates")
+    @XmlElement(name = "rVirAttrTemplate")
+    @JsonProperty("rVirAttrTemplates")
+    public List<String> getRVirAttrTemplates() {
+        return rVirAttrTemplates;
+    }
+
+    @XmlElementWrapper(name = "mAttrTemplates")
+    @XmlElement(name = "mAttrTemplate")
+    @JsonProperty("mAttrTemplates")
+    public List<String> getMAttrTemplates() {
+        return mAttrTemplates;
+    }
+
+    @XmlElementWrapper(name = "mDerAttrTemplates")
+    @XmlElement(name = "mDerAttrTemplate")
+    @JsonProperty("mDerAttrTemplates")
+    public List<String> getMDerAttrTemplates() {
+        return mDerAttrTemplates;
+    }
+
+    @XmlElementWrapper(name = "mVirAttrTemplates")
+    @XmlElement(name = "mVirAttrTemplate")
+    @JsonProperty("mVirAttrTemplates")
+    public List<String> getMVirAttrTemplates() {
+        return mVirAttrTemplates;
+    }
+
+    public Long getPasswordPolicy() {
+        return passwordPolicy;
+    }
+
+    public void setPasswordPolicy(final Long passwordPolicy) {
+        this.passwordPolicy = passwordPolicy;
+    }
+
+    public boolean isInheritPasswordPolicy() {
+        return inheritPasswordPolicy;
+    }
+
+    /**
+     * Specify if password policy must be inherited. In this case eventual passwordPolicy occurrence will be ignored.
+     *
+     * @param inheritPasswordPolicy 'true' to inherit policy, false otherwise.
+     */
+    public void setInheritPasswordPolicy(final boolean inheritPasswordPolicy) {
+        this.inheritPasswordPolicy = inheritPasswordPolicy;
+    }
+
+    public Long getAccountPolicy() {
+        return accountPolicy;
+    }
+
+    public void setAccountPolicy(final Long accountPolicy) {
+        this.accountPolicy = accountPolicy;
+    }
+
+    public boolean isInheritAccountPolicy() {
+        return inheritAccountPolicy;
+    }
+
+    /**
+     * Specify if account policy must be inherited. In this case eventual accountPolicy occurrence will be ignored.
+     *
+     * @param inheritAccountPolicy 'true' to inherit policy, false otherwise.
+     */
+    public void setInheritAccountPolicy(final boolean inheritAccountPolicy) {
+        this.inheritAccountPolicy = inheritAccountPolicy;
+    }
+
+    public String getDisplayName() {
+        return getId() + " " + getName();
+    }
+
+    public static long fromDisplayName(final String displayName) {
+        long result = 0;
+        if (displayName != null && !displayName.isEmpty() && displayName.indexOf(' ') != -1) {
+            try {
+                result = Long.valueOf(displayName.split(" ")[0]);
+            } catch (NumberFormatException e) {
+                // just to avoid PMD warning about "empty catch block"
+                result = 0;
+            }
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
new file mode 100644
index 0000000..aceefe1
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
@@ -0,0 +1,183 @@
+/*
+ * 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.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+@XmlRootElement(name = "user")
+@XmlType
+public class UserTO extends AbstractSubjectTO {
+
+    private static final long serialVersionUID = 7791304495192615740L;
+
+    private String password;
+
+    private final List<MembershipTO> memberships = new ArrayList<>();
+
+    private String status;
+
+    private String token;
+
+    private Date tokenExpireTime;
+
+    private String username;
+
+    private Date lastLoginDate;
+
+    private Date changePwdDate;
+
+    private Integer failedLogins;
+
+    private Long securityQuestion;
+
+    private String securityAnswer;
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(final String password) {
+        this.password = password;
+    }
+
+    @XmlElementWrapper(name = "memberships")
+    @XmlElement(name = "membership")
+    @JsonProperty("memberships")
+    public List<MembershipTO> getMemberships() {
+        return memberships;
+    }
+
+    @JsonIgnore
+    public Map<Long, MembershipTO> getMembershipMap() {
+        Map<Long, MembershipTO> result;
+
+        if (getMemberships() == null) {
+            result = Collections.emptyMap();
+        } else {
+            result = new HashMap<>(getMemberships().size());
+            for (MembershipTO membership : getMemberships()) {
+                result.put(membership.getRoleId(), membership);
+            }
+            result = Collections.unmodifiableMap(result);
+        }
+
+        return result;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(final String status) {
+        this.status = status;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(final String token) {
+        this.token = token;
+    }
+
+    public Date getTokenExpireTime() {
+        return tokenExpireTime == null
+                ? null
+                : new Date(tokenExpireTime.getTime());
+    }
+
+    public void setTokenExpireTime(final Date tokenExpireTime) {
+        if (tokenExpireTime != null) {
+            this.tokenExpireTime = new Date(tokenExpireTime.getTime());
+        }
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(final String username) {
+        this.username = username;
+    }
+
+    public Date getChangePwdDate() {
+        return changePwdDate;
+    }
+
+    public Integer getFailedLogins() {
+        return failedLogins;
+    }
+
+    public Date getLastLoginDate() {
+        return lastLoginDate;
+    }
+
+    public void setChangePwdDate(final Date changePwdDate) {
+        this.changePwdDate = changePwdDate;
+    }
+
+    public void setFailedLogins(final Integer failedLogins) {
+        this.failedLogins = failedLogins;
+    }
+
+    public void setLastLoginDate(final Date lastLoginDate) {
+        this.lastLoginDate = lastLoginDate;
+    }
+
+    public Long getSecurityQuestion() {
+        return securityQuestion;
+    }
+
+    public void setSecurityQuestion(final Long securityQuestion) {
+        this.securityQuestion = securityQuestion;
+    }
+
+    public String getSecurityAnswer() {
+        return securityAnswer;
+    }
+
+    public void setSecurityAnswer(final String securityAnswer) {
+        this.securityAnswer = securityAnswer;
+    }
+
+    @Override
+    public String toString() {
+        return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) {
+
+            @Override
+            protected boolean accept(final Field f) {
+                return super.accept(f) && !f.getName().equals("password");
+            }
+        }.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
index 2450c56..3394d05 100644
--- a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
@@ -24,37 +24,38 @@ import javax.xml.bind.annotation.XmlEnum;
 public enum EntityViolationType {
 
     Standard(""),
-    InvalidAccountPolicy("org.apache.syncope.core.validation.accountpolicy"),
-    InvalidConnInstanceLocation("org.apache.syncope.core.validation.conninstance.location"),
-    InvalidConnPoolConf("org.apache.syncope.core.validation.conninstance.poolConf"),
-    InvalidMapping("org.apache.syncope.core.validation.mapping"),
-    InvalidMSchema("org.apache.syncope.core.validation.attrvalue.mSchema"),
-    InvalidMDerSchema("org.apache.syncope.core.validation.attrvalue.mDerSchema"),
-    InvalidMVirSchema("org.apache.syncope.core.validation.attrvalue.mVirSchema"),
-    InvalidName("org.apache.syncope.core.validation.name"),
-    InvalidNotification("org.apache.syncope.core.validation.notification"),
-    InvalidPassword("org.apache.syncope.core.validation.syncopeuser.password"),
-    InvalidPasswordPolicy("org.apache.syncope.core.validation.passwordpolicy"),
-    InvalidPolicy("org.apache.syncope.core.validation.policy"),
-    InvalidPropagationTask("org.apache.syncope.core.validation.propagationtask"),
-    InvalidRSchema("org.apache.syncope.core.validation.attrvalue.rSchema"),
-    InvalidRDerSchema("org.apache.syncope.core.validation.attrvalue.rDerSchema"),
-    InvalidRVirSchema("org.apache.syncope.core.validation.attrvalue.rVirSchema"),
-    InvalidReport("org.apache.syncope.core.validation.report"),
-    InvalidResource("org.apache.syncope.core.validation.externalresource"),
-    InvalidRoleOwner("org.apache.syncope.core.validation.syncoperole.owner"),
-    InvalidSchemaEncrypted("org.apache.syncope.core.validation.schema.encrypted"),
-    InvalidSchemaEnum("org.apache.syncope.core.validation.schema.enum"),
-    InvalidSchemaMultivalueUnique("org.apache.syncope.core.validation.schema.multivalueUnique"),
-    InvalidSchedTask("org.apache.syncope.core.validation.schedtask"),
-    InvalidSyncTask("org.apache.syncope.core.validation.synctask"),
-    InvalidSyncPolicy("org.apache.syncope.core.validation.syncpolicy"),
-    InvalidUSchema("org.apache.syncope.core.validation.attrvalue.uSchema"),
-    InvalidUDerSchema("org.apache.syncope.core.validation.attrvalue.derSchema"),
-    InvalidUVirSchema("org.apache.syncope.core.validation.attrvalue.uVirSchema"),
-    InvalidUsername("org.apache.syncope.core.validation.syncopeuser.username"),
-    InvalidValueList("org.apache.syncope.core.validation.attr.valueList"),
-    MoreThanOneNonNull("org.apache.syncope.core.validation.attrvalue.moreThanOneNonNull");
+    InvalidAccountPolicy("org.apache.syncope.persistence.validation.accountpolicy"),
+    InvalidConnInstanceLocation("org.apache.syncope.persistence.validation.conninstance.location"),
+    InvalidConnPoolConf("org.apache.syncope.persistence.validation.conninstance.poolConf"),
+    InvalidCPlainSchema("org.apache.syncope.persistence.validation.attrvalue.cPlainSchema"),
+    InvalidMapping("org.apache.syncope.persistence.validation.mapping"),
+    InvalidMPlainSchema("org.apache.syncope.persistence.validation.attrvalue.mPlainSchema"),
+    InvalidMDerSchema("org.apache.syncope.persistence.validation.attrvalue.mDerSchema"),
+    InvalidMVirSchema("org.apache.syncope.persistence.validation.attrvalue.mVirSchema"),
+    InvalidName("org.apache.syncope.persistence.validation.name"),
+    InvalidNotification("org.apache.syncope.persistence.validation.notification"),
+    InvalidPassword("org.apache.syncope.persistence.validation.syncopeuser.password"),
+    InvalidPasswordPolicy("org.apache.syncope.persistence.validation.passwordpolicy"),
+    InvalidPolicy("org.apache.syncope.persistence.validation.policy"),
+    InvalidPropagationTask("org.apache.syncope.persistence.validation.propagationtask"),
+    InvalidRPlainSchema("org.apache.syncope.persistence.validation.attrvalue.rPlainSchema"),
+    InvalidRDerSchema("org.apache.syncope.persistence.validation.attrvalue.rDerSchema"),
+    InvalidRVirSchema("org.apache.syncope.persistence.validation.attrvalue.rVirSchema"),
+    InvalidReport("org.apache.syncope.persistence.validation.report"),
+    InvalidResource("org.apache.syncope.persistence.validation.externalresource"),
+    InvalidRoleOwner("org.apache.syncope.persistence.validation.syncoperole.owner"),
+    InvalidSchemaEncrypted("org.apache.syncope.persistence.validation.schema.encrypted"),
+    InvalidSchemaEnum("org.apache.syncope.persistence.validation.schema.enum"),
+    InvalidSchemaMultivalueUnique("org.apache.syncope.persistence.validation.schema.multivalueUnique"),
+    InvalidSchedTask("org.apache.syncope.persistence.validation.schedtask"),
+    InvalidSyncTask("org.apache.syncope.persistence.validation.synctask"),
+    InvalidSyncPolicy("org.apache.syncope.persistence.validation.syncpolicy"),
+    InvalidUPlainSchema("org.apache.syncope.persistence.validation.attrvalue.uPlainSchema"),
+    InvalidUDerSchema("org.apache.syncope.persistence.validation.attrvalue.derSchema"),
+    InvalidUVirSchema("org.apache.syncope.persistence.validation.attrvalue.uVirSchema"),
+    InvalidUsername("org.apache.syncope.persistence.validation.syncopeuser.username"),
+    InvalidValueList("org.apache.syncope.persistence.validation.attr.valueList"),
+    MoreThanOneNonNull("org.apache.syncope.persistence.validation.attrvalue.moreThanOneNonNull");
 
     private String message;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java
new file mode 100644
index 0000000..448b3a9
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java
@@ -0,0 +1,47 @@
+/*
+ * 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.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Status of a propagation task execution.
+ *
+ * CREATED -&gt; SUBMITTED or UBSUBMITTED (depending on the external resource to
+ * return success or failure).
+ * SUBMITTED -&gt; SUCCESS or FAILURE (depending on the external resource to
+ * report success or failure).
+ */
+@XmlEnum
+public enum PropagationTaskExecStatus {
+
+    CREATED,
+    SUBMITTED,
+    UNSUBMITTED,
+    SUCCESS,
+    FAILURE;
+
+    public boolean isSuccessful() {
+        return this == SUCCESS || this == SUBMITTED;
+    }
+
+    public static PropagationTaskExecStatus fromString(final String value) {
+        return PropagationTaskExecStatus.valueOf(value.toUpperCase());
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
----------------------------------------------------------------------
diff --git a/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
new file mode 100644
index 0000000..a20d0a7
--- /dev/null
+++ b/syncope620/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
@@ -0,0 +1,54 @@
+/*
+ * 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.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum TaskType {
+
+    PROPAGATION("propagation"),
+    NOTIFICATION("notification"),
+    SCHEDULED("sched"),
+    SYNCHRONIZATION("sync"),
+    PUSH("push");
+
+    private String name;
+
+    private TaskType(final String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    public static TaskType fromString(final String name) {
+        if (name != null) {
+            for (TaskType t : TaskType.values()) {
+                if (t.name.equalsIgnoreCase(name)) {
+                    return t;
+                }
+            }
+        }
+
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/pom.xml b/syncope620/pom.xml
index 368c76e..7587710 100644
--- a/syncope620/pom.xml
+++ b/syncope620/pom.xml
@@ -303,12 +303,47 @@ under the License.
     <syncope.version>${project.version}</syncope.version>
 
     <connid.version>1.4.0.0</connid.version>
+    <connid.soap.version>1.3.0</connid.soap.version>
+    <connid.db.table.version>2.2.0</connid.db.table.version>
+    <connid.csvdir.version>0.8</connid.csvdir.version>
+    <connid.ldap.version>1.4.0</connid.ldap.version>
+    <connid.ad.version>1.2.1</connid.ad.version>
 
     <jackson.version>2.4.4</jackson.version>
 
+    <spring.version>4.1.4.RELEASE</spring.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>
+    <hibernate-validator.version>5.1.3.Final</hibernate-validator.version>
+
+    <jasypt.version>1.9.2</jasypt.version>
+
+    <quartz.version>2.2.1</quartz.version>
+
+    <slf4j.version>1.7.9</slf4j.version>
     <log4j.version>2.1</log4j.version>
 
+    <commons-io.version>2.4</commons-io.version>
+    <commons-codec.version>1.10</commons-codec.version>
+    <commons-jexl.version>2.1.1</commons-jexl.version>
     <commons-lang.version>3.3.2</commons-lang.version>
+    <commons.logging.version>1.1.3</commons.logging.version>
+
+    <h2.version>1.4.184</h2.version>
+    <junit.version>4.12</junit.version>
+
+    <conf.directory>${project.build.directory}/test-classes</conf.directory>
+    <bundles.directory>${project.build.directory}/bundles</bundles.directory>
+    <connid.location>file:${bundles.directory}/</connid.location>
+    <log.directory>${project.build.directory}/log</log.directory>
+    <activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory>
+    
+    <anonymousUser>anonymous</anonymousUser>
+    <!-- static keys, only used for build: generated overlays will override during archetype:generate -->
+    <anonymousKey>anonymousKey</anonymousKey>
+    <secretKey>1abcdefghilmnopqrstuvz2!</secretKey>
 
     <targetJdk>1.7</targetJdk>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -322,14 +357,109 @@ under the License.
         <artifactId>validation-api</artifactId>
         <version>1.1.0.Final</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-jpa_2.0_spec</artifactId>
+        <version>1.1</version> 
+      </dependency>
+      <dependency>
+        <groupId>javax.el</groupId>
+        <artifactId>javax.el-api</artifactId>
+        <version>3.0.0</version>
+        <scope>provided</scope>
+      </dependency>
       
       <dependency>
+        <groupId>org.apache.openjpa</groupId>
+        <artifactId>openjpa-jdbc</artifactId>
+        <version>${openjpa.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.openjpa</groupId>
+        <artifactId>openjpa-persistence-jdbc</artifactId>
+        <version>${openjpa.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-dbcp2</artifactId>
+        <version>${commons-dbcp.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.hibernate</groupId>
+        <artifactId>hibernate-validator</artifactId>
+        <version>${hibernate-validator.version}</version>
+      </dependency>
+            
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-core</artifactId>
+        <version>${jackson.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
+        <version>${jackson.version}</version>
+      </dependency>
+      <dependency>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-annotations</artifactId>
         <version>${jackson.version}</version>
       </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.jaxrs</groupId>
+        <artifactId>jackson-jaxrs-json-provider</artifactId>
+        <version>${jackson.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.module</groupId>
+        <artifactId>jackson-module-afterburner</artifactId>
+        <version>${jackson.version}</version>
+      </dependency>
+            
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-context</artifactId>
+        <version>${spring.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-tx</artifactId>
+        <version>${spring.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-jdbc</artifactId>
+        <version>${spring.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-orm</artifactId>
+        <version>${spring.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework.security</groupId>
+        <artifactId>spring-security-core</artifactId>
+        <version>${spring-security.version}</version>
+      </dependency>
       
       <dependency>
+        <groupId>commons-io</groupId>
+        <artifactId>commons-io</artifactId>
+        <version>${commons-io.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>commons-codec</groupId>
+        <artifactId>commons-codec</artifactId>
+        <version>${commons-codec.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-jexl</artifactId>
+        <version>${commons-jexl.version}</version>
+      </dependency>
+      <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-lang3</artifactId>
         <version>${commons-lang.version}</version>
@@ -340,12 +470,64 @@ under the License.
         <artifactId>connector-framework</artifactId>
         <version>${connid.version}</version>
       </dependency>
+      <dependency>
+        <groupId>net.tirasa.connid</groupId>
+        <artifactId>connector-framework-internal</artifactId>
+        <version>${connid.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>net.tirasa.connid</groupId>
+        <artifactId>slf4j-logging</artifactId>
+        <version>${connid.version}</version>
+      </dependency>
       
       <dependency>
+        <groupId>com.h2database</groupId>
+        <artifactId>h2</artifactId>
+        <version>${h2.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.jasypt</groupId>
+        <artifactId>jasypt</artifactId>
+        <version>${jasypt.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.quartz-scheduler</groupId>
+        <artifactId>quartz</artifactId>
+        <version>${quartz.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>c3p0</groupId>
+            <artifactId>c3p0</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+        <version>${slf4j.version}</version>
+      </dependency>
+      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-api</artifactId>
         <version>${log4j.version}</version>
       </dependency>
+      
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-test</artifactId>
+        <version>${spring.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${junit.version}</version>
+        <scope>test</scope>
+      </dependency>
     </dependencies>
 
   </dependencyManagement>
@@ -387,6 +569,30 @@ under the License.
             <!--<compilerArgument>-Xlint:unchecked</compilerArgument>-->
           </configuration>
         </plugin>
+        
+        <plugin>
+          <groupId>org.apache.openjpa</groupId>
+          <artifactId>openjpa-maven-plugin</artifactId>
+          <version>${openjpa.version}</version>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.18</version>
+          <configuration>
+            <redirectTestOutputToFile>true</redirectTestOutputToFile>
+            <encoding>utf-8</encoding>
+            <runOrder>alphabetical</runOrder>
+            <argLine>-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>
+          </configuration>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>1.3.2</version>
+        </plugin>
       </plugins>
     </pluginManagement>
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/pom.xml b/syncope620/server/persistence-api/pom.xml
index 5f88243..ff1d632 100644
--- a/syncope620/server/persistence-api/pom.xml
+++ b/syncope620/server/persistence-api/pom.xml
@@ -43,10 +43,18 @@ under the License.
       <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.apache.syncope.common</groupId>
-      <artifactId>syncope-lib</artifactId>
+      <artifactId>syncope-common-lib</artifactId>
       <version>${project.version}</version>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java
new file mode 100644
index 0000000..4e65eb3
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/RoleEntitlementUtil.java
@@ -0,0 +1,88 @@
+/*
+ * 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.persistence.api;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+import org.apache.syncope.persistence.api.entity.Entitlement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Utility class for manipulating entitlements.
+ */
+public final class RoleEntitlementUtil {
+
+    private static final Pattern ROLE_ENTITLEMENT_NAME_PATTERN = Pattern.compile("^ROLE_([\\d])+");
+
+    private static final Logger LOG = LoggerFactory.getLogger(RoleEntitlementUtil.class);
+
+    public static String getEntitlementNameFromRoleId(final Long roleId) {
+        return "ROLE_" + roleId;
+    }
+
+    public static boolean isRoleEntitlement(final String entitlementName) {
+        return ROLE_ENTITLEMENT_NAME_PATTERN.matcher(entitlementName).matches();
+    }
+
+    public static Long getRoleId(final String entitlementName) {
+        Long result = null;
+
+        if (isRoleEntitlement(entitlementName)) {
+            try {
+                result = Long.valueOf(entitlementName.substring(entitlementName.indexOf('_') + 1));
+            } catch (Exception e) {
+                LOG.error("unable to parse {} to Long", entitlementName, e);
+            }
+        }
+
+        return result;
+    }
+
+    public static Set<Long> getRoleIds(final Set<String> entitlements) {
+        Set<Long> result = new HashSet<>();
+
+        for (String entitlement : entitlements) {
+            if (isRoleEntitlement(entitlement)) {
+                Long roleId = getRoleId(entitlement);
+                if (roleId != null) {
+                    result.add(roleId);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    public static Set<Long> getRoleIds(final List<Entitlement> entitlements) {
+        Set<String> names = new HashSet<>(entitlements.size());
+        for (Entitlement entitlement : entitlements) {
+            names.add(entitlement.getKey());
+        }
+        return getRoleIds(names);
+    }
+
+    /**
+     * Private default constructor, for static-only classes.
+     */
+    private RoleEntitlementUtil() {
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java
new file mode 100644
index 0000000..2822c21
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidEntityException.java
@@ -0,0 +1,129 @@
+/*
+ * 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.persistence.api.attrvalue.validation;
+
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.ValidationException;
+import org.apache.syncope.common.lib.types.EntityViolationType;
+
+/**
+ * Exception thrown when any JPA entity fails bean validation.
+ */
+public class InvalidEntityException extends ValidationException {
+
+    private static final long serialVersionUID = 3249297275444409691L;
+
+    private final String entityClassSimpleName;
+
+    private final Map<Class<?>, Set<EntityViolationType>> violations = new HashMap<>();
+
+    /**
+     * Constructs a singleton map of violations from given parameters.
+     *
+     * @param entityClass class of invalid entity
+     * @param entityViolationType type of violation found
+     * @param message message to be associated to the violation
+     */
+    public InvalidEntityException(final Class<?> entityClass,
+            final EntityViolationType entityViolationType, final String message) {
+
+        super();
+
+        this.entityClassSimpleName = entityClass.getSimpleName();
+
+        entityViolationType.setMessage(message.trim());
+
+        this.violations.put(entityClass, EnumSet.noneOf(EntityViolationType.class));
+        this.violations.get(entityClass).add(entityViolationType);
+    }
+
+    /**
+     * Constructs a map of violations out of given <tt>ConstraintViolation</tt> set.
+     *
+     * @param entityClassSimpleName simple class name of invalid entity
+     * @param violations as returned by bean validation
+     */
+    public InvalidEntityException(final String entityClassSimpleName,
+            final Set<ConstraintViolation<Object>> violations) {
+
+        super();
+
+        this.entityClassSimpleName = entityClassSimpleName;
+
+        for (ConstraintViolation<Object> violation : violations) {
+            int firstComma = violation.getMessageTemplate().indexOf(';');
+
+            final String key = violation.getMessageTemplate().substring(
+                    0, firstComma > 0 ? firstComma : violation.getMessageTemplate().length());
+
+            final String message = violation.getMessageTemplate().substring(firstComma > 0 ? firstComma + 1 : 0);
+
+            EntityViolationType entityViolationType;
+
+            try {
+                entityViolationType = EntityViolationType.valueOf(key.trim());
+            } catch (IllegalArgumentException e) {
+                entityViolationType = EntityViolationType.Standard;
+            }
+
+            entityViolationType.setMessage(message.trim());
+
+            if (!this.violations.containsKey(violation.getLeafBean().getClass())) {
+                this.violations.put(violation.getLeafBean().getClass(), EnumSet.noneOf(EntityViolationType.class));
+            }
+
+            this.violations.get(violation.getLeafBean().getClass()).add(entityViolationType);
+        }
+    }
+
+    public final boolean hasViolation(final EntityViolationType type) {
+        boolean found = false;
+        for (Class<?> entity : violations.keySet()) {
+            if (violations.get(entity).contains(type)) {
+                found = true;
+            }
+        }
+
+        return found;
+    }
+
+    public String getEntityClassSimpleName() {
+        return entityClassSimpleName;
+    }
+
+    public final Map<Class<?>, Set<EntityViolationType>> getViolations() {
+        return violations;
+    }
+
+    @Override
+    public String getMessage() {
+        StringBuilder sb = new StringBuilder();
+
+        for (Class<?> entity : violations.keySet()) {
+            sb.append(entity.getSimpleName()).append(" ").append(violations.get(entity).toString()).append(", ");
+        }
+        sb.delete(sb.lastIndexOf(", "), sb.length());
+
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java
new file mode 100644
index 0000000..37466e3
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/InvalidPlainAttrValueException.java
@@ -0,0 +1,43 @@
+/*
+ * 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.persistence.api.attrvalue.validation;
+
+import javax.validation.ValidationException;
+import org.apache.syncope.persistence.api.entity.PlainAttrValue;
+
+public class InvalidPlainAttrValueException extends ValidationException {
+
+    private static final long serialVersionUID = -5023202610580202148L;
+
+    public InvalidPlainAttrValueException(final String errorMessage) {
+        super(errorMessage);
+    }
+
+    public InvalidPlainAttrValueException(final String errorMessage, final Throwable cause) {
+        super(errorMessage, cause);
+    }
+
+    public InvalidPlainAttrValueException(final PlainAttrValue value) {
+        this("Could not validate " + value.getValue());
+    }
+
+    public InvalidPlainAttrValueException(final PlainAttrValue value, Throwable cause) {
+        this("Could not validate " + value.getValue(), cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java
new file mode 100644
index 0000000..efb1fd9
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/ParsingValidationException.java
@@ -0,0 +1,30 @@
+/*
+ * 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.persistence.api.attrvalue.validation;
+
+import javax.validation.ValidationException;
+
+public class ParsingValidationException extends ValidationException {
+
+    private static final long serialVersionUID = 5669262895008285522L;
+
+    public ParsingValidationException(final String message, final Throwable cause) {
+        super(message, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java
new file mode 100644
index 0000000..bb88519
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/attrvalue/validation/Validator.java
@@ -0,0 +1,27 @@
+/*
+ * 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.persistence.api.attrvalue.validation;
+
+import org.apache.syncope.persistence.api.entity.PlainAttrValue;
+
+public interface Validator {
+
+    void validate(String value, PlainAttrValue attrValue)
+            throws ParsingValidationException, InvalidPlainAttrValueException;
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java
new file mode 100644
index 0000000..25b0ecd
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentExporter.java
@@ -0,0 +1,28 @@
+/*
+ * 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.persistence.api.content;
+
+import java.io.OutputStream;
+import javax.xml.transform.TransformerConfigurationException;
+import org.xml.sax.SAXException;
+
+public interface ContentExporter {
+
+    void export(OutputStream output, String wfTablePrefix) throws SAXException, TransformerConfigurationException;
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java
new file mode 100644
index 0000000..2f14027
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/content/ContentLoader.java
@@ -0,0 +1,25 @@
+/*
+ * 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.persistence.api.content;
+
+public interface ContentLoader {
+
+    void load();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
index 85b00b4..e07c02c 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/AttrTemplateDAO.java
@@ -20,9 +20,9 @@ package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
 import org.apache.syncope.persistence.api.entity.AttrTemplate;
-import org.apache.syncope.persistence.api.entity.NormSchema;
+import org.apache.syncope.persistence.api.entity.Schema;
 
-public interface AttrTemplateDAO<K extends NormSchema> extends DAO<AttrTemplate<K>> {
+public interface AttrTemplateDAO<K extends Schema> extends DAO<AttrTemplate<K>, Long> {
 
     <T extends AttrTemplate<K>> T find(Long key, Class<T> reference);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
index 2b9d978..359c603 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConfDAO.java
@@ -18,18 +18,18 @@
  */
 package org.apache.syncope.persistence.api.dao;
 
-import org.apache.syncope.persistence.api.entity.conf.CNormAttr;
+import org.apache.syncope.persistence.api.entity.conf.CPlainAttr;
 import org.apache.syncope.persistence.api.entity.conf.Conf;
 
-public interface ConfDAO extends DAO<Conf> {
+public interface ConfDAO extends DAO<Conf, Long> {
 
-    CNormAttr find(String key);
+    CPlainAttr find(String key);
 
-    CNormAttr find(String key, String defaultValue);
+    CPlainAttr find(String key, String defaultValue);
 
     Conf get();
 
-    Conf save(CNormAttr attr);
+    Conf save(CPlainAttr attr);
 
     Conf delete(String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java
new file mode 100644
index 0000000..90c10c4
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ConnInstanceDAO.java
@@ -0,0 +1,34 @@
+/*
+ * 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.persistence.api.dao;
+
+import java.util.List;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.entity.ConnInstance;
+
+public interface ConnInstanceDAO extends DAO<ConnInstance, Long> {
+
+    ConnInstance find(Long key);
+
+    List<ConnInstance> findAll();
+
+    ConnInstance save(ConnInstance connector) throws InvalidEntityException;
+
+    void delete(Long key);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
index 54e9404..504f7e6 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DAO.java
@@ -20,11 +20,11 @@ package org.apache.syncope.persistence.api.dao;
 
 import org.apache.syncope.persistence.api.entity.Entity;
 
-public interface DAO<T extends Entity> {
+public interface DAO<E extends Entity<KEY>, KEY> {
 
-    void refresh(T entity);
+    void refresh(E entity);
 
-    void detach(T entity);
+    void detach(E entity);
 
     void flush();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
index 2c81734..5c8116b 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerAttrDAO.java
@@ -19,19 +19,18 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.DerAttr;
-import org.apache.syncope.persistence.api.entity.NormAttr;
 
-public interface DerAttrDAO<K extends NormAttr> extends DAO<DerAttr<K>> {
+public interface DerAttrDAO extends DAO<DerAttr, Long> {
 
-    <T extends DerAttr<K>> T find(Long key, Class<T> reference);
+    <T extends DerAttr> T find(Long key, Class<T> reference);
 
-    <T extends DerAttr<K>> List<T> findAll(Class<T> reference);
+    <T extends DerAttr> List<T> findAll(Class<T> reference);
 
-    <T extends DerAttr<K>> T save(T derAttr) throws InvalidEntityException;
+    <T extends DerAttr> T save(T derAttr) throws InvalidEntityException;
 
-    <T extends DerAttr<K>> void delete(Long key, Class<T> reference);
+    <T extends DerAttr> void delete(Long key, Class<T> reference);
 
-    <T extends DerAttr<K>> void delete(T derAttr);
+    <T extends DerAttr> void delete(T derAttr);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
index 3d39d38..46972a2 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/DerSchemaDAO.java
@@ -19,19 +19,18 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.AttributableUtil;
 import org.apache.syncope.persistence.api.entity.DerAttr;
 import org.apache.syncope.persistence.api.entity.DerSchema;
-import org.apache.syncope.persistence.api.entity.NormAttr;
 
-public interface DerSchemaDAO extends DAO<DerSchema> {
+public interface DerSchemaDAO extends DAO<DerSchema, String> {
 
     <T extends DerSchema> T find(String name, Class<T> reference);
 
     <T extends DerSchema> List<T> findAll(Class<T> reference);
 
-    <T extends DerAttr<K>, K extends NormAttr> List<T> findAttrs(DerSchema schema, Class<T> reference);
+    <T extends DerAttr> List<T> findAttrs(DerSchema schema, Class<T> reference);
 
     <T extends DerSchema> T save(T derSchema) throws InvalidEntityException;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
index c38076e..8ca510b 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/EntitlementDAO.java
@@ -19,11 +19,11 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.Entitlement;
 import org.apache.syncope.persistence.api.entity.role.Role;
 
-public interface EntitlementDAO extends DAO<Entitlement> {
+public interface EntitlementDAO extends DAO<Entitlement, String> {
 
     Entitlement find(String key);
 
@@ -31,7 +31,7 @@ public interface EntitlementDAO extends DAO<Entitlement> {
 
     Entitlement save(Entitlement entitlement) throws InvalidEntityException;
 
-    Entitlement saveEntitlementRole(Role role);
+    Entitlement saveRoleEntitlement(Role role);
 
     void delete(String key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
index 3d03505..5b3d459 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ExternalResourceDAO.java
@@ -21,12 +21,12 @@ package org.apache.syncope.persistence.api.dao;
 import java.util.List;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.PolicyType;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.ExternalResource;
 import org.apache.syncope.persistence.api.entity.MappingItem;
 import org.apache.syncope.persistence.api.entity.Policy;
 
-public interface ExternalResourceDAO extends DAO<ExternalResource> {
+public interface ExternalResourceDAO extends DAO<ExternalResource, String> {
 
     ExternalResource find(String key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
index bcf0ac2..13808c3 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/LoggerDAO.java
@@ -20,10 +20,10 @@ package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
 import org.apache.syncope.common.lib.types.LoggerType;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.Logger;
 
-public interface LoggerDAO extends DAO<Logger> {
+public interface LoggerDAO extends DAO<Logger, String> {
 
     Logger find(String key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
index a586aae..43412fe 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/MembershipDAO.java
@@ -19,12 +19,12 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.membership.Membership;
 import org.apache.syncope.persistence.api.entity.role.Role;
 import org.apache.syncope.persistence.api.entity.user.User;
 
-public interface MembershipDAO extends DAO<Membership> {
+public interface MembershipDAO extends DAO<Membership, Long> {
 
     Membership find(Long key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrDAO.java
deleted file mode 100644
index 2748c34..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrDAO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.persistence.api.dao;
-
-import org.apache.syncope.persistence.api.entity.NormAttr;
-
-public interface NormAttrDAO extends DAO<NormAttr> {
-
-    <T extends NormAttr> T find(Long key, Class<T> reference);
-
-    <T extends NormAttr> void delete(Long key, Class<T> reference);
-
-    <T extends NormAttr> void delete(T attr);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrValueDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrValueDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrValueDAO.java
deleted file mode 100644
index 4066913..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormAttrValueDAO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.NormAttrValue;
-
-public interface NormAttrValueDAO extends DAO<NormAttrValue> {
-
-    <T extends NormAttrValue> T find(Long key, Class<T> reference);
-
-    <T extends NormAttrValue> List<T> findAll(Class<T> reference);
-
-    <T extends NormAttrValue> T save(T attributeValue) throws InvalidEntityException;
-
-    <T extends NormAttrValue> void delete(Long key, Class<T> reference);
-
-    <T extends NormAttrValue> void delete(T attributeValue);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormSchemaDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormSchemaDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormSchemaDAO.java
deleted file mode 100644
index 88de3e1..0000000
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NormSchemaDAO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
-import org.apache.syncope.persistence.api.entity.AttributableUtil;
-import org.apache.syncope.persistence.api.entity.NormAttr;
-import org.apache.syncope.persistence.api.entity.NormSchema;
-
-public interface NormSchemaDAO extends DAO<NormSchema> {
-
-    <T extends NormSchema> T find(String key, Class<T> reference);
-
-    <T extends NormSchema> List<T> findAll(Class<T> reference);
-
-    <T extends NormAttr> List<T> findAttrs(NormSchema schema, Class<T> reference);
-
-    <T extends NormSchema> T save(T schema) throws InvalidEntityException;
-
-    void delete(String name, AttributableUtil attributableUtil);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
index 3488303..fadb811 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/NotificationDAO.java
@@ -19,10 +19,10 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.Notification;
 
-public interface NotificationDAO extends DAO<Notification> {
+public interface NotificationDAO extends DAO<Notification, Long> {
 
     Notification find(Long key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java
new file mode 100644
index 0000000..8b21ac2
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrDAO.java
@@ -0,0 +1,30 @@
+/*
+ * 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.persistence.api.dao;
+
+import org.apache.syncope.persistence.api.entity.PlainAttr;
+
+public interface PlainAttrDAO extends DAO<PlainAttr, Long> {
+
+    <T extends PlainAttr> T find(Long key, Class<T> reference);
+
+    <T extends PlainAttr> void delete(Long key, Class<T> reference);
+
+    <T extends PlainAttr> void delete(T attr);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java
new file mode 100644
index 0000000..e6d9226
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainAttrValueDAO.java
@@ -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.
+ */
+package org.apache.syncope.persistence.api.dao;
+
+import java.util.List;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.entity.PlainAttrValue;
+
+public interface PlainAttrValueDAO extends DAO<PlainAttrValue, Long> {
+
+    <T extends PlainAttrValue> T find(Long key, Class<T> reference);
+
+    <T extends PlainAttrValue> List<T> findAll(Class<T> reference);
+
+    <T extends PlainAttrValue> T save(T attributeValue) throws InvalidEntityException;
+
+    <T extends PlainAttrValue> void delete(Long key, Class<T> reference);
+
+    <T extends PlainAttrValue> void delete(T attributeValue);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java
new file mode 100644
index 0000000..ea9860e
--- /dev/null
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PlainSchemaDAO.java
@@ -0,0 +1,38 @@
+/*
+ * 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.persistence.api.dao;
+
+import java.util.List;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.entity.AttributableUtil;
+import org.apache.syncope.persistence.api.entity.PlainAttr;
+import org.apache.syncope.persistence.api.entity.PlainSchema;
+
+public interface PlainSchemaDAO extends DAO<PlainSchema, String> {
+
+    <T extends PlainSchema> T find(String key, Class<T> reference);
+
+    <T extends PlainSchema> List<T> findAll(Class<T> reference);
+
+    <T extends PlainAttr> List<T> findAttrs(PlainSchema schema, Class<T> reference);
+
+    <T extends PlainSchema> T save(T schema) throws InvalidEntityException;
+
+    void delete(String name, AttributableUtil attributableUtil);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
index 27f4edf..0161c23 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/PolicyDAO.java
@@ -26,7 +26,7 @@ import org.apache.syncope.persistence.api.entity.PasswordPolicy;
 import org.apache.syncope.persistence.api.entity.Policy;
 import org.apache.syncope.persistence.api.entity.SyncPolicy;
 
-public interface PolicyDAO extends DAO<Policy> {
+public interface PolicyDAO extends DAO<Policy, Long> {
 
     <T extends Policy> T find(Long key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
index eef08f7..d154534 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportDAO.java
@@ -20,10 +20,10 @@ package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
 import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.Report;
 
-public interface ReportDAO extends DAO<Report> {
+public interface ReportDAO extends DAO<Report, Long> {
 
     Report find(Long key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
index 1cad2c3..dc1c2bf 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/ReportExecDAO.java
@@ -19,11 +19,11 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.Report;
 import org.apache.syncope.persistence.api.entity.ReportExec;
 
-public interface ReportExecDAO extends DAO<ReportExec> {
+public interface ReportExecDAO extends DAO<ReportExec, Long> {
 
     ReportExec find(Long key);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
index a45b676..b2d7dd3 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/RoleDAO.java
@@ -21,18 +21,18 @@ package org.apache.syncope.persistence.api.dao;
 import java.util.List;
 import org.apache.syncope.common.lib.types.PolicyType;
 import org.apache.syncope.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.Entitlement;
 import org.apache.syncope.persistence.api.entity.ExternalResource;
 import org.apache.syncope.persistence.api.entity.Policy;
 import org.apache.syncope.persistence.api.entity.membership.Membership;
 import org.apache.syncope.persistence.api.entity.role.RDerAttr;
-import org.apache.syncope.persistence.api.entity.role.RNormAttr;
-import org.apache.syncope.persistence.api.entity.role.RNormAttrValue;
+import org.apache.syncope.persistence.api.entity.role.RPlainAttr;
+import org.apache.syncope.persistence.api.entity.role.RPlainAttrValue;
 import org.apache.syncope.persistence.api.entity.role.RVirAttr;
 import org.apache.syncope.persistence.api.entity.role.Role;
 
-public interface RoleDAO extends SubjectDAO<RNormAttr, RDerAttr, RVirAttr> {
+public interface RoleDAO extends SubjectDAO<RPlainAttr, RDerAttr, RVirAttr> {
 
     Role find(Long key);
 
@@ -58,9 +58,9 @@ public interface RoleDAO extends SubjectDAO<RNormAttr, RDerAttr, RVirAttr> {
 
     List<Role> findByDerAttrValue(String schemaName, String value);
 
-    List<Role> findByAttrValue(String schemaName, RNormAttrValue attrValue);
+    List<Role> findByAttrValue(String schemaName, RPlainAttrValue attrValue);
 
-    Role findByAttrUniqueValue(String schemaName, RNormAttrValue attrUniqueValue);
+    Role findByAttrUniqueValue(String schemaName, RPlainAttrValue attrUniqueValue);
 
     List<Role> findByResource(ExternalResource resource);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/556d5186/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
index a1ce799..efe1aa7 100644
--- a/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
+++ b/syncope620/server/persistence-api/src/main/java/org/apache/syncope/persistence/api/dao/SecurityQuestionDAO.java
@@ -19,10 +19,10 @@
 package org.apache.syncope.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.persistence.api.dao.validation.InvalidEntityException;
+import org.apache.syncope.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.persistence.api.entity.user.SecurityQuestion;
 
-public interface SecurityQuestionDAO extends DAO<SecurityQuestion> {
+public interface SecurityQuestionDAO extends DAO<SecurityQuestion, Long> {
 
     SecurityQuestion find(Long key);
 


Mime
View raw message