syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [49/70] syncope git commit: [SYNCOPE-666] Cleanup
Date Thu, 11 Jun 2015 14:17:39 GMT
[SYNCOPE-666] Cleanup


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

Branch: refs/heads/master
Commit: a64ef15f1dd69b09226c4dac27551cfd3988c7e9
Parents: 1da1ea4
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Jun 5 18:04:33 2015 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Jun 5 18:04:33 2015 +0200

----------------------------------------------------------------------
 .../syncope/common/lib/to/AnyTypeClassTO.java   |  6 +--
 .../apache/syncope/common/lib/to/AnyTypeTO.java |  6 +--
 .../common/lib/to/ConnIdObjectClassTO.java      |  2 +-
 .../common/lib/to/PropagationStatus.java        |  3 --
 .../syncope/common/lib/to/ResourceTO.java       |  9 ++--
 .../common/lib/types/IntMappingType.java        | 18 +++----
 .../syncope/common/rest/api/RESTHeaders.java    | 13 +----
 .../rest/api/service/ConnectorService.java      | 54 ++++++++++----------
 .../rest/api/service/ResourceService.java       | 34 ++++++------
 .../syncope/core/misc/ConnObjectUtils.java      |  4 +-
 .../apache/syncope/core/misc/MappingUtils.java  |  6 +--
 .../jpa/entity/resource/JPAMappingItem.java     |  6 +--
 .../persistence/jpa/entity/ResourceTest.java    |  4 +-
 .../jpa/relationship/ResourceTest.java          |  2 +-
 .../src/test/resources/content.xml              |  4 +-
 .../core/provisioning/java/sync/SyncUtils.java  |  6 +--
 .../rest/cxf/service/AbstractServiceImpl.java   |  2 +-
 .../cxf/service/AnyTypeClassServiceImpl.java    |  2 +-
 .../rest/cxf/service/AnyTypeServiceImpl.java    |  2 +-
 .../rest/cxf/service/ConnectorServiceImpl.java  | 26 +++++-----
 .../cxf/service/NotificationServiceImpl.java    |  2 +-
 .../rest/cxf/service/PolicyServiceImpl.java     |  2 +-
 .../core/rest/cxf/service/RealmServiceImpl.java |  2 +-
 .../rest/cxf/service/ReportServiceImpl.java     |  2 +-
 .../rest/cxf/service/ResourceServiceImpl.java   | 36 ++++++-------
 .../core/rest/cxf/service/RoleServiceImpl.java  |  2 +-
 .../rest/cxf/service/SchemaServiceImpl.java     |  2 +-
 .../service/SecurityQuestionServiceImpl.java    |  2 +-
 .../core/rest/cxf/service/TaskServiceImpl.java  |  2 +-
 .../rest/cxf/service/UserSelfServiceImpl.java   |  2 +-
 .../core/rest/cxf/service/UserServiceImpl.java  |  2 +-
 .../fit/core/reference/AbstractITCase.java      |  2 +-
 .../syncope/fit/core/reference/GroupITCase.java |  2 +-
 .../fit/core/reference/ResourceITCase.java      | 16 +++---
 34 files changed, 135 insertions(+), 150 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeClassTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeClassTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeClassTO.java
