syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/2] syncope git commit: Further changes to ensure querying for supported ConnId ObjectClasses work propertly
Date Fri, 03 Nov 2017 10:18:45 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X edb004d8d -> 149b91000
  refs/heads/master 81a030bd7 -> 3d4f233cc


Further changes to ensure querying for supported ConnId ObjectClasses work propertly


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/149b9100
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/149b9100
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/149b9100

Branch: refs/heads/2_0_X
Commit: 149b91000050cfd13ba8a9fa00464fa6ff566a86
Parents: edb004d
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Nov 3 11:18:30 2017 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Nov 3 11:18:30 2017 +0100

----------------------------------------------------------------------
 .../org/apache/syncope/core/logic/ConnectorLogic.java     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/149b9100/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorLogic.java
index f803eb6..e5cfc7b 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorLogic.java
@@ -21,7 +21,6 @@ package org.apache.syncope.core.logic;
 import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -38,7 +37,6 @@ import org.apache.syncope.common.lib.to.ConnBundleTO;
 import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
 import org.apache.syncope.common.lib.to.ConnInstanceTO;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
-import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.syncope.core.persistence.api.dao.ConnInstanceDAO;
 import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO;
@@ -227,8 +225,14 @@ public class ConnectorLogic extends AbstractTransactionalLogic<ConnInstanceTO>
{
     public List<ConnIdObjectClassTO> buildObjectClassInfo(
             final ConnInstanceTO connInstanceTO, final boolean includeSpecial) {
 
+        ConnInstanceTO actual = connInstanceTO;
+        ConnInstance existing = connInstanceDAO.find(connInstanceTO.getKey());
+        if (existing != null) {
+            actual = binder.getConnInstanceTO(existing);
+        }
+
         Set<ObjectClassInfo> objectClassInfo = connFactory.createConnector(
-                connFactory.buildConnInstanceOverride(connInstanceTO, Collections.<ConnConfProperty>emptySet(),
null)).
+                connFactory.buildConnInstanceOverride(actual, connInstanceTO.getConf(), null)).
                 getObjectClassInfo();
 
         List<ConnIdObjectClassTO> result = new ArrayList<>(objectClassInfo.size());


Mime
View raw message