syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdisabat...@apache.org
Subject svn commit: r1615097 - in /syncope/trunk: ./ build-tools/ build-tools/src/main/java/org/apache/syncope/buildtools/ common/src/main/java/org/apache/syncope/common/to/ console/src/main/java/org/apache/syncope/console/pages/panels/ core/ core/src/main/jav...
Date Fri, 01 Aug 2014 13:37:19 GMT
Author: mdisabatino
Date: Fri Aug  1 13:37:18 2014
New Revision: 1615097

URL: http://svn.apache.org/r1615097
Log:
[SYNCOPE-537] Merge from 1_2_X

Removed:
    syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/SLF4JLogger.java
    syncope/trunk/core/src/main/resources/META-INF/services/
Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/build-tools/pom.xml
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
    syncope/trunk/core/pom.xml
    syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMapping.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ResourceTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/VirAttrTestITCase.java
    syncope/trunk/core/src/test/resources/content.xml
    syncope/trunk/pom.xml

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_2_X:r1615073-1615088

Modified: syncope/trunk/build-tools/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/pom.xml?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/build-tools/pom.xml (original)
+++ syncope/trunk/build-tools/pom.xml Fri Aug  1 13:37:18 2014
@@ -78,14 +78,14 @@ under the License.
     </dependency>
 
     <dependency>
-      <groupId>org.connid</groupId>
-      <artifactId>connid-framework</artifactId>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>connector-framework</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.connid</groupId>
-      <artifactId>connid-framework-internal</artifactId>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>connector-framework-internal</artifactId>
     </dependency>
-
+      
     <dependency>
       <groupId>org.codehaus.groovy</groupId>
       <artifactId>groovy-all</artifactId>

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
(original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
Fri Aug  1 13:37:18 2014
@@ -19,6 +19,7 @@
 package org.apache.syncope.buildtools;
 
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java Fri Aug
 1 13:37:18 2014
@@ -71,7 +71,7 @@ public class MappingTO extends AbstractB
             throw new IllegalArgumentException("Password attributes cannot be set as accountId");
         }
 
-        accountIdItem.setExtAttrName(null);
+        accountIdItem.setExtAttrName(accountIdItem.getExtAttrName());
         accountIdItem.setAccountid(true);
 
         return this.addItem(accountIdItem);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
Fri Aug  1 13:37:18 2014
@@ -352,8 +352,7 @@ public class ResourceMappingPanel extend
                 ((AjaxTextFieldPanel) extAttrNames).setChoices(schemaNames);
 
                 boolean required = false;
