syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject svn commit: r1447396 - in /syncope/trunk: ./ common/src/main/java/org/apache/syncope/common/to/ common/src/main/java/org/apache/syncope/common/types/ console/src/main/java/org/apache/syncope/console/pages/panels/ console/src/main/resources/org/apache/s...
Date Mon, 18 Feb 2013 17:14:07 GMT
Author: fmartelli
Date: Mon Feb 18 17:14:06 2013
New Revision: 1447396

URL: http://svn.apache.org/r1447396
Log:
SYNCOPE-257 fixed

Added:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java   (with props)
Modified:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html
    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/AbstractMappingItem.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/propagation/impl/PropagationManager.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.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/persistence/relationships/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/TaskTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/data/ResourceDataTest.java
    syncope/trunk/core/src/test/resources/content.xml
    syncope/trunk/pom.xml

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java Mon Feb 18 17:14:06 2013
@@ -23,6 +23,7 @@ import javax.xml.bind.annotation.XmlType
 
 import org.apache.syncope.common.AbstractBaseBean;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 
 @XmlRootElement(name = "mappingItem")
 @XmlType
@@ -63,6 +64,11 @@ public class MappingItemTO extends Abstr
      */
     private String mandatoryCondition = "false";
 
+    /**
+     * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH.
+     */
+    private MappingPurpose purpose;
+
     public boolean isAccountid() {
         return accountid;
     }
@@ -118,4 +124,12 @@ public class MappingItemTO extends Abstr
     public void setIntMappingType(IntMappingType intMappingType) {
         this.intMappingType = intMappingType;
     }
+
+    public MappingPurpose getPurpose() {
+        return purpose;
+    }
+
+    public void setPurpose(MappingPurpose purpose) {
+        this.purpose = purpose;
+    }
 }

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java?rev=1447396&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java Mon Feb 18 17:14:06 2013
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.syncope.common.types;
+
+public enum MappingPurpose {
+
+    SYNCHRONIZATION,
+    PROPAGATION,
+    BOTH
+
+}

Propchange: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=1447396&r1=1447395&r2=1447396&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 Mon Feb 18 17:14:06 2013
@@ -31,6 +31,7 @@ import org.apache.syncope.common.to.Reso
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.ConnConfProperty;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.console.commons.JexlHelpUtil;
 import org.apache.syncope.console.pages.panels.ResourceConnConfPanel.ConnConfModEvent;
 import org.apache.syncope.console.rest.ConnectorRestClient;
@@ -403,6 +404,16 @@ public class ResourceMappingPanel extend
                     password.setVisible(false);
                 }
 
+                final AjaxDropDownChoicePanel purpose = new AjaxDropDownChoicePanel<String>(
+                        "purpose",
+                        new ResourceModel("purpose", "purpose").getObject(),
+                        new PropertyModel(mapItem, "purpose"), 
+                        false);
+                ((AjaxDropDownChoicePanel) purpose).setChoices(Arrays.asList(MappingPurpose.values()));
+                purpose.setStyleSheet(FIELD_STYLE);
+                
+                item.add(purpose);
+
                 typesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
 
                     private static final long serialVersionUID = -1107858522700306810L;

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties Mon Feb 18 17:14:06 2013
@@ -32,6 +32,7 @@ roleSchema=Role Schema
 accountId=AccountId
 mandatoryCondition=Mandatory
 password=Password
+purpose=Purpose
 mappingUserSchema=Mapping User Schema
 mappingRoleSchema=Mapping Role Schema
 delete=Delete

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties Mon Feb 18 17:14:06 2013
@@ -33,6 +33,7 @@ roleSchema=Schema Ruolo
 accountId=AccountId
 mandatoryCondition=Obbligatorio
 password=Password
+purpose=Scopo
 mappingUserSchema=Mapping User Schema
 mappingRoleSchema=Mapping Role Schema
 delete=Rimuovi

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html Mon Feb 18 17:14:06 2013
@@ -44,6 +44,7 @@ under the License.
       </th>
       <th><wicket:message key="accountId"/></th>
       <th><label wicket:id="passwordLabel"/></th>
+      <th><wicket:message key="purpose"/></th>
       </tr>
       </thead>
       <tfoot>
@@ -80,6 +81,9 @@ under the License.
           <td align="center" valign="middle">
             <span wicket:id="password">[password]</span>
           </td>
+          <td align="center" valign="middle">
+            <span wicket:id="purpose">[purpose]</span>
+          </td>
         </tr>
       </tbody>
     </table>

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=1447396&r1=1447395&r2=1447396&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 Mon Feb 18 17:14:06 2013
@@ -37,6 +37,7 @@ import org.apache.syncope.common.to.Role
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.PasswordPolicySpec;
 import org.apache.syncope.common.util.AttributableOperations;
 import org.apache.syncope.core.persistence.beans.AbstractAttributable;
@@ -66,7 +67,7 @@ import org.identityconnectors.common.sec
 import org.identityconnectors.framework.common.objects.Attribute;
 import org.identityconnectors.framework.common.objects.ConnectorObject;
 import org.identityconnectors.framework.common.objects.ObjectClass;
