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 2018/11/19 07:40:10 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-1395] More small fixes

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new d3f57fa  [SYNCOPE-1395] More small fixes
d3f57fa is described below

commit d3f57faa1efb55973c2ff9680c83d419bbc07405
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon Nov 19 08:39:44 2018 +0100

    [SYNCOPE-1395] More small fixes
---
 .../core/persistence/jpa/entity/anyobject/PGJPAAnyObject.java |  8 ++++++++
 .../syncope/core/persistence/jpa/entity/user/PGJPAUser.java   |  8 ++++++++
 .../workingwithapachesyncope/systemadministration/dbms.adoc   | 11 +++++++++++
 3 files changed, 27 insertions(+)

diff --git a/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/PGJPAAnyObject.java b/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/PGJPAAnyObject.java
index d98c26a..568b533 100644
--- a/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/PGJPAAnyObject.java
+++ b/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/anyobject/PGJPAAnyObject.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
+import java.util.stream.Collectors;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.EntityListeners;
@@ -90,6 +91,13 @@ public class PGJPAAnyObject extends JPAAnyObject implements PGJPAAny<AnyObject>,
     }
 
     @Override
+    public List<? extends APlainAttr> getPlainAttrs() {
+        return plainAttrList.stream().
+                filter(pgattr -> pgattr.getMembershipKey() == null).
+                collect(Collectors.toList());
+    }
+
+    @Override
     public Optional<? extends APlainAttr> getPlainAttr(final String plainSchema) {
         return plainAttrList.stream().
                 filter(pgattr -> pgattr.getSchemaKey() != null && pgattr.getSchemaKey().equals(plainSchema)
diff --git a/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/PGJPAUser.java b/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/PGJPAUser.java
index b3c215d..5bc949c 100644
--- a/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/PGJPAUser.java
+++ b/core/persistence-jpa-pgjsonb/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/PGJPAUser.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
+import java.util.stream.Collectors;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.EntityListeners;
@@ -90,6 +91,13 @@ public class PGJPAUser extends JPAUser implements PGJPAAny<User>, User {
     }
 
     @Override
+    public List<? extends UPlainAttr> getPlainAttrs() {
+        return plainAttrList.stream().
+                filter(pgattr -> pgattr.getMembershipKey() == null).
+                collect(Collectors.toList());
+    }
+
+    @Override
     public Optional<? extends UPlainAttr> getPlainAttr(final String plainSchema) {
         return plainAttrList.stream().
                 filter(pgattr -> pgattr.getSchemaKey() != null && pgattr.getSchemaKey().equals(plainSchema)
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbms.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbms.adoc
index f30c541..ec8f3c6 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbms.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbms.adoc
@@ -68,6 +68,17 @@ https://www.postgresql.org/docs/current/datatype-json.html[JSONB^] column type f
 [NOTE]
 Apache Syncope {docVersion} is verified with PostgreSQL server >= 10.3 and JDBC driver >= {postgresqlJDBC}.
 
+Add the following dependency to `core/pom.xml`:
+
+[source,xml,subs="verbatim,attributes"]
+----
+<dependency>
+  <groupId>org.apache.syncope.core</groupId>
+  <artifactId>syncope-core-persistence-jpa-pgjsonb</artifactId>
+  <version>${syncope.version}</version>
+</dependency>
+----
+
 In `persistence.properties`, replace as follows:
 
 ....