-                boolean accountIdOrPassword = mapItem.isAccountid() || mapItem.isPassword();
-                if (accountIdOrPassword) {
+                if (mapItem.isPassword()) {
                     ((AjaxTextFieldPanel) extAttrNames).setModelObject(null);
                 } else {
                     required = true;
@@ -379,11 +378,6 @@ public class ResourceMappingPanel extend
 
                     @Override
                     protected void onUpdate(final AjaxRequestTarget target) {
-                        extAttrNames.setEnabled(!accountId.getModelObject() && !mapItem.isPassword());
-                        extAttrNames.setModelObject(null);
-                        extAttrNames.setRequired(!accountId.getModelObject());
-                        target.add(extAttrNames);
-
                         if (accountId.getModelObject()) {
                             mapItem.setMandatoryCondition("true");
                             mandatory.setEnabled(false);
@@ -615,7 +609,7 @@ public class ResourceMappingPanel extend
                 case RoleVirtualSchema:
                 case MembershipVirtualSchema:
                 // Virtual accountId is not permitted
-                case Password:
+                case Password:  
                     // AccountId cannot be derived from password.
                     accountId.setReadOnly(true);
                     accountId.setModelObject(false);

Modified: syncope/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/pom.xml?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/pom.xml (original)
+++ syncope/trunk/core/pom.xml Fri Aug  1 13:37:18 2014
@@ -293,14 +293,18 @@ under the License.
     </dependency>
 
     <dependency>
-      <groupId>org.connid</groupId>
-      <artifactId>connid-framework</artifactId>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>connector-framework</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.connid</groupId>
-      <artifactId>connid-framework-internal</artifactId>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>connector-framework-internal</artifactId>
     </dependency>
-    
+    <dependency>
+      <groupId>net.tirasa.connid</groupId>
+      <artifactId>slf4j-logging</artifactId>
+    </dependency>
+          
     <dependency>
       <groupId>org.jasypt</groupId>
       <artifactId>jasypt</artifactId>

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java Fri
Aug  1 13:37:18 2014
@@ -256,9 +256,8 @@ public class ConnObjectUtil {
         final T subjectTO = attrUtil.newSubjectTO();
 
         // 1. fill with data from connector object
-        for (AbstractMappingItem item : attrUtil.getMappingItems(
-                syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)) {
-
+        for (AbstractMappingItem item : attrUtil.getUidToMappingItems(syncTask.getResource(),
+                MappingPurpose.SYNCHRONIZATION, attrUtil.getType())) {
             Attribute attribute = obj.getAttributeByName(item.getExtAttrName());
 
             AttributeTO attributeTO;

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMapping.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMapping.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMapping.java
(original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMapping.java
Fri Aug  1 13:37:18 2014
@@ -18,10 +18,16 @@
  */
 package org.apache.syncope.core.persistence.beans;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import javax.persistence.Cacheable;
 import javax.persistence.MappedSuperclass;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.util.BeanUtils;
+import org.apache.syncope.core.persistence.beans.role.RMappingItem;
+import org.apache.syncope.core.persistence.beans.user.UMapping;
+import org.apache.syncope.core.persistence.beans.user.UMappingItem;
 import org.identityconnectors.framework.common.objects.Uid;
 
 @MappedSuperclass
@@ -72,7 +78,7 @@ public abstract class AbstractMapping ex
             throw new IllegalArgumentException("Password attributes cannot be set as accountId");
         }
 
-        accountIdItem.setExtAttrName(Uid.NAME);
+        accountIdItem.setExtAttrName(accountIdItem.getExtAttrName());
         accountIdItem.setAccountid(true);
 
         return this.addItem(accountIdItem);

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
(original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
Fri Aug  1 13:37:18 2014
@@ -20,13 +20,11 @@ package org.apache.syncope.core.propagat
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.common.types.AuditElements;
 import org.apache.syncope.common.types.AuditElements.Result;
 import org.apache.syncope.common.types.MappingPurpose;
@@ -54,7 +52,6 @@ import org.apache.syncope.core.util.Attr
 import org.apache.syncope.core.util.ExceptionUtil;
 import org.identityconnectors.framework.common.exceptions.ConnectorException;
 import org.identityconnectors.framework.common.objects.Attribute;
-import org.identityconnectors.framework.common.objects.AttributeBuilder;
 import org.identityconnectors.framework.common.objects.AttributeUtil;
 import org.identityconnectors.framework.common.objects.ConnectorObject;
 import org.identityconnectors.framework.common.objects.Name;
@@ -169,25 +166,7 @@ public abstract class AbstractPropagatio
         }
 
         if (beforeObj == null) {
-            // 1. get name
-            final Name name = (Name) AttributeUtil.find(Name.NAME, attributes);
-
-            // 2. check if:
-            //      * accountId is not blank;
-            //      * accountId is not equal to Name.
-            if (StringUtils.isNotBlank(accountId) && (name == null || !accountId.equals(name.getNameValue())))
{
-                // 2.a retrieve uid
-                final Uid uid = (Uid) AttributeUtil.find(Uid.NAME, attributes);
-
-                // 2.b add Uid if not provided
-                if (uid == null) {
-                    attributes.add(AttributeBuilder.build(Uid.NAME, Collections.singleton(accountId)));
-                }
-            }
-
-            // 3. provision entry
             LOG.debug("Create {} on {}", attributes, resource);
-
             connector.create(propagationMode, oclass, attributes, null, propagationAttempted);
         } else {
             // 1. check if rename is really required
@@ -195,8 +174,8 @@ public abstract class AbstractPropagatio
 
             LOG.debug("Rename required with value {}", newName);
 
-            if (newName != null && newName.equals(beforeObj.getName())
-                    && !newName.getNameValue().equals(beforeObj.getUid().getUidValue()))
{
+                if (newName != null && newName.equals(beforeObj.getName())
+                        && !newName.getNameValue().equals(beforeObj.getUid().getUidValue()))
{
 
                 LOG.debug("Remote object name unchanged");
                 attributes.remove(newName);

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java Fri Aug
 1 13:37:18 2014
@@ -122,14 +122,14 @@ public class SyncJob extends AbstractSyn
         final UserSyncResultHandler uhandler =
                 (UserSyncResultHandler) ((DefaultListableBeanFactory) ApplicationContextProvider.
                 getApplicationContext().getBeanFactory()).createBean(
-                UserSyncResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
+                        UserSyncResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME,
false);
         uhandler.setProfile(profile);
 
         // Prepare handler for SyncDelta objects (roles/groups)
         final RoleSyncResultHandler rhandler =
                 (RoleSyncResultHandler) ((DefaultListableBeanFactory) ApplicationContextProvider.
                 getApplicationContext().getBeanFactory()).createBean(
-                RoleSyncResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
+                        RoleSyncResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME,
false);
         rhandler.setProfile(profile);
 
         if (!profile.isDryRun()) {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java Fri
Aug  1 13:37:18 2014
@@ -32,6 +32,7 @@ import org.apache.syncope.common.types.A
 import org.apache.syncope.common.types.IntMappingType;
 import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.SyncPolicySpec;
+import org.apache.syncope.common.util.BeanUtils;
 import org.apache.syncope.core.persistence.beans.AbstractAttr;
 import org.apache.syncope.core.persistence.beans.AbstractAttrTemplate;
 import org.apache.syncope.core.persistence.beans.AbstractAttrValue;
@@ -85,6 +86,7 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.beans.user.UVirSchema;
 import org.apache.syncope.core.sync.SyncCorrelationRule;
 import org.identityconnectors.framework.common.objects.ObjectClass;
+import org.identityconnectors.framework.common.objects.Uid;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -289,6 +291,18 @@ public final class AttributableUtil {
         return result;
     }
 
+    @SuppressWarnings("unchecked")
+    public <T extends AbstractMappingItem> List<T> getUidToMappingItems(
+            final ExternalResource resource, final MappingPurpose purpose, final AttributableType
type) {
+        final List<T> items = getMappingItems(resource, MappingPurpose.SYNCHRONIZATION);
+        final AbstractMappingItem uidItem = type == AttributableType.USER ? new UMappingItem()
: new RMappingItem();
+        BeanUtils.copyProperties(getAccountIdItem(resource), uidItem);
+        uidItem.setExtAttrName(Uid.NAME);
+        uidItem.setAccountid(false);
+        items.add((T) uidItem);
+        return items;
+    }
+
     public <T extends AbstractMappingItem> Class<T> mappingItemClass() {
         Class result = null;
 

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java Fri Aug
 1 13:37:18 2014
@@ -208,6 +208,12 @@ public final class MappingUtil {
             }
         }
 
+        final Attribute accountIdExtAttr = 
+                AttributeUtil.find(attrUtil.getAccountIdItem(resource).getExtAttrName(),
attributes);
+        if (accountIdExtAttr != null) {
+            attributes.remove(accountIdExtAttr);
+            attributes.add(AttributeBuilder.build(attrUtil.getAccountIdItem(resource).getExtAttrName(),
accountId));
+        }
         attributes.add(MappingUtil.evaluateNAME(subject, resource, accountId));
 
         if (enable != null) {

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ResourceTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ResourceTest.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ResourceTest.java
(original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ResourceTest.java
Fri Aug  1 13:37:18 2014
@@ -202,6 +202,7 @@ public class ResourceTest extends Abstra
 
         UMappingItem item = new UMappingItem();
         item.setIntAttrName("fullname");
+        item.setExtAttrName("fullname");
         item.setIntMappingType(IntMappingType.UserSchema);
         item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java
(original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java
Fri Aug  1 13:37:18 2014
@@ -63,7 +63,7 @@ public class ResourceTestITCase extends 
         MappingTO mapping = new MappingTO();
 
         MappingItemTO item = new MappingItemTO();
-        item.setExtAttrName("uid");
+        item.setExtAttrName("userId");
         item.setIntAttrName("userId");
         item.setIntMappingType(IntMappingType.UserSchema);
         item.setPurpose(MappingPurpose.BOTH);
@@ -175,6 +175,7 @@ public class ResourceTestITCase extends 
 
         MappingItemTO item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.UserId);
+        item.setExtAttrName("userId");
         item.setAccountid(true);
         item.setPurpose(MappingPurpose.PROPAGATION);
         umapping.setAccountIdItem(item);
@@ -185,6 +186,7 @@ public class ResourceTestITCase extends 
 
         item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.RoleId);
+        item.setExtAttrName("roleId");
         item.setAccountid(true);
         item.setPurpose(MappingPurpose.SYNCHRONIZATION);
         rmapping.setAccountIdItem(item);
@@ -214,6 +216,7 @@ public class ResourceTestITCase extends 
 
         MappingItemTO item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.UserId);
+        item.setExtAttrName("userId");
         item.setAccountid(true);
         mapping.setAccountIdItem(item);
 
@@ -245,6 +248,7 @@ public class ResourceTestITCase extends 
 
         MappingItemTO item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.UserId);
+        item.setExtAttrName("userId");
         item.setAccountid(true);
         mapping.setAccountIdItem(item);
 
@@ -270,7 +274,7 @@ public class ResourceTestITCase extends 
         MappingTO mapping = new MappingTO();
 
         MappingItemTO item = new MappingItemTO();
-        item.setExtAttrName("uid");
+        item.setExtAttrName("userId");
         item.setIntAttrName("userId");
         item.setIntMappingType(IntMappingType.UserSchema);
         item.setAccountid(true);
@@ -500,9 +504,10 @@ public class ResourceTestITCase extends 
 
         MappingItemTO item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.RoleName);
+        item.setExtAttrName("cn");
         item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);
-
+            
         item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.RoleOwnerSchema);
         item.setExtAttrName("owner");
@@ -556,6 +561,7 @@ public class ResourceTestITCase extends 
 
         MappingItemTO item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.UserId);
+        item.setExtAttrName("userId");
         item.setAccountid(true);
         item.setPurpose(MappingPurpose.PROPAGATION);
         umapping.setAccountIdItem(item);

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/VirAttrTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/VirAttrTestITCase.java?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/VirAttrTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/VirAttrTestITCase.java Fri
Aug  1 13:37:18 2014
@@ -457,6 +457,7 @@ public class VirAttrTestITCase extends A
         MappingItemTO item = new MappingItemTO();
         item.setIntAttrName("aLong");
         item.setIntMappingType(IntMappingType.UserSchema);
+        item.setExtAttrName(roleName);
         item.setPurpose(MappingPurpose.PROPAGATION);
         item.setAccountid(true);
         mapping.setAccountIdItem(item);

Modified: syncope/trunk/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/resources/content.xml?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/core/src/test/resources/content.xml (original)
+++ syncope/trunk/core/src/test/resources/content.xml Fri Aug  1 13:37:18 2014
@@ -68,7 +68,7 @@ under the License.
 
   <!-- sample policies -->
   <Policy DTYPE="SyncPolicy" id="1" description="global sync policy" type="GLOBAL_SYNC"

-          specification='{"userJavaRule":null,"roleJavaRule":null,"conflictResolutionAction":"IGNORE","userAltSearchSchemas":[],"roleAltSearchSchemas":[]}'/>
+          specification='{"userJavaRule":null,"roleJavaRule":null,"conflictResolutionAction":"IGNORE","userAltSearchSchemas":[],":q!AltSearchSchemas":[]}'/>
   <Policy DTYPE="PasswordPolicy" id="2" description="global password policy" type="GLOBAL_PASSWORD"

           specification='{"historyLength":1,"maxLength":0,"minLength":8,"nonAlphanumericRequired":false,"alphanumericRequired":false,"digitRequired":false,"lowercaseRequired":false,"uppercaseRequired":false,"mustStartWithDigit":false,"mustntStartWithDigit":false,"mustEndWithDigit":false,"mustntEndWithDigit":false,"mustStartWithNonAlpha":false,"mustStartWithAlpha":false,"mustntStartWithNonAlpha":false,"mustntStartWithAlpha":false,"mustEndWithNonAlpha":false,"mustEndWithAlpha":false,"mustntEndWithNonAlpha":false,"mustntEndWithAlpha":false,"wordsNotPermitted":[],"schemasNotPermitted":[],"prefixesNotPermitted":["notpermitted1","notpermitted2"],"suffixesNotPermitted":[],"allowNullPassword":true}'/>
   <Policy DTYPE="SyncPolicy" id="3" description="sync policy 2" type="SYNC" 
@@ -636,7 +636,7 @@ under the License.
   <SyncopeRole_ExternalResource role_id="13" resource_name="resource-csv"/>
 
   <UMapping id="15" resource_name="ws-target-resource-1"/>
-  <UMappingItem id="99" mapping_id="15" extAttrName="__NAME__"
+  <UMappingItem id="99" mapping_id="15" extAttrName="userId"
                 intMappingType="UserId" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="100" extAttrName="email" mapping_id="15"
@@ -660,7 +660,7 @@ under the License.
   
   <UMapping id="12" resource_name="ws-target-resource-list-mappings-1"/>
   <UMappingItem id="103" mapping_id="12"
-                extAttrName="__NAME__" intAttrName="email" intMappingType="UserSchema" mandatoryCondition="true"
+                extAttrName="email" intAttrName="email" intMappingType="UserSchema" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="104" extAttrName="surname" mapping_id="12"
                 intAttrName="surname" intMappingType="UserSchema" mandatoryCondition="true"
@@ -668,11 +668,11 @@ under the License.
 
   <UMapping id="13" resource_name="ws-target-resource-list-mappings-2"/>
   <UMappingItem id="105" mapping_id="13"
-                extAttrName="__NAME__" intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="true"
+                extAttrName="userId" intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
 
   <UMapping id="1" resource_name="ws-target-resource-2"/>
-  <UMappingItem id="106" mapping_id="1" extAttrName="__NAME__"
+  <UMappingItem id="106" mapping_id="1" extAttrName="fullname"
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
                 accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="107" mapping_id="1"
@@ -703,35 +703,35 @@ under the License.
                 accountid="0" password="0" purpose="PROPAGATION"/>
     
   <UMapping id="3" resource_name="ws-target-resource-nopropagation"/>
-  <UMappingItem id="115" mapping_id="3" extAttrName="__NAME__" 
+  <UMappingItem id="115" mapping_id="3" extAttrName="fullname" 
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
                      
   <UMapping id="4" resource_name="ws-target-resource-nopropagation2"/>
-  <UMappingItem id="116" mapping_id="4" extAttrName="__NAME__" 
+  <UMappingItem id="116" mapping_id="4" extAttrName="fullname" 
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
                      
   <UMapping id="5" resource_name="ws-target-resource-nopropagation3"/>
-  <UMappingItem id="117" mapping_id="5" extAttrName="__NAME__"
+  <UMappingItem id="117" mapping_id="5" extAttrName="fullname"
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
                      
   <UMapping id="6" resource_name="ws-target-resource-nopropagation4"/>
   <UMappingItem id="118" mapping_id="6"
-                extAttrName="__NAME__" intAttrName="fullname" intMappingType="UserSchema"
mandatoryCondition="true"
+                extAttrName="fullname" intAttrName="fullname" intMappingType="UserSchema"
mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
                        
   <UMapping id="7" resource_name="resource-testdb"/>
   <UMappingItem id="119" mapping_id="7"
-                extAttrName="__NAME__" intMappingType="Username" mandatoryCondition="true"
+                extAttrName="id" intMappingType="Username" mandatoryCondition="true"
                 accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="120" mapping_id="7"
                 extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true"
                 accountid="0" password="1" purpose="BOTH"/>
                      
   <UMapping id="8" resource_name="resource-testdb2"/>
-  <UMappingItem id="121" mapping_id="8" extAttrName="__NAME__" 
+  <UMappingItem id="121" mapping_id="8" extAttrName="id" 
                 intMappingType="Username" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="122" mapping_id="8" extAttrName="__PASSWORD__" 
@@ -772,7 +772,7 @@ under the License.
                          
   <UMapping id="10" resource_name="ws-target-resource-update-resetsynctoken"/>
   <UMappingItem id="300" mapping_id="10"
-                extAttrName="__NAME__" intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="false"
+                extAttrName="userId" intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="false"
                 accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="301" mapping_id="10"
                 extAttrName="__PASSWORD__" intAttrName="fullname" intMappingType="UserSchema"
mandatoryCondition="false"
@@ -781,7 +781,7 @@ under the License.
   <UMapping id="11" resource_name="resource-ldap"
             accountlink="&apos;uid=&apos; + username + &apos;,ou=people,o=isp&apos;"/>
   <UMappingItem id="311" accountid="1" password="0" mapping_id="11"
-                extAttrName="__UID__" intAttrName="Username" intMappingType="Username"
+                extAttrName="cn" intAttrName="Username" intMappingType="Username"
                 mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="312" accountid="0" password="1" mapping_id="11"
                 extAttrName="__PASSWORD__" intAttrName="Password" intMappingType="Password"
@@ -817,7 +817,7 @@ under the License.
   <RMapping id="1" resource_name="resource-ldap"
             accountlink="&apos;cn=&apos; + name + &apos;,ou=groups,o=isp&apos;"/>
   <RMappingItem id="1" accountid="1" password="0" mapping_id="1"
-                extAttrName="__UID__" intAttrName="roleName" intMappingType="RoleName"
+                extAttrName="cn" intAttrName="roleName" intMappingType="RoleName"
                 mandatoryCondition="true" purpose="BOTH"/>
   <RMappingItem id="2" accountid="0" password="0" mapping_id="1"
                 extAttrName="owner" intAttrName="roleOwnerSchema" intMappingType="RoleOwnerSchema"
@@ -837,7 +837,7 @@ under the License.
                 extAttrName="SURNAME" intAttrName="fullname" intMappingType="UserSchema"

                 mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="324" accountid="1" mapping_id="16"
-                extAttrName="__NAME__" intAttrName="aLong" intMappingType="UserSchema" 
+                extAttrName="ID" intAttrName="aLong" intMappingType="UserSchema" 
                 mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="325" accountid="0" mapping_id="16"
                 extAttrName="SURNAME" intAttrName="surname" intMappingType="UserSchema" 
@@ -851,7 +851,7 @@ under the License.
               
   <UMapping id="17" resource_name="resource-db-virattr"/>
   <UMappingItem id="331" mapping_id="17" accountid="1" password="0"
-                extAttrName="__NAME__" intMappingType="UserId" 
+                extAttrName="id" intMappingType="UserId" 
                 mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="332" mapping_id="17" accountid="0" password="0" 
                 extAttrName="USERNAME" intAttrName="virtualdata" intMappingType="UserVirtualSchema"
@@ -859,11 +859,11 @@ under the License.
                 
   <UMapping id="18" resource_name="ws-target-resource-timeout"/>
   <UMappingItem id="333" mapping_id="18" accountid="1" password="0"
-                extAttrName="__NAME__" intAttrName="fullname" intMappingType="UserSchema"
+                extAttrName="fullname" intAttrName="fullname" intMappingType="UserSchema"
                 mandatoryCondition="true" purpose="PROPAGATION"/>
   
   <UMapping id="19" resource_name="ws-target-resource-delete"/>
-  <UMappingItem id="334" mapping_id="19" extAttrName="__NAME__" 
+  <UMappingItem id="334" mapping_id="19" extAttrName="userId" 
                 intMappingType="Username" mandatoryCondition="true"
                 accountid="1" password="0" purpose="PROPAGATION"/>
   

Modified: syncope/trunk/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1615097&r1=1615096&r2=1615097&view=diff
==============================================================================
--- syncope/trunk/pom.xml (original)
+++ syncope/trunk/pom.xml Fri Aug  1 13:37:18 2014
@@ -310,7 +310,7 @@ under the License.
     <javax.el.version>3.0-b02</javax.el.version>
     <jax-rs.version>2.0</jax-rs.version>
         
-    <connid.version>1.3.3</connid.version>
+    <connid.version>1.4.0.0</connid.version>
     <connid.soap.version>1.2.8</connid.soap.version>
     <connid.db.table.version>2.1.7</connid.db.table.version>
     <connid.csvdir.version>0.7</connid.csvdir.version>
@@ -462,16 +462,21 @@ under the License.
       </dependency>
 
       <dependency>
-        <groupId>org.connid</groupId>
-        <artifactId>connid-framework</artifactId>
+        <groupId>net.tirasa.connid</groupId>
+        <artifactId>connector-framework</artifactId>
         <version>${connid.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.connid</groupId>
-        <artifactId>connid-framework-internal</artifactId>
+        <groupId>net.tirasa.connid</groupId>
+        <artifactId>connector-framework-internal</artifactId>
         <version>${connid.version}</version>
       </dependency>
-
+      <dependency>
+        <groupId>net.tirasa.connid</groupId>
+        <artifactId>slf4j-logging</artifactId>
+        <version>${connid.version}</version>
+      </dependency>
+      
       <dependency>
         <groupId>org.jasypt</groupId>
         <artifactId>jasypt</artifactId>



Mime
View raw message