-import org.identityconnectors.framework.common.objects.OperationOptionsBuilder;
+import org.identityconnectors.framework.common.objects.OperationOptions;
 import org.identityconnectors.framework.common.objects.Uid;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -235,7 +236,8 @@ public class ConnObjectUtil {
         final T attributableTO = attrUtil.newAttributableTO();
 
         // 1. fill with data from connector object
-        for (AbstractMappingItem item : attrUtil.getMappingItems(syncTask.getResource())) {
+        for (AbstractMappingItem item :
+                attrUtil.getMappingItems(syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)) {
             Attribute attribute = obj.getAttributeByName(item.getExtAttrName());
 
             AttributeTO attributeTO;
@@ -294,7 +296,6 @@ public class ConnObjectUtil {
                     for (Object value : attribute == null || attribute.getValue() == null
                             ? Collections.emptyList()
                             : attribute.getValue()) {
-
                         if (value != null) {
                             attributeTO.addValue(value.toString());
                         }
@@ -334,6 +335,7 @@ public class ConnObjectUtil {
         // 2. add data from defined template (if any)
         AbstractAttributableTO template = AttributableType.USER == attrUtil.getType()
                 ? syncTask.getUserTemplate() : syncTask.getRoleTemplate();
+
         if (template != null) {
             if (template instanceof UserTO) {
                 if (StringUtils.isNotBlank(((UserTO) template).getUsername())) {
@@ -511,6 +513,8 @@ public class ConnObjectUtil {
             for (ExternalResource resource : getTargetResource(virAttr, type, attrUtil)) {
                 LOG.debug("Seach values into {}", resource.getName());
                 try {
+                    final List<AbstractMappingItem> mappings = attrUtil.getMappingItems(resource, MappingPurpose.BOTH);
+
                     final ConnectorObject connectorObject;
 
                     if (externalResources.containsKey(resource.getName())) {
@@ -526,31 +530,22 @@ public class ConnObjectUtil {
                             throw new IllegalArgumentException("No AccountId found for " + resource.getName());
                         }
 
-                        final Set<String> extAttrNames = new HashSet<String>();
-
-                        // retrieve all mapped virtual attribute values
-                        for (AbstractMappingItem item :
-                                MappingUtil.getMatchingMappingItems(attrUtil.getMappingItems(resource), type)) {
-                            extAttrNames.add(item.getExtAttrName());
-                        }
-
-                        LOG.debug("External attribute ({}) names to get '{}'", type, extAttrNames);
+                        final SyncopeConnector connector = connInstanceLoader.getConnector(resource);
 
-                        final OperationOptionsBuilder oob = new OperationOptionsBuilder();
-                        oob.setAttributesToGet(extAttrNames);
+                        final OperationOptions oo =
+                                connector.getOperationOptions(MappingUtil.getMatchingMappingItems(mappings, type));
 
-                        final SyncopeConnector connector = connInstanceLoader.getConnector(resource);
-                        connectorObject = connector.getObject(fromAttributable(owner), new Uid(accountId), oob.build());
+                        connectorObject = connector.getObject(fromAttributable(owner), new Uid(accountId), oo);
                         externalResources.put(resource.getName(), connectorObject);
                     }
 
                     if (connectorObject != null) {
                         // ask for searched virtual attribute value
-                        final List<AbstractMappingItem> mappings = MappingUtil.getMatchingMappingItems(
-                                attrUtil.getMappingItems(resource), schemaName, type);
+                        final List<AbstractMappingItem> virAttrMappings =
+                                MappingUtil.getMatchingMappingItems(mappings, schemaName, type);
 
                         // the same virtual attribute could be mapped with one or more external attribute 
-                        for (AbstractMappingItem mapping : mappings) {
+                        for (AbstractMappingItem mapping : virAttrMappings) {
                             final Attribute attribute = connectorObject.getAttributeByName(mapping.getExtAttrName());
 
                             if (attribute != null && attribute.getValue() != null) {
@@ -584,7 +579,8 @@ public class ConnObjectUtil {
 
         for (ExternalResource res : attr.getOwner().getResources()) {
             if (!MappingUtil.getMatchingMappingItems(
-                    attrUtil.getMappingItems(res), attr.getVirtualSchema().getName(), type).isEmpty()) {
+                    attrUtil.getMappingItems(res, MappingPurpose.BOTH),
+                    attr.getVirtualSchema().getName(), type).isEmpty()) {
 
                 resources.add(res);
             }

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMappingItem.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMappingItem.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMappingItem.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractMappingItem.java Mon Feb 18 17:14:06 2013
@@ -27,6 +27,7 @@ import javax.persistence.MappedSuperclas
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 
 @MappedSuperclass
 @Cacheable
@@ -71,6 +72,13 @@ public abstract class AbstractMappingIte
     @Max(1)
     private Integer password;
 
+    /**
+     * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH.
+     */
+    @Column(nullable = false)
+    @Enumerated(EnumType.STRING)
+    private MappingPurpose purpose;
+
     public AbstractMappingItem() {
         super();
 
@@ -162,4 +170,12 @@ public abstract class AbstractMappingIte
     public void setPassword(final boolean password) {
         this.password = getBooleanAsInteger(password);
     }
+
+    public MappingPurpose getPurpose() {
+        return purpose;
+    }
+
+    public void setPurpose(MappingPurpose purpose) {
+        this.purpose = purpose;
+    }
 }

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=1447396&r1=1447395&r2=1447396&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 Mon Feb 18 17:14:06 2013
@@ -27,6 +27,7 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import org.apache.commons.lang.StringUtils;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.PropagationMode;
 import org.apache.syncope.common.types.PropagationTaskExecStatus;
 import org.apache.syncope.common.types.TraceLevel;
@@ -446,7 +447,7 @@ public abstract class AbstractPropagatio
                     new ObjectClass(task.getObjectClassName()),
                     new Uid(accountId),
                     connector.getOperationOptions(AttributableUtil.getInstance(task.getSubjectType()).
-                    getMappingItems(task.getResource())));
+                    getMappingItems(task.getResource(), MappingPurpose.PROPAGATION)));
         } catch (TimeoutException toe) {
             LOG.debug("Request timeout", toe);
             throw toe;

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/PropagationManager.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/PropagationManager.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/PropagationManager.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/PropagationManager.java Mon Feb 18 17:14:06 2013
@@ -30,6 +30,7 @@ import org.apache.syncope.common.mod.Att
 import org.apache.syncope.common.to.AttributeTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.ResourceOperation;
 import org.apache.syncope.core.connid.ConnObjectUtil;
 import org.apache.syncope.core.connid.PasswordGenerator;
@@ -450,7 +451,7 @@ public class PropagationManager {
         String accountId = null;
 
         final AttributableUtil attrUtil = AttributableUtil.getInstance(subject);
-        for (AbstractMappingItem mapping : attrUtil.getMappingItems(resource)) {
+        for (AbstractMappingItem mapping : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
             LOG.debug("Processing schema {}", mapping.getIntAttrName());
 
             try {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java Mon Feb 18 17:14:06 2013
@@ -28,6 +28,7 @@ import org.apache.syncope.common.types.A
 import org.apache.syncope.common.types.AuditElements.Category;
 import org.apache.syncope.common.types.AuditElements.ResourceSubCategory;
 import org.apache.syncope.common.types.AuditElements.Result;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.connid.ConnObjectUtil;
@@ -217,7 +218,7 @@ public class ResourceController extends 
         final SyncopeConnector connector = connLoader.getConnector(resource);
 
         final ConnectorObject connectorObject = connector.getObject(objectClass, new Uid(objectId),
-                connector.getOperationOptions(attrUtil.getMappingItems(resource)));
+                connector.getOperationOptions(attrUtil.getMappingItems(resource, MappingPurpose.BOTH)));
         if (connectorObject == null) {
             throw new NotFoundException("Object " + objectId + " not found on resource " + resourceName);
         }

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java Mon Feb 18 17:14:06 2013
@@ -35,6 +35,7 @@ import org.apache.syncope.common.to.Abst
 import org.apache.syncope.common.to.AttributeTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.ResourceOperation;
 import org.apache.syncope.common.types.SyncopeClientExceptionType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
@@ -221,7 +222,7 @@ public abstract class AbstractAttributab
         boolean result = false;
 
         final List<AbstractMappingItem> mappings = MappingUtil.getMatchingMappingItems(
-                attrUtil.getMappingItems(resource), intAttrName, intMappingType);
+                attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION), intAttrName, intMappingType);
         for (Iterator<AbstractMappingItem> itor = mappings.iterator(); itor.hasNext() && !result;) {
             final AbstractMappingItem mapping = itor.next();
             result |= evaluateMandatoryCondition(mapping.getMandatoryCondition(), attributable);
@@ -310,7 +311,7 @@ public abstract class AbstractAttributab
                 }
 
                 for (ExternalResource resource : resourceDAO.findAll()) {
-                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) {
+                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
                         if (virSchema.getName().equals(mapItem.getIntAttrName())
                                 && mapItem.getIntMappingType() == attrUtil.virIntMappingType()
                                 && attributable.getResources().contains(resource)) {
@@ -334,7 +335,7 @@ public abstract class AbstractAttributab
             AbstractVirSchema virSchema = getVirtualSchema(vAttrToBeUpdated.getSchema(), attrUtil.virSchemaClass());
             if (virSchema != null) {
                 for (ExternalResource resource : resourceDAO.findAll()) {
-                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) {
+                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
                         if (virSchema.getName().equals(mapItem.getIntAttrName())
                                 && mapItem.getIntMappingType() == attrUtil.virIntMappingType()
                                 && attributable.getResources().contains(resource)) {
@@ -422,7 +423,7 @@ public abstract class AbstractAttributab
                 }
 
                 for (ExternalResource resource : resourceDAO.findAll()) {
-                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) {
+                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
                         if (schema.getName().equals(mapItem.getIntAttrName())
                                 && mapItem.getIntMappingType() == attrUtil.intMappingType()
                                 && attributable.getResources().contains(resource)) {
@@ -448,7 +449,7 @@ public abstract class AbstractAttributab
             AbstractSchema schema = getSchema(attributeMod.getSchema(), attrUtil.schemaClass());
             if (schema != null) {
                 for (ExternalResource resource : resourceDAO.findAll()) {
-                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) {
+                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
                         if (schema.getName().equals(mapItem.getIntAttrName())
                                 && mapItem.getIntMappingType() == attrUtil.intMappingType()
                                 && attributable.getResources().contains(resource)) {
@@ -522,7 +523,7 @@ public abstract class AbstractAttributab
                 }
 
                 for (ExternalResource resource : resourceDAO.findAll()) {
-                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) {
+                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
                         if (derSchema.getName().equals(mapItem.getIntAttrName())
                                 && mapItem.getIntMappingType() == attrUtil.derIntMappingType()
                                 && attributable.getResources().contains(resource)) {
@@ -548,7 +549,7 @@ public abstract class AbstractAttributab
             AbstractDerSchema derSchema = getDerivedSchema(derAttrToBeAdded, attrUtil.derSchemaClass());
             if (derSchema != null) {
                 for (ExternalResource resource : resourceDAO.findAll()) {
-                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) {
+                    for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource, MappingPurpose.PROPAGATION)) {
                         if (derSchema.getName().equals(mapItem.getIntAttrName())
                                 && mapItem.getIntMappingType() == attrUtil.derIntMappingType()
                                 && attributable.getResources().contains(resource)) {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java Mon Feb 18 17:14:06 2013
@@ -40,6 +40,7 @@ import org.apache.syncope.common.to.Role
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.ConflictResolutionAction;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.ResourceOperation;
 import org.apache.syncope.common.types.SyncPolicySpec;
 import org.apache.syncope.core.connid.ConnObjectUtil;
@@ -345,7 +346,8 @@ public class SyncopeSyncResultHandler im
 
         final Map<String, Attribute> extValues = new HashMap<String, Attribute>();
 
-        for (AbstractMappingItem item : attrUtil.getMappingItems(syncTask.getResource())) {
+        for (AbstractMappingItem item :
+                attrUtil.getMappingItems(syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)) {
             extValues.put(item.getIntAttrName(), connObj.getAttributeByName(item.getExtAttrName()));
         }
 
@@ -443,8 +445,8 @@ public class SyncopeSyncResultHandler im
         final AttributableUtil attrUtil = AttributableUtil.getInstance(objectClass);
 
         final List<ConnectorObject> found = connector.search(objectClass,
-                new EqualsFilter(new Name(name)),
-                connector.getOperationOptions(attrUtil.getMappingItems(syncTask.getResource())));
+                new EqualsFilter(new Name(name)), connector.getOperationOptions(
+                attrUtil.getMappingItems(syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)));
 
         if (found.isEmpty()) {
             LOG.debug("No {} found on {} with __NAME__ {}", objectClass, syncTask.getResource(), name);

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=1447396&r1=1447395&r2=1447396&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 Mon Feb 18 17:14:06 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.core.util;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import org.apache.commons.lang3.StringUtils;
@@ -27,6 +28,7 @@ import org.apache.syncope.common.to.Role
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.types.AttributableType;
 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.core.persistence.beans.AbstractAttr;
 import org.apache.syncope.core.persistence.beans.AbstractAttrValue;
@@ -198,19 +200,20 @@ public class AttributableUtil {
         return result;
     }
 
-    public <T extends AbstractMappingItem> List<T> getMappingItems(final ExternalResource resource) {
-        List<T> result = Collections.EMPTY_LIST;
+    public <T extends AbstractMappingItem> List<T> getMappingItems(
+            final ExternalResource resource, final MappingPurpose purpose) {
+        List<T> items = Collections.EMPTY_LIST;
 
         if (resource != null) {
             switch (type) {
                 case USER:
                     if (resource.getUmapping() != null) {
-                        result = resource.getUmapping().getItems();
+                        items = resource.getUmapping().getItems();
                     }
                     break;
                 case ROLE:
                     if (resource.getRmapping() != null) {
-                        result = resource.getRmapping().getItems();
+                        items = resource.getRmapping().getItems();
                     }
                     break;
                 case MEMBERSHIP:
@@ -218,6 +221,27 @@ public class AttributableUtil {
             }
         }
 
+        final List<T> result = new ArrayList<T>();
+
+        switch (purpose) {
+            case SYNCHRONIZATION:
+                for (T item : items) {
+                    if (MappingPurpose.PROPAGATION != item.getPurpose()) {
+                        result.add(item);
+                    }
+                }
+                break;
+            case PROPAGATION:
+                for (T item : items) {
+                    if (MappingPurpose.SYNCHRONIZATION != item.getPurpose()) {
+                        result.add(item);
+                    }
+                }
+                break;
+            case BOTH:
+                result.addAll(items);
+        }
+
         return result;
     }
 

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=1447396&r1=1447395&r2=1447396&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 Mon Feb 18 17:14:06 2013
@@ -29,6 +29,7 @@ import java.util.List;
 
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.core.persistence.beans.AbstractMappingItem;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
@@ -101,6 +102,7 @@ public class ResourceTest extends Abstra
         accountId.setExtAttrName("username");
         accountId.setIntAttrName("fullname");
         accountId.setIntMappingType(IntMappingType.UserId);
+        accountId.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(accountId);
 
         ConnInstance connector = resourceDAO.find("ws-target-resource-1").getConnector();

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ResourceTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ResourceTest.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ResourceTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ResourceTest.java Mon Feb 18 17:14:06 2013
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.beans.PasswordPolicy;
@@ -112,6 +113,7 @@ public class ResourceTest extends Abstra
             item.setIntAttrName("nonexistent" + i);
             item.setIntMappingType(IntMappingType.UserSchema);
             item.setMandatoryCondition("false");
+            item.setPurpose(MappingPurpose.SYNCHRONIZATION);
             mapping.addItem(item);
             item.setMapping(mapping);
         }
@@ -119,6 +121,7 @@ public class ResourceTest extends Abstra
         accountId.setExtAttrName("username");
         accountId.setIntAttrName("username");
         accountId.setIntMappingType(IntMappingType.UserId);
+        accountId.setPurpose(MappingPurpose.PROPAGATION);
         mapping.setAccountIdItem(accountId);
         accountId.setMapping(mapping);
 
@@ -128,6 +131,7 @@ public class ResourceTest extends Abstra
         derived.setExtAttrName("fullname");
         derived.setIntAttrName("cn");
         derived.setIntMappingType(IntMappingType.UserDerivedSchema);
+        derived.setPurpose(MappingPurpose.PROPAGATION);
         mapping.addItem(derived);
         derived.setMapping(mapping);
 
@@ -246,6 +250,7 @@ public class ResourceTest extends Abstra
         UMappingItem newMapItem = new UMappingItem();
         newMapItem.setIntMappingType(IntMappingType.Username);
         newMapItem.setExtAttrName("TEST");
+        newMapItem.setPurpose(MappingPurpose.PROPAGATION);
         csv.getUmapping().addItem(newMapItem);
 
         resourceDAO.save(csv);

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=1447396&r1=1447395&r2=1447396&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 Mon Feb 18 17:14:06 2013
@@ -40,6 +40,7 @@ import org.apache.syncope.common.to.Reso
 import org.apache.syncope.common.types.ConnConfPropSchema;
 import org.apache.syncope.common.types.ConnConfProperty;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.SyncopeClientExceptionType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.common.validation.SyncopeClientException;
@@ -84,6 +85,7 @@ public class ResourceTestITCase extends 
         item.setExtAttrName("uid");
         item.setIntAttrName("userId");
         item.setIntMappingType(IntMappingType.UserSchema);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.addItem(item);
 
         item = new MappingItemTO();
@@ -91,6 +93,7 @@ public class ResourceTestITCase extends 
         item.setIntAttrName("fullname");
         item.setIntMappingType(IntMappingType.UserId);
         item.setAccountid(true);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);
 
         item = new MappingItemTO();
@@ -98,6 +101,7 @@ public class ResourceTestITCase extends 
         item.setIntAttrName("cn");
         item.setIntMappingType(IntMappingType.UserSchema);
         item.setAccountid(false);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.addItem(item);
 
         resourceTO.setName(resourceName);
@@ -138,6 +142,7 @@ public class ResourceTestITCase extends 
         MappingItemTO item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.UserId);
         item.setAccountid(true);
+        item.setPurpose(MappingPurpose.PROPAGATION);
         umapping.setAccountIdItem(item);
 
         resourceTO.setUmapping(umapping);
@@ -147,6 +152,7 @@ public class ResourceTestITCase extends 
         item = new MappingItemTO();
         item.setIntMappingType(IntMappingType.RoleId);
         item.setAccountid(true);
+        item.setPurpose(MappingPurpose.SYNCHRONIZATION);
         rmapping.setAccountIdItem(item);
 
         resourceTO.setRmapping(rmapping);
@@ -159,6 +165,8 @@ public class ResourceTestITCase extends 
         assertNotNull(actual.getUmapping().getItems());
         assertNotNull(actual.getRmapping());
         assertNotNull(actual.getRmapping().getItems());
+        assertEquals(MappingPurpose.SYNCHRONIZATION, actual.getRmapping().getAccountIdItem().getPurpose());
+        assertEquals(MappingPurpose.PROPAGATION, actual.getUmapping().getAccountIdItem().getPurpose());
     }
 
     @Test
@@ -184,7 +192,7 @@ public class ResourceTestITCase extends 
         resourceTO.setUmapping(mapping);
 
         try {
-            createResource(resourceService,resourceTO);
+            createResource(resourceService, resourceTO);
             fail("Create should not have worked");
         } catch (SyncopeClientCompositeErrorException e) {
             SyncopeClientException requiredValueMissing = e
@@ -236,6 +244,7 @@ public class ResourceTestITCase extends 
         item.setIntAttrName("userId");
         item.setIntMappingType(IntMappingType.UserSchema);
         item.setAccountid(true);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);
 
         resourceTO.setUmapping(mapping);
@@ -279,6 +288,7 @@ public class ResourceTestITCase extends 
         item.setExtAttrName("test3");
         item.setIntAttrName("fullname");
         item.setIntMappingType(IntMappingType.UserSchema);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.addItem(item);
 
         // Update defining new mappings
@@ -287,6 +297,7 @@ public class ResourceTestITCase extends 
             item.setExtAttrName("test" + i);
             item.setIntAttrName("fullname");
             item.setIntMappingType(IntMappingType.UserSchema);
+            item.setPurpose(MappingPurpose.BOTH);
             mapping.addItem(item);
         }
         item = new MappingItemTO();
@@ -294,6 +305,7 @@ public class ResourceTestITCase extends 
         item.setIntAttrName("fullname");
         item.setIntMappingType(IntMappingType.UserId);
         item.setAccountid(true);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);
 
         resourceTO.setUmapping(mapping);
@@ -388,6 +400,7 @@ public class ResourceTestITCase extends 
         item.setExtAttrName("uid");
         item.setIntAttrName("userId");
         item.setIntMappingType(IntMappingType.UserSchema);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.addItem(item);
 
         item = new MappingItemTO();
@@ -395,6 +408,7 @@ public class ResourceTestITCase extends 
         item.setIntAttrName("fullname");
         item.setIntMappingType(IntMappingType.UserId);
         item.setAccountid(true);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);
 
         item = new MappingItemTO();
@@ -402,10 +416,10 @@ public class ResourceTestITCase extends 
         item.setIntAttrName("cn");
         item.setIntMappingType(IntMappingType.UserSchema);
         item.setAccountid(false);
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.addItem(item);
 
         resourceTO.setUmapping(mapping);
         return resourceTO;
     }
-
 }

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Mon Feb 18 17:14:06 2013
@@ -856,6 +856,12 @@ public class TaskTestITCase extends Abst
         UserTO template = new UserTO();
         template.addResource("resource-db-virattr");
 
+        AttributeTO userId = attributeTO("userId", "'s307@apache.org'");
+        template.addAttribute(userId);
+
+        AttributeTO email = attributeTO("email", "'s307@apache.org'");
+        template.addAttribute(email);
+
         task.setUserTemplate(template);
 
         taskService.update(task.getId(), task);
@@ -872,6 +878,7 @@ public class TaskTestITCase extends Abst
                     "SELECT USERNAME FROM testsync WHERE ID=?", String.class, userTO.getId());
             assertEquals("virtualvalue", value);
         } catch (EmptyResultDataAccessException e) {
+            LOG.error("AAAAAAAAAAAAAAAAAAAAAAA", e);
             assertTrue(false);
         }
     }

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Mon Feb 18 17:14:06 2013
@@ -2023,6 +2023,27 @@ public class UserTestITCase extends Abst
         assertNotNull(actual);
         assertEquals("virtualupdated", actual.getVirtualAttributeMap().get("virtualdata").getValues().get(0));
     }
+    
+    @Test
+    public void mappingPurpose() {
+        UserTO userTO = getUniqueSampleTO("mpurpose@apache.org");
+        
+        AttributeTO csvuserid = new AttributeTO();
+        csvuserid.setSchema("csvuserid");
+        userTO.addDerivedAttribute(csvuserid);
+
+        userTO.getResources().clear();
+        userTO.addResource("resource-csv");
+
+        UserTO actual = createUser(userTO);
+        assertNotNull(actual);
+        
+        final ConnObjectTO connObjectTO = resourceService.getConnector(
+                "resource-csv", 
+                AttributableType.USER, actual.getDerivedAttributeMap().get("csvuserid").getValues().get(0));
+        
+        assertNull(connObjectTO.getAttributeMap().get("email"));
+    }
 
     private boolean getBooleanAttribute(ConnObjectTO connObjectTO, String attrName) {
         return Boolean.parseBoolean(getStringAttribute(connObjectTO, attrName));

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/data/ResourceDataTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/data/ResourceDataTest.java?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/data/ResourceDataTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/data/ResourceDataTest.java Mon Feb 18 17:14:06 2013
@@ -32,6 +32,7 @@ import org.apache.syncope.common.to.Mapp
 import org.apache.syncope.common.to.MappingTO;
 import org.apache.syncope.common.to.ResourceTO;
 import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.MappingPurpose;
 import org.apache.syncope.common.types.PropagationMode;
 import org.apache.syncope.core.AbstractNonDAOTest;
 import org.apache.syncope.core.persistence.beans.AbstractMappingItem;
@@ -119,6 +120,7 @@ public class ResourceDataTest extends Ab
         item.setExtAttrName("campo1");
         item.setAccountid(true);
         item.setMandatoryCondition("false");
+        item.setPurpose(MappingPurpose.BOTH);
         mapping.setAccountIdItem(item);
 
         ExternalResource resource = resourceDataBinder.create(resourceTO);

Modified: syncope/trunk/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/resources/content.xml?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/core/src/test/resources/content.xml (original)
+++ syncope/trunk/core/src/test/resources/content.xml Mon Feb 18 17:14:06 2013
@@ -418,210 +418,210 @@ under the License.
   <UMapping id="15" resource_name="ws-target-resource-1"/>
   <UMappingItem id="99" mapping_id="15" extAttrName="__NAME__"
                 intMappingType="UserId" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="100" extAttrName="email" mapping_id="15"
                 intAttrName="email" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="101" extAttrName="surname" mapping_id="15"
                 intAttrName="surname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="102" mapping_id="15"
                 extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true"
-                accountid="0" password="1"/>
+                accountid="0" password="1" purpose="PROPAGATION"/>
 
   <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"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="104" extAttrName="surname" mapping_id="12"
                 intAttrName="surname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="PROPAGATION"/>
 
   <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"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="PROPAGATION"/>
 
   <UMapping id="1" resource_name="ws-target-resource-2"/>
   <UMappingItem id="106" mapping_id="1" extAttrName="__NAME__"
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="107" mapping_id="1"
                 extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true"
-                accountid="0" password="1"/>
+                accountid="0" password="1" purpose="BOTH"/>
   <UMappingItem id="108" extAttrName="type" mapping_id="1"
                 intAttrName="type" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="109" extAttrName="surname" mapping_id="1"
                 intAttrName="surname" intMappingType="UserSchema" mandatoryCondition="type == 'F'"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="110" extAttrName="name" mapping_id="1"
                 intAttrName="virtualdata" intMappingType="UserVirtualSchema" mandatoryCondition="type == 'F'"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="111" extAttrName="fullname" mapping_id="1"
                 intAttrName="cn" intMappingType="UserDerivedSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
     
   <UMapping id="2" resource_name="ws-target-resource-update"/>
   <UMappingItem id="112" extAttrName="email" mapping_id="2"
                 intAttrName="email" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="113" extAttrName="userId" mapping_id="2"
                 intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="114" extAttrName="test3" mapping_id="2" 
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="PROPAGATION"/>
     
   <UMapping id="3" resource_name="ws-target-resource-nopropagation"/>
   <UMappingItem id="115" mapping_id="3" extAttrName="__NAME__" 
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="PROPAGATION"/>
                      
   <UMapping id="4" resource_name="ws-target-resource-nopropagation2"/>
   <UMappingItem id="116" mapping_id="4" extAttrName="__NAME__" 
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="PROPAGATION"/>
                      
   <UMapping id="5" resource_name="ws-target-resource-nopropagation3"/>
   <UMappingItem id="117" mapping_id="5" extAttrName="__NAME__"
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                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"
-                accountid="1" password="0"/>
+                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"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="120" mapping_id="7"
                 extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true"
-                accountid="0" password="1"/>
+                accountid="0" password="1" purpose="BOTH"/>
                      
   <UMapping id="8" resource_name="resource-testdb2"/>
   <UMappingItem id="121" mapping_id="8" extAttrName="__NAME__" 
                 intMappingType="Username" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="PROPAGATION"/>
   <UMappingItem id="122" mapping_id="8" extAttrName="__PASSWORD__" 
                 intMappingType="Password" mandatoryCondition="true"
-                accountid="0" password="1"/>
+                accountid="0" password="1" purpose="PROPAGATION"/>
                          
   <UMapping id="9" resource_name="resource-csv"/>
   <UMappingItem id="200" extAttrName="id" mapping_id="9"
                 intMappingType="Username" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="201" extAttrName="id" mapping_id="9"
                 intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="202" mapping_id="9"
                 extAttrName="__PASSWORD__" intMappingType="Password" mandatoryCondition="true"
-                accountid="0" password="1"/>
+                accountid="0" password="1" purpose="BOTH"/>
   <UMappingItem id="203" extAttrName="name" mapping_id="9"
                 intAttrName="firstname" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="204" extAttrName="surname" mapping_id="9"
                 intAttrName="surname" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="205" extAttrName="email" mapping_id="9"
                 intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="SYNCHRONIZATION"/>
   <UMappingItem id="206" extAttrName="email" mapping_id="9"
                 intAttrName="email" intMappingType="UserSchema" mandatoryCondition="true"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="SYNCHRONIZATION"/>
   <UMappingItem id="207" extAttrName="__NAME__" mapping_id="9"
                 intAttrName="csvuserid" intMappingType="UserDerivedSchema" mandatoryCondition="true"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="208" extAttrName="role" mapping_id="9"
                 intAttrName="rderToBePropagated" intMappingType="RoleDerivedSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
   <UMappingItem id="209" extAttrName="membership" mapping_id="9"
                 intAttrName="mderToBePropagated" intMappingType="MembershipDerivedSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
                          
   <UMapping id="10" resource_name="ws-target-resource-update-resetsynctoken"/>
   <UMappingItem id="300" mapping_id="10"
                 extAttrName="__NAME__" intAttrName="userId" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="1" password="0"/>
+                accountid="1" password="0" purpose="BOTH"/>
   <UMappingItem id="301" mapping_id="10"
                 extAttrName="__PASSWORD__" intAttrName="fullname" intMappingType="UserSchema" mandatoryCondition="false"
-                accountid="0" password="1"/>
+                accountid="0" password="1" purpose="BOTH"/>
 
   <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"
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="312" accountid="0" password="1" mapping_id="11"
                 extAttrName="__PASSWORD__" intAttrName="Password" intMappingType="Password"
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="313" accountid="0" password="0" mapping_id="11"
                 extAttrName="sn" intAttrName="surname" intMappingType="UserSchema"
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="314" accountid="0" password="0" mapping_id="11"
                 extAttrName="cn" intAttrName="fullname" intMappingType="UserSchema"
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="315" accountid="0" password="0" mapping_id="11"
                 extAttrName="mail" intAttrName="email" intMappingType="UserSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
   <UMappingItem id="316" accountid="0" password="0" mapping_id="11"
                 extAttrName="title" intAttrName="title" intMappingType="RoleSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
   <UMappingItem id="317" accountid="0" password="0" mapping_id="11"
                 extAttrName="postalAddress" intAttrName="postalAddress" intMappingType="MembershipSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
   <UMappingItem id="318" accountid="0" password="0" mapping_id="11"
                 extAttrName="mail" intAttrName="userId" intMappingType="UserSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
   <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"
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="BOTH"/>
   <RMappingItem id="2" accountid="0" password="0" mapping_id="1"
                 extAttrName="owner" intAttrName="roleOwnerSchema" intMappingType="RoleOwnerSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
   <RMappingItem id="3" accountid="0" password="0" mapping_id="1"
                 extAttrName="description" intAttrName="title" intMappingType="RoleSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
   <RMappingItem id="4" extAttrName="businessCategory" mapping_id="1"
                 intAttrName="rvirtualdata" intMappingType="RoleVirtualSchema" mandatoryCondition="false"
-                accountid="0" password="0"/>
+                accountid="0" password="0" purpose="BOTH"/>
         
   <UMapping id="16" resource_name="resource-db-sync"/>
   <UMappingItem id="321" accountid="0" mapping_id="16"
                 extAttrName="EMAIL" intAttrName="email" intMappingType="UserSchema" 
-                mandatoryCondition="false" password="0"/>
+                mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="322" accountid="0" mapping_id="16"
                 extAttrName="SURNAME" intAttrName="fullname" intMappingType="UserSchema" 
-                mandatoryCondition="false" password="0"/>
+                mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="323" accountid="1" mapping_id="16"
                 extAttrName="__NAME__" intAttrName="aLong" intMappingType="UserSchema" 
-                mandatoryCondition="false" password="0"/>
+                mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="324" accountid="0" mapping_id="16"
                 extAttrName="SURNAME" intAttrName="surname" intMappingType="UserSchema" 
-                mandatoryCondition="false" password="0"/>
+                mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="325" accountid="0" mapping_id="16"
                 extAttrName="USERNAME" intAttrName="Username" intMappingType="Username" 
-                mandatoryCondition="false" password="0"/>
+                mandatoryCondition="false" password="0" purpose="BOTH"/>
   <UMappingItem id="326" accountid="0" mapping_id="16"
                 extAttrName="EMAIL" intAttrName="userId" intMappingType="UserSchema" 
-                mandatoryCondition="false" password="0"/>
+                mandatoryCondition="false" password="0" purpose="BOTH"/>
               
   <UMapping id="17" resource_name="resource-db-virattr"/>
   <UMappingItem id="331" mapping_id="17" accountid="1" password="0"
                 extAttrName="__NAME__" intMappingType="UserId" 
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="BOTH"/>
   <UMappingItem id="332" mapping_id="17" accountid="0" password="0" 
                 extAttrName="USERNAME" intAttrName="virtualdata" intMappingType="UserVirtualSchema"
-                mandatoryCondition="false"/>
+                mandatoryCondition="false" purpose="BOTH"/>
                 
   <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"
-                mandatoryCondition="true"/>
+                mandatoryCondition="true" purpose="PROPAGATION"/>
   
   <Task DTYPE="PropagationTask" id="1" propagationMode="TWO_PHASES" propagationOperation="UPDATE"
         objectClassName="__ACCOUNT__" resource_name="ws-target-resource-2" subjectType="USER" subjectId="1"

Modified: syncope/trunk/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1447396&r1=1447395&r2=1447396&view=diff
==============================================================================
--- syncope/trunk/pom.xml (original)
+++ syncope/trunk/pom.xml Mon Feb 18 17:14:06 2013
@@ -280,7 +280,7 @@ under the License.
     <connid.version>1.3.2</connid.version>
     <connid.soap.version>1.2.5</connid.soap.version>
     <connid.db.table.version>2.1.4</connid.db.table.version>
-    <connid.csvdir.version>0.6</connid.csvdir.version>
+    <connid.csvdir.version>0.6.1-SNAPSHOT</connid.csvdir.version>
     <connid.ldap.version>1.3.4</connid.ldap.version>
 
     <commons-jexl.version>2.1.1</commons-jexl.version>



Mime
View raw message