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/02/12 10:14:45 UTC

[40/54] [abbrv] [partial] syncope git commit: [SYNCOPE-620] Renaming 'server' after 'core', to provide continuity with older releases (especially for archetype)

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportletConfInstance.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportletConfInstance.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportletConfInstance.java
new file mode 100644
index 0000000..5b9196d
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportletConfInstance.java
@@ -0,0 +1,33 @@
+/*
+ * 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.core.persistence.api.entity;
+
+import org.apache.syncope.common.lib.report.ReportletConf;
+
+public interface ReportletConfInstance extends Entity<Long> {
+
+    ReportletConf getInstance();
+
+    Report getReport();
+
+    void setInstance(ReportletConf instance);
+
+    void setReport(Report report);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Schema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Schema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Schema.java
new file mode 100644
index 0000000..cef3701
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Schema.java
@@ -0,0 +1,37 @@
+/*
+ * 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.core.persistence.api.entity;
+
+import org.apache.syncope.common.lib.types.AttrSchemaType;
+
+public interface Schema extends Entity<String> {
+
+    AttrSchemaType getType();
+
+    String getMandatoryCondition();
+
+    boolean isMultivalue();
+
+    boolean isReadonly();
+
+    boolean isUniqueConstraint();
+
+    void setKey(String name);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Subject.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Subject.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Subject.java
new file mode 100644
index 0000000..78b898c
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Subject.java
@@ -0,0 +1,32 @@
+/*
+ * 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.core.persistence.api.entity;
+
+import java.util.Set;
+
+public interface Subject<N extends PlainAttr, D extends DerAttr, V extends VirAttr> extends Attributable<N, D, V> {
+
+    boolean addResource(ExternalResource resource);
+
+    boolean removeResource(ExternalResource resource);
+
+    Set<String> getResourceNames();
+
+    Set<? extends ExternalResource> getResources();
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/SyncPolicy.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/SyncPolicy.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/SyncPolicy.java
new file mode 100644
index 0000000..3acb092
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/SyncPolicy.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.
+ */
+package org.apache.syncope.core.persistence.api.entity;
+
+public interface SyncPolicy extends Policy {
+    
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirAttr.java
new file mode 100644
index 0000000..9df47cd
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirAttr.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.core.persistence.api.entity;
+
+import java.util.List;
+
+public interface VirAttr extends Attr<VirSchema> {
+
+    List<String> getValues();
+
+    boolean addValue(String value);
+
+    boolean removeValue(String value);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirSchema.java
new file mode 100644
index 0000000..8b796c4
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/VirSchema.java
@@ -0,0 +1,24 @@
+/*
+ * 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.core.persistence.api.entity;
+
+public interface VirSchema extends Schema {
+
+    void setReadonly(boolean readonly);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttr.java
new file mode 100644
index 0000000..852f81b
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttr.java
@@ -0,0 +1,39 @@
+/*
+ * 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.core.persistence.api.entity.conf;
+
+import java.util.List;
+import org.apache.syncope.core.persistence.api.entity.PlainAttr;
+
+public interface CPlainAttr extends PlainAttr {
+
+    @SuppressWarnings("unchecked")
+    @Override
+    Conf getOwner();
+
+    @Override
+    CPlainSchema getSchema();
+
+    @Override
+    List<? extends CPlainAttrValue> getValues();
+
+    @Override
+    CPlainAttrUniqueValue getUniqueValue();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrUniqueValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrUniqueValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrUniqueValue.java
new file mode 100644
index 0000000..6e1277c
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrUniqueValue.java
@@ -0,0 +1,31 @@
+/*
+ * 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.core.persistence.api.entity.conf;
+
+import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue;
+
+public interface CPlainAttrUniqueValue extends PlainAttrUniqueValue {
+
+    @Override
+    CPlainAttr getAttr();
+
+    @Override
+    CPlainSchema getSchema();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrValue.java
new file mode 100644
index 0000000..26f53c6
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainAttrValue.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.core.persistence.api.entity.conf;
+
+import org.apache.syncope.core.persistence.api.entity.PlainAttrValue;
+
+public interface CPlainAttrValue extends PlainAttrValue {
+
+    @Override
+    CPlainAttr getAttr();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainSchema.java
new file mode 100644
index 0000000..5c78eff
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/CPlainSchema.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.core.persistence.api.entity.conf;
+
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+
+public interface CPlainSchema extends PlainSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/Conf.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/Conf.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/Conf.java
new file mode 100644
index 0000000..b40cd39
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/conf/Conf.java
@@ -0,0 +1,39 @@
+/*
+ * 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.core.persistence.api.entity.conf;
+
+import java.util.List;
+import org.apache.syncope.core.persistence.api.entity.Attributable;
+import org.apache.syncope.core.persistence.api.entity.DerAttr;
+import org.apache.syncope.core.persistence.api.entity.VirAttr;
+
+public interface Conf extends Attributable<CPlainAttr, DerAttr, VirAttr> {
+
+    void setKey(Long key);
+
+    @Override
+    boolean addPlainAttr(CPlainAttr attr);
+
+    @Override
+    boolean removePlainAttr(CPlainAttr attr);
+
+    @Override
+    List<? extends CPlainAttr> getPlainAttrs();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttr.java
new file mode 100644
index 0000000..c55ab68
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttr.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.DerAttr;
+
+public interface MDerAttr extends DerAttr {
+
+    @Override
+    Membership getOwner();
+
+    @Override
+    MDerSchema getSchema();
+
+    MDerAttrTemplate getTemplate();
+
+    void setTemplate(MDerAttrTemplate template);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttrTemplate.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttrTemplate.java
new file mode 100644
index 0000000..0fe5ac1
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerAttrTemplate.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+
+public interface MDerAttrTemplate extends AttrTemplate<MDerSchema> {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerSchema.java
new file mode 100644
index 0000000..0cba96b
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MDerSchema.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.DerSchema;
+
+public interface MDerSchema extends DerSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttr.java
new file mode 100644
index 0000000..ede83d0
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttr.java
@@ -0,0 +1,42 @@
+/*
+ * 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.core.persistence.api.entity.membership;
+
+import java.util.List;
+import org.apache.syncope.core.persistence.api.entity.PlainAttr;
+
+public interface MPlainAttr extends PlainAttr {
+
+    @Override
+    Membership getOwner();
+
+    @Override
+    MPlainSchema getSchema();
+
+    MPlainAttrTemplate getTemplate();
+
+    void setTemplate(MPlainAttrTemplate template);
+
+    @Override
+    List<? extends MPlainAttrValue> getValues();
+
+    @Override
+    MPlainAttrUniqueValue getUniqueValue();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrTemplate.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrTemplate.java
new file mode 100644
index 0000000..7a4e515
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrTemplate.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+
+public interface MPlainAttrTemplate extends AttrTemplate<MPlainSchema> {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrUniqueValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrUniqueValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrUniqueValue.java
new file mode 100644
index 0000000..f77f9ff
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrUniqueValue.java
@@ -0,0 +1,31 @@
+/*
+ * 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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue;
+
+public interface MPlainAttrUniqueValue extends PlainAttrUniqueValue {
+
+    @Override
+    MPlainAttr getAttr();
+
+    @Override
+    MPlainSchema getSchema();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrValue.java
new file mode 100644
index 0000000..b92f2fb
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainAttrValue.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.PlainAttrValue;
+
+public interface MPlainAttrValue extends PlainAttrValue {
+
+    @Override
+    MPlainAttr getAttr();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainSchema.java
new file mode 100644
index 0000000..ed94e28
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MPlainSchema.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+
+public interface MPlainSchema extends PlainSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttr.java
new file mode 100644
index 0000000..f710ea6
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttr.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.VirAttr;
+
+public interface MVirAttr extends VirAttr {
+
+    @Override
+    Membership getOwner();
+
+    @Override
+    MVirSchema getSchema();
+
+    MVirAttrTemplate getTemplate();
+
+    void setTemplate(MVirAttrTemplate template);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttrTemplate.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttrTemplate.java
new file mode 100644
index 0000000..0969974
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirAttrTemplate.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+
+public interface MVirAttrTemplate extends AttrTemplate<MVirSchema> {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirSchema.java
new file mode 100644
index 0000000..e13f7bb
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/MVirSchema.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.core.persistence.api.entity.membership;
+
+import org.apache.syncope.core.persistence.api.entity.VirSchema;
+
+public interface MVirSchema extends VirSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java
new file mode 100644
index 0000000..2288bcd
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java
@@ -0,0 +1,53 @@
+/*
+ * 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.core.persistence.api.entity.membership;
+
+import java.util.List;
+import org.apache.syncope.core.persistence.api.entity.Attributable;
+import org.apache.syncope.core.persistence.api.entity.role.Role;
+import org.apache.syncope.core.persistence.api.entity.user.User;
+
+public interface Membership extends Attributable<MPlainAttr, MDerAttr, MVirAttr> {
+
+    Role getRole();
+
+    User getUser();
+
+    void setRole(Role role);
+
+    void setUser(User user);
+
+    @Override
+    MPlainAttr getPlainAttr(String plainSchemaName);
+
+    @Override
+    List<? extends MPlainAttr> getPlainAttrs();
+
+    @Override
+    MDerAttr getDerAttr(String derSchemaName);
+
+    @Override
+    List<? extends MDerAttr> getDerAttrs();
+
+    @Override
+    MVirAttr getVirAttr(String virSchemaName);
+
+    @Override
+    List<? extends MVirAttr> getVirAttrs();
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java
new file mode 100644
index 0000000..af2eb0b
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.DerAttr;
+
+public interface RDerAttr extends DerAttr {
+
+    @Override
+    Role getOwner();
+
+    @Override
+    RDerSchema getSchema();
+
+    RDerAttrTemplate getTemplate();
+
+    void setTemplate(RDerAttrTemplate template);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java
new file mode 100644
index 0000000..605736e
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+
+public interface RDerAttrTemplate extends AttrTemplate<RDerSchema> {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java
new file mode 100644
index 0000000..149b187
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.DerSchema;
+
+public interface RDerSchema extends DerSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java
new file mode 100644
index 0000000..4df8e28
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.Mapping;
+
+public interface RMapping extends Mapping<RMappingItem> {
+    
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java
new file mode 100644
index 0000000..77b5ceb
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java
@@ -0,0 +1,29 @@
+/*
+ * 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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.Mapping;
+import org.apache.syncope.core.persistence.api.entity.MappingItem;
+
+public interface RMappingItem extends MappingItem {
+
+    @Override
+    Mapping<RMappingItem> getMapping();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java
new file mode 100644
index 0000000..c50ce33
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java
@@ -0,0 +1,42 @@
+/*
+ * 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.core.persistence.api.entity.role;
+
+import java.util.List;
+import org.apache.syncope.core.persistence.api.entity.PlainAttr;
+
+public interface RPlainAttr extends PlainAttr {
+
+    @Override
+    Role getOwner();
+
+    @Override
+    RPlainSchema getSchema();
+
+    RPlainAttrTemplate getTemplate();
+
+    void setTemplate(RPlainAttrTemplate template);
+
+    @Override
+    List<? extends RPlainAttrValue> getValues();
+
+    @Override
+    RPlainAttrUniqueValue getUniqueValue();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java
new file mode 100644
index 0000000..2f8ec74
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+
+public interface RPlainAttrTemplate extends AttrTemplate<RPlainSchema> {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java
new file mode 100644
index 0000000..6de3a89
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java
@@ -0,0 +1,31 @@
+/*
+ * 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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue;
+
+public interface RPlainAttrUniqueValue extends PlainAttrUniqueValue {
+
+    @Override
+    RPlainAttr getAttr();
+
+    @Override
+    RPlainSchema getSchema();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java
new file mode 100644
index 0000000..3314397
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.PlainAttrValue;
+
+public interface RPlainAttrValue extends PlainAttrValue {
+
+    @Override
+    RPlainAttr getAttr();
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java
new file mode 100644
index 0000000..fdfefac
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+
+public interface RPlainSchema extends PlainSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java
new file mode 100644
index 0000000..8c3f9ca
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.VirAttr;
+
+public interface RVirAttr extends VirAttr {
+
+    @Override
+    Role getOwner();
+
+    @Override
+    RVirSchema getSchema();
+
+    RVirAttrTemplate getTemplate();
+
+    void setTemplate(RVirAttrTemplate template);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java
new file mode 100644
index 0000000..3df1189
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+
+public interface RVirAttrTemplate extends AttrTemplate<RVirSchema> {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java
new file mode 100644
index 0000000..39476fb
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.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.core.persistence.api.entity.role;
+
+import org.apache.syncope.core.persistence.api.entity.VirSchema;
+
+public interface RVirSchema extends VirSchema {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java
new file mode 100644
index 0000000..e3e4b23
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java
@@ -0,0 +1,168 @@
+/*
+ * 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.core.persistence.api.entity.role;
+
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.core.persistence.api.entity.AccountPolicy;
+import org.apache.syncope.core.persistence.api.entity.AttrTemplate;
+import org.apache.syncope.core.persistence.api.entity.Entitlement;
+import org.apache.syncope.core.persistence.api.entity.PasswordPolicy;
+import org.apache.syncope.core.persistence.api.entity.Schema;
+import org.apache.syncope.core.persistence.api.entity.Subject;
+import org.apache.syncope.core.persistence.api.entity.user.User;
+
+public interface Role extends Subject<RPlainAttr, RDerAttr, RVirAttr> {
+
+    String getName();
+
+    Role getParent();
+
+    boolean addEntitlement(Entitlement entitlement);
+
+    boolean removeEntitlement(Entitlement entitlement);
+
+    /**
+     * Get all inherited attributes from the ancestors.
+     *
+     * @return a list of inherited and only inherited attributes.
+     */
+    List<? extends RPlainAttr> findLastInheritedAncestorPlainAttrs();
+
+    /**
+     * Get all inherited derived attributes from the ancestors.
+     *
+     * @return a list of inherited and only inherited attributes.
+     */
+    List<? extends RDerAttr> findLastInheritedAncestorDerAttrs();
+
+    /**
+     * Get all inherited virtual attributes from the ancestors.
+     *
+     * @return a list of inherited and only inherited attributes.
+     */
+    List<? extends RVirAttr> findLastInheritedAncestorVirAttrs();
+
+    /**
+     * Get first valid account policy.
+     *
+     * @return parent account policy if isInheritAccountPolicy is 'true' and parent is not null, local account policy
+     * otherwise.
+     */
+    AccountPolicy getAccountPolicy();
+
+    <T extends AttrTemplate<K>, K extends Schema> List<T> findInheritedTemplates(Class<T> reference);
+
+    <T extends AttrTemplate<K>, K extends Schema> T getAttrTemplate(
+            Class<T> reference, String schemaName);
+
+    <T extends AttrTemplate<K>, K extends Schema> List<K> getAttrTemplateSchemas(Class<T> reference);
+
+    <T extends AttrTemplate<K>, K extends Schema> List<T> getAttrTemplates(Class<T> reference);
+
+    Set<? extends Entitlement> getEntitlements();
+
+    /**
+     * Get first valid password policy.
+     *
+     * @return parent password policy if isInheritPasswordPolicy is 'true' and parent is not null, local password policy
+     * otherwise
+     */
+    PasswordPolicy getPasswordPolicy();
+
+    Role getRoleOwner();
+
+    User getUserOwner();
+
+    boolean isInheritAccountPolicy();
+
+    boolean isInheritPlainAttrs();
+
+    boolean isInheritDerAttrs();
+
+    boolean isInheritOwner();
+
+    boolean isInheritPasswordPolicy();
+
+    boolean isInheritTemplates();
+
+    boolean isInheritVirAttrs();
+
+    void setAccountPolicy(AccountPolicy accountPolicy);
+
+    void setInheritAccountPolicy(boolean condition);
+
+    void setInheritPlainAttrs(boolean inheritAttrs);
+
+    void setInheritDerAttrs(boolean inheritDerAttrs);
+
+    void setInheritOwner(boolean inheritOwner);
+
+    void setInheritPasswordPolicy(boolean condition);
+
+    void setInheritTemplates(boolean condition);
+
+    void setInheritVirAttrs(boolean inheritVirAttrs);
+
+    void setName(String name);
+
+    void setParent(Role parent);
+
+    void setPasswordPolicy(PasswordPolicy passwordPolicy);
+
+    void setRoleOwner(Role roleOwner);
+
+    void setUserOwner(User userOwner);
+
+    @Override
+    boolean addPlainAttr(RPlainAttr attr);
+
+    @Override
+    boolean addDerAttr(RDerAttr attr);
+
+    @Override
+    boolean addVirAttr(RVirAttr attr);
+
+    @Override
+    RPlainAttr getPlainAttr(String plainSchemaName);
+
+    @Override
+    List<? extends RPlainAttr> getPlainAttrs();
+
+    @Override
+    RDerAttr getDerAttr(String derSchemaName);
+
+    @Override
+    List<? extends RDerAttr> getDerAttrs();
+
+    @Override
+    RVirAttr getVirAttr(String virSchemaName);
+
+    @Override
+    List<? extends RVirAttr> getVirAttrs();
+
+    @Override
+    boolean removePlainAttr(RPlainAttr attr);
+
+    @Override
+    boolean removeDerAttr(RDerAttr derAttr);
+
+    @Override
+    boolean removeVirAttr(RVirAttr virAttr);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/NotificationTask.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/NotificationTask.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/NotificationTask.java
new file mode 100644
index 0000000..754401b
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/NotificationTask.java
@@ -0,0 +1,55 @@
+/*
+ * 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.core.persistence.api.entity.task;
+
+import java.util.Set;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+public interface NotificationTask extends Task {
+
+    String getHtmlBody();
+
+    Set<String> getRecipients();
+
+    String getSender();
+
+    String getSubject();
+
+    String getTextBody();
+
+    TraceLevel getTraceLevel();
+
+    boolean isExecuted();
+
+    void setExecuted(boolean executed);
+
+    void setHtmlBody(String htmlBody);
+
+    boolean addRecipient(String recipient);
+
+    boolean removeRecipient(String recipient);
+
+    void setSender(String sender);
+
+    void setSubject(String subject);
+
+    void setTextBody(String textBody);
+
+    void setTraceLevel(TraceLevel traceLevel);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PropagationTask.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PropagationTask.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PropagationTask.java
new file mode 100644
index 0000000..04bea51
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PropagationTask.java
@@ -0,0 +1,65 @@
+/*
+ * 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.core.persistence.api.entity.task;
+
+import java.util.Set;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.PropagationMode;
+import org.apache.syncope.common.lib.types.ResourceOperation;
+import org.apache.syncope.core.persistence.api.entity.ExternalResource;
+import org.identityconnectors.framework.common.objects.Attribute;
+
+public interface PropagationTask extends Task {
+
+    String getAccountId();
+
+    Set<Attribute> getAttributes();
+
+    String getObjectClassName();
+
+    String getOldAccountId();
+
+    PropagationMode getPropagationMode();
+
+    ResourceOperation getPropagationOperation();
+
+    ExternalResource getResource();
+
+    Long getSubjectKey();
+
+    AttributableType getSubjectType();
+
+    void setAccountId(String accountId);
+
+    void setAttributes(Set<Attribute> attributes);
+
+    void setObjectClassName(String objectClassName);
+
+    void setOldAccountId(String oldAccountId);
+
+    void setPropagationMode(PropagationMode propagationMode);
+
+    void setPropagationOperation(ResourceOperation operation);
+
+    void setResource(ExternalResource resource);
+
+    void setSubjectKey(Long subjectKey);
+
+    void setSubjectType(AttributableType subjectType);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java
new file mode 100644
index 0000000..a0e8047
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java
@@ -0,0 +1,58 @@
+/*
+ * 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.core.persistence.api.entity.task;
+
+import java.util.List;
+import org.apache.syncope.common.lib.types.MatchingRule;
+import org.apache.syncope.common.lib.types.UnmatchingRule;
+import org.apache.syncope.core.persistence.api.entity.ExternalResource;
+
+public interface ProvisioningTask extends SchedTask {
+
+    List<String> getActionsClassNames();
+
+    MatchingRule getMatchingRule();
+
+    ExternalResource getResource();
+
+    UnmatchingRule getUnmatchingRule();
+
+    boolean isPerformCreate();
+
+    boolean isPerformDelete();
+
+    boolean isPerformUpdate();
+
+    boolean isSyncStatus();
+
+    void setMatchingRule(MatchingRule matchigRule);
+
+    void setPerformCreate(boolean performCreate);
+
+    void setPerformDelete(boolean performDelete);
+
+    void setPerformUpdate(boolean performUpdate);
+
+    void setResource(ExternalResource resource);
+
+    void setSyncStatus(boolean syncStatus);
+
+    void setUnmatchingRule(UnmatchingRule unmatchigRule);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java
new file mode 100644
index 0000000..7631a6b
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.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.core.persistence.api.entity.task;
+
+public interface PushTask extends ProvisioningTask {
+
+    String getRoleFilter();
+
+    String getUserFilter();
+
+    void setRoleFilter(String roleFilter);
+
+    void setUserFilter(String filter);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SchedTask.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SchedTask.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SchedTask.java
new file mode 100644
index 0000000..734194b
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SchedTask.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.core.persistence.api.entity.task;
+
+public interface SchedTask extends Task {
+
+    String getCronExpression();
+
+    String getDescription();
+
+    String getJobClassName();
+
+    String getName();
+
+    void setCronExpression(String cronExpression);
+
+    void setDescription(String description);
+
+    void setJobClassName(String jobClassName);
+
+    void setName(String name);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java
new file mode 100644
index 0000000..f73dcfb
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java
@@ -0,0 +1,37 @@
+/*
+ * 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.core.persistence.api.entity.task;
+
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+
+public interface SyncTask extends ProvisioningTask {
+
+    RoleTO getRoleTemplate();
+
+    UserTO getUserTemplate();
+
+    boolean isFullReconciliation();
+
+    void setFullReconciliation(boolean condition);
+
+    void setRoleTemplate(RoleTO roleTemplate);
+
+    void setUserTemplate(UserTO userTemplate);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/Task.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/Task.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/Task.java
new file mode 100644
index 0000000..b356356
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/Task.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.core.persistence.api.entity.task;
+
+import java.util.List;
+import org.apache.syncope.common.lib.types.TaskType;
+import org.apache.syncope.core.persistence.api.entity.Entity;
+
+public interface Task extends Entity<Long> {
+
+    TaskType getType();
+
+    boolean addExec(TaskExec exec);
+
+    boolean removeExec(TaskExec exec);
+
+    List<? extends TaskExec> getExecs();
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/TaskExec.java
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/TaskExec.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/TaskExec.java
new file mode 100644
index 0000000..7cb875c
--- /dev/null
+++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/TaskExec.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.core.persistence.api.entity.task;
+
+import org.apache.syncope.core.persistence.api.entity.Exec;
+
+public interface TaskExec extends Exec {
+
+    Task getTask();
+
+    void setTask(Task task);
+}