index 1afbe4d..9b696f8 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeClassTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeClassTO.java
@@ -33,7 +33,7 @@ public class AnyTypeClassTO extends AbstractBaseBean {
 
     private static final long serialVersionUID = -591757688607551266L;
 
-    private String name;
+    private String key;
 
     private final List<String> plainSchemas = new ArrayList<>();
 
@@ -42,11 +42,11 @@ public class AnyTypeClassTO extends AbstractBaseBean {
     private final List<String> virSchemas = new ArrayList<>();
 
     public String getKey() {
-        return name;
+        return key;
     }
 
     public void setKey(final String key) {
-        this.name = key;
+        this.key = key;
     }
 
     @XmlElementWrapper(name = "plainSchemas")

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeTO.java
index 9618bf5..3722b81 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTypeTO.java
@@ -34,18 +34,18 @@ public class AnyTypeTO extends AbstractBaseBean {
 
     private static final long serialVersionUID = 6771657557616874373L;
 
-    private String name;
+    private String key;
 
     private AnyTypeKind kind;
 
     private final List<String> classes = new ArrayList<>();
 
     public String getKey() {
-        return name;
+        return key;
     }
 
     public void setKey(final String key) {
-        this.name = key;
+        this.key = key;
     }
 
     public AnyTypeKind getKind() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
index 14810bb..c562b69 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
@@ -38,7 +38,7 @@ public class ConnIdObjectClassTO extends AbstractBaseBean {
         ACCOUNT("__ACCOUNT__"),
         GROUP("__GROUP__");
 
-        private String specialName;
+        private final String specialName;
 
         private DefaultType(final String specialName) {
             this.specialName = specialName;

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
index de844be..38a8da7 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
@@ -30,9 +30,6 @@ import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
 @XmlType
 public class PropagationStatus extends AbstractBaseBean {
 
-    /**
-     * Serial version ID.
-     */
     private static final long serialVersionUID = 3921498450222857690L;
 
     /**

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
index dcec457..7fbac89 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
@@ -40,10 +40,7 @@ public class ResourceTO extends AbstractAnnotatedBean {
 
     private static final long serialVersionUID = -9193551354041698963L;
 
-    /**
-     * The resource identifier is the name.
-     */
-    private String name;
+    private String key;
 
     /**
      * The resource type is identified by the associated connector.
@@ -98,11 +95,11 @@ public class ResourceTO extends AbstractAnnotatedBean {
     }
 
     public String getKey() {
-        return name;
+        return key;
     }
 
     public void setKey(final String key) {
-        this.name = key;
+        this.key = key;
     }
 
     public boolean isEnforceMandatoryCondition() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
index 1b50f43..3537bc5 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
@@ -38,7 +38,7 @@ public enum IntMappingType {
     UserPlainSchema(AnyTypeKind.USER),
     UserDerivedSchema(AnyTypeKind.USER),
     UserVirtualSchema(AnyTypeKind.USER),
-    UserId(AnyTypeKind.USER),
+    UserKey(AnyTypeKind.USER),
     Username(AnyTypeKind.USER),
     Password(AnyTypeKind.USER),
     // -------------------------
@@ -47,7 +47,7 @@ public enum IntMappingType {
     GroupPlainSchema(AnyTypeKind.GROUP),
     GroupDerivedSchema(AnyTypeKind.GROUP),
     GroupVirtualSchema(AnyTypeKind.GROUP),
-    GroupId(AnyTypeKind.GROUP),
+    GroupKey(AnyTypeKind.GROUP),
     GroupName(AnyTypeKind.GROUP),
     GroupOwnerSchema(AnyTypeKind.GROUP),
     // -------------------------
@@ -56,7 +56,7 @@ public enum IntMappingType {
     AnyPlainSchema(AnyTypeKind.ANY_OBJECT),
     AnyDerivedSchema(AnyTypeKind.ANY_OBJECT),
     AnyVirtualSchema(AnyTypeKind.ANY_OBJECT),
-    AnyId(AnyTypeKind.ANY_OBJECT);
+    AnyKey(AnyTypeKind.ANY_OBJECT);
 
     private final AnyTypeKind anyTypeKind;
 
@@ -117,9 +117,9 @@ public enum IntMappingType {
     }
 
     public static Set<IntMappingType> getEmbedded() {
-        return EnumSet.of(IntMappingType.UserId, IntMappingType.Username, IntMappingType.Password,
-                IntMappingType.GroupId, IntMappingType.GroupName, IntMappingType.GroupOwnerSchema,
-                IntMappingType.AnyId);
+        return EnumSet.of(IntMappingType.UserKey, IntMappingType.Username, IntMappingType.Password,
+                IntMappingType.GroupKey, IntMappingType.GroupName, IntMappingType.GroupOwnerSchema,
+                IntMappingType.AnyKey);
     }
 
     /**
@@ -167,7 +167,7 @@ public enum IntMappingType {
         UserPlainSchema,
         UserDerivedSchema,
         UserVirtualSchema,
-        UserId,
+        UserKey,
         Username,
         Password;
 
@@ -181,7 +181,7 @@ public enum IntMappingType {
         GroupPlainSchema,
         GroupDerivedSchema,
         GroupVirtualSchema,
-        GroupId,
+        GroupKey,
         GroupName,
         GroupOwnerSchema;
 
@@ -195,7 +195,7 @@ public enum IntMappingType {
         AnyPlainSchema,
         AnyDerivedSchema,
         AnyVirtualSchema,
-        AnyId;
+        AnyKey;
 
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
index 307bbba..4d19e31 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
@@ -23,22 +23,13 @@ package org.apache.syncope.common.rest.api;
  */
 public final class RESTHeaders {
 
-    /**
-     * UserId option key.
-     */
-    public static final String USER_ID = "X-Syncope-User-Id";
+    public static final String USER_KEY = "X-Syncope-User-Key";
 
-    /**
-     * Username option key.
-     */
     public static final String USERNAME = "X-Syncope-Username";
 
     public static final String OWNED_ENTITLEMENTS = "X-Syncope-Entitlements";
 
-    /**
-     * HTTP header key for object ID assigned to an object after its creation.
-     */
-    public static final String RESOURCE_ID = "X-Syncope-Id";
+    public static final String RESOURCE_KEY = "X-Syncope-Key";
 
     /**
      * Declares the type of exception being raised.

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index 91d982e..ede49be 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -63,56 +63,56 @@ public interface ConnectorService extends JAXRSService {
     /**
      * Returns configuration for given connector instance.
      *
-     * @param connInstanceKey connector instance id to read configuration from
+     * @param key connector instance key to read configuration from
      * @return configuration for given connector instance
      */
     @GET
-    @Path("{connInstanceKey}/configuration")
+    @Path("{key}/configuration")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ConnConfProperty> getConfigurationProperties(@NotNull @PathParam("connInstanceKey") Long connInstanceKey);
+    List<ConnConfProperty> getConfigurationProperties(@NotNull @PathParam("key") Long key);
 
     /**
-     * Returns schema names for connector bundle matching the given connector instance id.
+     * Returns schema names for connector bundle matching the given connector instance key.
      *
-     * @param connInstanceKey connector instance id to be used for schema lookup
+     * @param key connector instance key to be used for schema lookup
      * @param connInstanceTO connector instance object to provide special configuration properties
      * @param includeSpecial if set to true, special schema names (like '__PASSWORD__') will be included;
      * default is false
-     * @return schema names for connector bundle matching the given connector instance id
+     * @return schema names for connector bundle matching the given connector instance key
      */
     @POST
-    @Path("{connInstanceKey}/schemaNames")
+    @Path("{key}/schemaNames")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<PlainSchemaTO> getSchemaNames(@NotNull @PathParam("connInstanceKey") Long connInstanceKey,
+    List<PlainSchemaTO> getSchemaNames(@NotNull @PathParam("key") Long key,
             @NotNull ConnInstanceTO connInstanceTO,
             @QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial);
 
     /**
-     * Returns supported object classes for connector bundle matching the given connector instance id.
+     * Returns supported object classes for connector bundle matching the given connector instance key.
      *
-     * @param connInstanceKey connector instance id to be used for schema lookup
+     * @param key connector instance key to be used for schema lookup
      * @param connInstanceTO connector instance object to provide special configuration properties
-     * @return supported object classes for connector bundle matching the given connector instance id
+     * @return supported object classes for connector bundle matching the given connector instance key
      */
     @POST
-    @Path("{connInstanceKey}/supportedObjectClasses")
+    @Path("{key}/supportedObjectClasses")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     List<ConnIdObjectClassTO> getSupportedObjectClasses(
-            @NotNull @PathParam("connInstanceKey") Long connInstanceKey,
+            @NotNull @PathParam("key") Long key,
             @NotNull ConnInstanceTO connInstanceTO);
 
     /**
-     * Returns connector instance with matching id.
+     * Returns connector instance with matching key.
      *
-     * @param connInstanceKey connector instance id to be read
-     * @return connector instance with matching id
+     * @param key connector instance key to be read
+     * @return connector instance with matching key
      */
     @GET
-    @Path("{connInstanceKey}")
+    @Path("{key}")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ConnInstanceTO read(@NotNull @PathParam("connInstanceKey") Long connInstanceKey);
+    ConnInstanceTO read(@NotNull @PathParam("key") Long key);
 
     /**
      * Returns connector instance for matching resource.
@@ -151,24 +151,24 @@ public interface ConnectorService extends JAXRSService {
     Response create(@NotNull ConnInstanceTO connInstanceTO);
 
     /**
-     * Updates the connector instance matching the provided id.
+     * Updates the connector instance matching the provided key.
      *
-     * @param connInstanceKey connector instance id to be updated
+     * @param key connector instance key to be updated
      * @param connInstanceTO connector instance to be stored
      */
     @PUT
-    @Path("{connInstanceKey}")
+    @Path("{key}")
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("connInstanceKey") Long connInstanceKey, @NotNull ConnInstanceTO connInstanceTO);
+    void update(@NotNull @PathParam("key") Long key, @NotNull ConnInstanceTO connInstanceTO);
 
     /**
-     * Deletes the connector instance matching the provided id.
+     * Deletes the connector instance matching the provided key.
      *
-     * @param connInstanceKey connector instance id to be deleted
+     * @param key connector instance key to be deleted
      */
     @DELETE
-    @Path("{connInstanceKey}")
-    void delete(@NotNull @PathParam("connInstanceKey") Long connInstanceKey);
+    @Path("{key}")
+    void delete(@NotNull @PathParam("key") Long key);
 
     /**
      * @param connInstanceTO connector instance to be used for connection check
@@ -190,7 +190,7 @@ public interface ConnectorService extends JAXRSService {
     /**
      * Executes the provided bulk action.
      *
-     * @param bulkAction list of connector instance ids against which the bulk action will be performed.
+     * @param bulkAction list of connector instance keys against which the bulk action will be performed.
      * @return Bulk action result
      */
     @POST

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index 48ba21a..4656dce 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -49,27 +49,27 @@ public interface ResourceService extends JAXRSService {
     /**
      * Returns connector object from the external resource, for the given type and key.
      *
-     * @param resourceKey Name of resource to read connector object from
+     * @param key Name of resource to read connector object from
      * @param anyTypeKey any object type
-     * @param key any object key
+     * @param anyKey any object key
      * @return connector object from the external resource, for the given type and key
      */
     @GET
-    @Path("{resourceKey}/{anyTypeKey}/{key}")
+    @Path("{key}/{anyTypeKey}/{anyKey}")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ConnObjectTO readConnObject(@NotNull @PathParam("resourceKey") String resourceKey,
-            @NotNull @PathParam("anyTypeKey") String anyTypeKey, @NotNull @PathParam("key") Long key);
+    ConnObjectTO readConnObject(@NotNull @PathParam("key") String key,
+            @NotNull @PathParam("anyTypeKey") String anyTypeKey, @NotNull @PathParam("anyKey") Long anyKey);
 
     /**
      * Returns the resource with matching name.
      *
-     * @param resourceKey Name of resource to be read
+     * @param key Name of resource to be read
      * @return resource with matching name
      */
     @GET
-    @Path("{resourceKey}")
+    @Path("{key}")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ResourceTO read(@NotNull @PathParam("resourceKey") String resourceKey);
+    ResourceTO read(@NotNull @PathParam("key") String key);
 
     /**
      * Returns a list of all resources.
@@ -97,23 +97,23 @@ public interface ResourceService extends JAXRSService {
     /**
      * Updates the resource matching the given name.
      *
-     * @param resourceKey name of resource to be updated
+     * @param key name of resource to be updated
      * @param resourceTO resource to be stored
      */
     @PUT
-    @Path("{resourceKey}")
+    @Path("{key}")
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("resourceKey") String resourceKey, @NotNull ResourceTO resourceTO);
+    void update(@NotNull @PathParam("key") String key, @NotNull ResourceTO resourceTO);
 
     /**
      * Deletes the resource matching the given name.
      *
-     * @param resourceKey name of resource to be deleted
+     * @param key name of resource to be deleted
      */
     @DELETE
-    @Path("{resourceKey}")
+    @Path("{key}")
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void delete(@NotNull @PathParam("resourceKey") String resourceKey);
+    void delete(@NotNull @PathParam("key") String key);
 
     /**
      * Checks whether the connection to resource could be established.
@@ -129,7 +129,7 @@ public interface ResourceService extends JAXRSService {
     /**
      * De-associate any objects from the given resource.
      *
-     * @param resourceKey name of resource
+     * @param key name of resource
      * @param anyTypeKey any object kind
      * @param type resource de-association action type
      * @param keys any object keys against which the bulk action will be performed
@@ -140,10 +140,10 @@ public interface ResourceService extends JAXRSService {
                 value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
     })
     @POST
-    @Path("{resourceKey}/bulkDeassociation/{anyTypeKey}/{type}")
+    @Path("{key}/bulkDeassociation/{anyTypeKey}/{type}")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    BulkActionResult bulkDeassociation(@NotNull @PathParam("resourceKey") String resourceKey,
+    BulkActionResult bulkDeassociation(@NotNull @PathParam("key") String key,
             @NotNull @PathParam("anyTypeKey") String anyTypeKey,
             @NotNull @PathParam("type") ResourceDeassociationActionType type, @NotNull List<AnyKey> keys);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/misc/src/main/java/org/apache/syncope/core/misc/ConnObjectUtils.java
----------------------------------------------------------------------
diff --git a/core/misc/src/main/java/org/apache/syncope/core/misc/ConnObjectUtils.java b/core/misc/src/main/java/org/apache/syncope/core/misc/ConnObjectUtils.java
index 766c5cf..c86ee7c 100644
--- a/core/misc/src/main/java/org/apache/syncope/core/misc/ConnObjectUtils.java
+++ b/core/misc/src/main/java/org/apache/syncope/core/misc/ConnObjectUtils.java
@@ -204,8 +204,8 @@ public class ConnObjectUtils {
 
             AttrTO attrTO;
             switch (item.getIntMappingType()) {
-                case UserId:
-                case GroupId:
+                case UserKey:
+                case GroupKey:
                     break;
 
                 case Password:

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/misc/src/main/java/org/apache/syncope/core/misc/MappingUtils.java
----------------------------------------------------------------------
diff --git a/core/misc/src/main/java/org/apache/syncope/core/misc/MappingUtils.java b/core/misc/src/main/java/org/apache/syncope/core/misc/MappingUtils.java
index 2efae81..97008d0 100644
--- a/core/misc/src/main/java/org/apache/syncope/core/misc/MappingUtils.java
+++ b/core/misc/src/main/java/org/apache/syncope/core/misc/MappingUtils.java
@@ -528,9 +528,9 @@ public final class MappingUtils {
                 }
                 break;
 
-            case UserId:
-            case GroupId:
-            case AnyId:
+            case UserKey:
+            case GroupKey:
+            case AnyKey:
                 for (Any<?, ?, ?> any : anys) {
                     AnyUtils anyUtils = anyUtilsFactory.getInstance(any);
                     attrValue = anyUtils.newPlainAttrValue();

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/resource/JPAMappingItem.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/resource/JPAMappingItem.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/resource/JPAMappingItem.java
index d9c1af2..2aa587f 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/resource/JPAMappingItem.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/resource/JPAMappingItem.java
@@ -141,9 +141,9 @@ public class JPAMappingItem extends AbstractEntity<Long> implements MappingItem
         final String name;
 
         switch (getIntMappingType()) {
-            case UserId:
-            case GroupId:
-            case AnyId:
+            case UserKey:
+            case GroupKey:
+            case AnyKey:
                 name = "id";
                 break;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/entity/ResourceTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/entity/ResourceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/entity/ResourceTest.java
index 5fd6f53..ee9a9f7 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/entity/ResourceTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/entity/ResourceTest.java
@@ -120,7 +120,7 @@ public class ResourceTest extends AbstractTest {
         MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class);
         connObjectKey.setExtAttrName("username");
         connObjectKey.setIntAttrName("fullname");
-        connObjectKey.setIntMappingType(IntMappingType.UserId);
+        connObjectKey.setIntMappingType(IntMappingType.UserKey);
         connObjectKey.setPurpose(MappingPurpose.BOTH);
         mapping.setConnObjectKeyItem(connObjectKey);
 
@@ -242,7 +242,7 @@ public class ResourceTest extends AbstractTest {
         MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class);
         connObjectKey.setExtAttrName("username");
         connObjectKey.setIntAttrName("fullname");
-        connObjectKey.setIntMappingType(IntMappingType.UserId);
+        connObjectKey.setIntMappingType(IntMappingType.UserKey);
         connObjectKey.setPurpose(MappingPurpose.BOTH);
         mapping.setConnObjectKeyItem(connObjectKey);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/relationship/ResourceTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/relationship/ResourceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/relationship/ResourceTest.java
index 33e8669..8e1e554 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/relationship/ResourceTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/relationship/ResourceTest.java
@@ -138,7 +138,7 @@ public class ResourceTest extends AbstractTest {
         MappingItem connObjectKey = entityFactory.newEntity(MappingItem.class);
         connObjectKey.setExtAttrName("username");
         connObjectKey.setIntAttrName("username");
-        connObjectKey.setIntMappingType(IntMappingType.UserId);
+        connObjectKey.setIntMappingType(IntMappingType.UserKey);
         connObjectKey.setPurpose(MappingPurpose.PROPAGATION);
         mapping.setConnObjectKeyItem(connObjectKey);
         connObjectKey.setMapping(mapping);

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/persistence-jpa/src/test/resources/content.xml
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/resources/content.xml b/core/persistence-jpa/src/test/resources/content.xml
index 7c123a7..b61cb95 100644
--- a/core/persistence-jpa/src/test/resources/content.xml
+++ b/core/persistence-jpa/src/test/resources/content.xml
@@ -676,7 +676,7 @@ under the License.
   <Provision id="15" resource_name="ws-target-resource-1" anyType_name="USER" objectClass="__ACCOUNT__"/>
   <Mapping id="15" provision_id="15"/>
   <MappingItem id="99" mapping_id="15" extAttrName="userId"
-               intMappingType="UserId" mandatoryCondition="true"
+               intMappingType="UserKey" mandatoryCondition="true"
                connObjectKey="1" password="0" purpose="PROPAGATION"/>
   <MappingItem id="100" extAttrName="email" mapping_id="15"
                intAttrName="email" intMappingType="UserPlainSchema" mandatoryCondition="true"
@@ -907,7 +907,7 @@ under the License.
   <Provision id="17" resource_name="resource-db-virattr" anyType_name="USER" objectClass="__ACCOUNT__"/>
   <Mapping id="17" provision_id="17"/>
   <MappingItem id="331" mapping_id="17" connObjectKey="1" password="0"
-               extAttrName="id" intMappingType="UserId" 
+               extAttrName="id" intMappingType="UserKey" 
                mandatoryCondition="true" purpose="BOTH"/>
   <MappingItem id="332" mapping_id="17" connObjectKey="0" password="0" 
                extAttrName="USERNAME" intAttrName="virtualdata" intMappingType="UserVirtualSchema"

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncUtils.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncUtils.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncUtils.java
index b748345..71ad319 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncUtils.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncUtils.java
@@ -197,9 +197,9 @@ public class SyncUtils {
                 }
                 break;
 
-            case UserId:
-            case GroupId:
-            case AnyId:
+            case UserKey:
+            case GroupKey:
+            case AnyKey:
                 Any<?, ?, ?> any = getAnyDAO(connObjectKeyItem).find(Long.parseLong(uid));
                 if (any != null) {
                     result.add(any.getKey());

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
index c65a409..a594bac 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
@@ -84,7 +84,7 @@ abstract class AbstractServiceImpl implements JAXRSService {
     protected Response createResponse(final Object id, final Object entity) {
         Response.ResponseBuilder builder = Response.
                 created(uriInfo.getAbsolutePathBuilder().path(String.valueOf(id)).build()).
-                header(RESTHeaders.RESOURCE_ID, id);
+                header(RESTHeaders.RESOURCE_KEY, id);
 
         switch (getPreference()) {
             case RETURN_NO_CONTENT:

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
index 47cdde2..3683e61 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeClassServiceImpl.java
@@ -49,7 +49,7 @@ public class AnyTypeClassServiceImpl extends AbstractServiceImpl implements AnyT
         AnyTypeClassTO created = logic.create(anyTypeTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(created.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, created.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
index 9b289d5..bb3c699 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyTypeServiceImpl.java
@@ -49,7 +49,7 @@ public class AnyTypeServiceImpl extends AbstractServiceImpl implements AnyTypeSe
         AnyTypeTO created = logic.create(anyTypeTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(created.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, created.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
index 9f6099c..ac26aad 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
@@ -48,13 +48,13 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
         ConnInstanceTO connInstance = logic.create(connInstanceTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(connInstance.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, connInstance.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, connInstance.getKey()).
                 build();
     }
 
     @Override
-    public void delete(final Long connInstanceKey) {
-        logic.delete(connInstanceKey);
+    public void delete(final Long key) {
+        logic.delete(key);
     }
 
     @Override
@@ -63,15 +63,15 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public List<ConnConfProperty> getConfigurationProperties(final Long connInstanceKey) {
-        return logic.getConfigurationProperties(connInstanceKey);
+    public List<ConnConfProperty> getConfigurationProperties(final Long key) {
+        return logic.getConfigurationProperties(key);
     }
 
     @Override
-    public List<PlainSchemaTO> getSchemaNames(final Long connInstanceKey, final ConnInstanceTO connInstanceTO,
+    public List<PlainSchemaTO> getSchemaNames(final Long key, final ConnInstanceTO connInstanceTO,
             final boolean includeSpecial) {
 
-        connInstanceTO.setKey(connInstanceKey);
+        connInstanceTO.setKey(key);
 
         return CollectionUtils.collect(logic.getSchemaNames(connInstanceTO, includeSpecial),
                 new Transformer<String, PlainSchemaTO>() {
@@ -86,10 +86,10 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public List<ConnIdObjectClassTO> getSupportedObjectClasses(final Long connInstanceKey,
+    public List<ConnIdObjectClassTO> getSupportedObjectClasses(final Long key,
             final ConnInstanceTO connInstanceTO) {
 
-        connInstanceTO.setKey(connInstanceKey);
+        connInstanceTO.setKey(key);
 
         List<String> objectClasses = logic.getSupportedObjectClasses(connInstanceTO);
         List<ConnIdObjectClassTO> result = new ArrayList<>(objectClasses.size());
@@ -105,8 +105,8 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public ConnInstanceTO read(final Long connInstanceKey) {
-        return logic.read(connInstanceKey);
+    public ConnInstanceTO read(final Long key) {
+        return logic.read(key);
     }
 
     @Override
@@ -115,8 +115,8 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public void update(final Long connInstanceKey, final ConnInstanceTO connInstanceTO) {
-        connInstanceTO.setKey(connInstanceKey);
+    public void update(final Long key, final ConnInstanceTO connInstanceTO) {
+        connInstanceTO.setKey(key);
         logic.update(connInstanceTO);
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
index 4691189..017b0b3 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/NotificationServiceImpl.java
@@ -39,7 +39,7 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
         NotificationTO created = logic.create(notificationTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(created.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, created.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
index 1558120..a61e776 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/PolicyServiceImpl.java
@@ -43,7 +43,7 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
         T policy = logic.create(policyTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(policy.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, policy.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, policy.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RealmServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RealmServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RealmServiceImpl.java
index aba5295..ecf372d 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RealmServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RealmServiceImpl.java
@@ -51,7 +51,7 @@ public class RealmServiceImpl extends AbstractServiceImpl implements RealmServic
         RealmTO created = logic.create(StringUtils.prependIfMissing(parentPath, SyncopeConstants.ROOT_REALM), realmTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(created.getName()).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getFullPath()).
+                header(RESTHeaders.RESOURCE_KEY, created.getFullPath()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
index 3c910fa..405e105 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
@@ -52,7 +52,7 @@ public class ReportServiceImpl extends AbstractServiceImpl implements ReportServ
         ReportTO createdReportTO = logic.create(reportTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(createdReportTO.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, createdReportTO.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, createdReportTO.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
index 28b834b..48d6445 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
@@ -61,24 +61,24 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
         ResourceTO created = logic.create(resourceTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(created.getKey()).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, created.getKey()).
                 build();
     }
 
     @Override
-    public void update(final String resourceKey, final ResourceTO resourceTO) {
-        resourceTO.setKey(resourceKey);
+    public void update(final String key, final ResourceTO resourceTO) {
+        resourceTO.setKey(key);
         logic.update(resourceTO);
     }
 
     @Override
-    public void delete(final String resourceKey) {
-        logic.delete(resourceKey);
+    public void delete(final String key) {
+        logic.delete(key);
     }
 
     @Override
-    public ResourceTO read(final String resourceKey) {
-        return logic.read(resourceKey);
+    public ResourceTO read(final String key) {
+        return logic.read(key);
     }
 
     @Override
@@ -87,8 +87,8 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public ConnObjectTO readConnObject(final String resourceKey, final String anyTypeKey, final Long key) {
-        return logic.readConnObject(resourceKey, anyTypeKey, key);
+    public ConnObjectTO readConnObject(final String key, final String anyTypeKey, final Long anyKey) {
+        return logic.readConnObject(key, anyTypeKey, anyKey);
     }
 
     @Override
@@ -98,7 +98,7 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
 
     @Override
     public BulkActionResult bulkDeassociation(
-            final String resourceKey, final String anyTypeKey, final ResourceDeassociationActionType type,
+            final String key, final String anyTypeKey, final ResourceDeassociationActionType type,
             final List<AnyKey> keys) {
 
         AbstractResourceAssociator<? extends AnyTO> associator = anyTypeKey.equalsIgnoreCase(AnyTypeKind.USER.name())
@@ -109,29 +109,29 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
 
         BulkActionResult result = new BulkActionResult();
 
-        for (AnyKey key : keys) {
-            Set<String> resources = Collections.singleton(resourceKey);
+        for (AnyKey anyKey : keys) {
+            Set<String> resources = Collections.singleton(key);
             try {
                 switch (type) {
                     case DEPROVISION:
-                        associator.deprovision(key.getElement(), resources);
+                        associator.deprovision(anyKey.getElement(), resources);
                         break;
 
                     case UNASSIGN:
-                        associator.unassign(key.getElement(), resources);
+                        associator.unassign(anyKey.getElement(), resources);
                         break;
 
                     case UNLINK:
-                        associator.unlink(key.getElement(), resources);
+                        associator.unlink(anyKey.getElement(), resources);
                         break;
 
                     default:
                 }
 
-                result.getResults().put(String.valueOf(key.getElement()), BulkActionResult.Status.SUCCESS);
+                result.getResults().put(String.valueOf(anyKey.getElement()), BulkActionResult.Status.SUCCESS);
             } catch (Exception e) {
-                LOG.warn("While executing {} on {} {}", type, anyTypeKey, key.getElement(), e);
-                result.getResults().put(String.valueOf(key.getElement()), BulkActionResult.Status.FAILURE);
+                LOG.warn("While executing {} on {} {}", type, anyTypeKey, anyKey.getElement(), e);
+                result.getResults().put(String.valueOf(anyKey.getElement()), BulkActionResult.Status.FAILURE);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
index 33403fd..d2efb3f 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RoleServiceImpl.java
@@ -49,7 +49,7 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
         RoleTO created = logic.create(roleTO);
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(created.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, created.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
index c8d2f26..aa99255 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
@@ -41,7 +41,7 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
 
         URI location = uriInfo.getAbsolutePathBuilder().path(created.getKey()).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, created.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, created.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
index 70666b6..b094adc 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SecurityQuestionServiceImpl.java
@@ -50,7 +50,7 @@ public class SecurityQuestionServiceImpl extends AbstractServiceImpl implements
 
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(created.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, String.valueOf(created.getKey())).
+                header(RESTHeaders.RESOURCE_KEY, String.valueOf(created.getKey())).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
index d42ed6a..29d4a0c 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
@@ -59,7 +59,7 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
 
         URI location = uriInfo.getAbsolutePathBuilder().path(String.valueOf(createdTask.getKey())).build();
         return Response.created(location).
-                header(RESTHeaders.RESOURCE_ID, createdTask.getKey()).
+                header(RESTHeaders.RESOURCE_KEY, createdTask.getKey()).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
index d15c236..74d58d1 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserSelfServiceImpl.java
@@ -56,7 +56,7 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
     public Response read() {
         Pair<String, UserTO> self = logic.readSelf();
         return Response.ok().
-                header(RESTHeaders.RESOURCE_ID, self.getValue().getKey()).
+                header(RESTHeaders.RESOURCE_KEY, self.getValue().getKey()).
                 header(RESTHeaders.OWNED_ENTITLEMENTS, self.getKey()).
                 entity(self.getValue()).
                 build();

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
index 83f09a4..9ea1279 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
@@ -62,7 +62,7 @@ public class UserServiceImpl extends AbstractServiceImpl implements UserService
     @Override
     public Response getUserKey(final String username) {
         return Response.ok().header(HttpHeaders.ALLOW, OPTIONS_ALLOW).
-                header(RESTHeaders.USER_ID, logic.getKey(username)).
+                header(RESTHeaders.USER_KEY, logic.getKey(username)).
                 build();
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
index 97fc9d0..8cfec8b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
@@ -280,7 +280,7 @@ public abstract class AbstractITCase {
 
     protected UserTO readUser(final String username) {
         return userService.read(Long.valueOf(
-                userService.getUserKey(username).getHeaderString(RESTHeaders.USER_ID)));
+                userService.getUserKey(username).getHeaderString(RESTHeaders.USER_KEY)));
     }
 
     protected UserTO updateUser(final UserMod userMod) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
index 391e8e7..6cf1313 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
@@ -624,7 +624,7 @@ public class GroupITCase extends AbstractITCase {
             mapping.setConnObjectLink("'cn=' + displayProperty + ',ou=groups,o=isp'");
 
             MappingItemTO description = new MappingItemTO();
-            description.setIntMappingType(IntMappingType.GroupId);
+            description.setIntMappingType(IntMappingType.GroupKey);
             description.setExtAttrName("description");
             description.setPurpose(MappingPurpose.BOTH);
             mapping.add(description);

http://git-wip-us.apache.org/repos/asf/syncope/blob/a64ef15f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ResourceITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ResourceITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ResourceITCase.java
index faf4701..a6dd805 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ResourceITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ResourceITCase.java
@@ -78,7 +78,7 @@ public class ResourceITCase extends AbstractITCase {
         item = new MappingItemTO();
         item.setExtAttrName("username");
         item.setIntAttrName("fullname");
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setPurpose(MappingPurpose.BOTH);
         mapping.setConnObjectKeyItem(item);
 
@@ -137,7 +137,7 @@ public class ResourceITCase extends AbstractITCase {
         item = new MappingItemTO();
         item.setExtAttrName("username");
         item.setIntAttrName("fullname");
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setConnObjectKey(true);
         item.setPurpose(MappingPurpose.BOTH);
         mapping.setConnObjectKeyItem(item);
@@ -189,7 +189,7 @@ public class ResourceITCase extends AbstractITCase {
         provisionTO.setMapping(mapping);
 
         MappingItemTO item = new MappingItemTO();
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setExtAttrName("userId");
         item.setConnObjectKey(true);
         item.setPurpose(MappingPurpose.PROPAGATION);
@@ -203,7 +203,7 @@ public class ResourceITCase extends AbstractITCase {
         mapping = new MappingTO();
         provisionTO.setMapping(mapping);
         item = new MappingItemTO();
-        item.setIntMappingType(IntMappingType.GroupId);
+        item.setIntMappingType(IntMappingType.GroupKey);
         item.setExtAttrName("groupId");
         item.setConnObjectKey(true);
         item.setPurpose(MappingPurpose.SYNCHRONIZATION);
@@ -239,7 +239,7 @@ public class ResourceITCase extends AbstractITCase {
         provisionTO.setMapping(mapping);
 
         MappingItemTO item = new MappingItemTO();
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setExtAttrName("userId");
         item.setConnObjectKey(true);
         mapping.setConnObjectKeyItem(item);
@@ -275,7 +275,7 @@ public class ResourceITCase extends AbstractITCase {
         provisionTO.setMapping(mapping);
 
         MappingItemTO item = new MappingItemTO();
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setExtAttrName("userId");
         item.setConnObjectKey(true);
         mapping.setConnObjectKeyItem(item);
@@ -373,7 +373,7 @@ public class ResourceITCase extends AbstractITCase {
         item = new MappingItemTO();
         item.setExtAttrName("username");
         item.setIntAttrName("fullname");
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setConnObjectKey(true);
         item.setPurpose(MappingPurpose.BOTH);
         mapping.setConnObjectKeyItem(item);
@@ -597,7 +597,7 @@ public class ResourceITCase extends AbstractITCase {
         provisionTO.setMapping(mapping);
 
         MappingItemTO item = new MappingItemTO();
-        item.setIntMappingType(IntMappingType.UserId);
+        item.setIntMappingType(IntMappingType.UserKey);
         item.setExtAttrName("userId");
         item.setConnObjectKey(true);
         item.setPurpose(MappingPurpose.PROPAGATION);


Mime
View raw message