syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [3/4] syncope git commit: Enhancing Swagger friendliness for REST services
Date Tue, 26 Dec 2017 16:26:14 GMT
http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
index 9157b27..310e631 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
@@ -22,11 +22,13 @@ import javax.validation.constraints.NotNull;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.ext.PATCH;
 import org.apache.syncope.common.lib.patch.StatusPatch;
 import org.apache.syncope.common.lib.patch.UserPatch;
 import org.apache.syncope.common.lib.to.UserTO;
@@ -35,7 +37,7 @@ import org.apache.syncope.common.lib.to.UserTO;
  * REST operations for users.
  */
 @Path("users")
-public interface UserService extends AnyService<UserTO, UserPatch> {
+public interface UserService extends AnyService<UserTO> {
 
     /**
      * Creates a new user.
@@ -53,6 +55,32 @@ public interface UserService extends AnyService<UserTO, UserPatch> {
             @DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
 
     /**
+     * Updates user matching the provided key.
+     *
+     * @param userPatch modification to be applied to user matching the provided key
+     * @return Response object featuring the updated user enriched with propagation status information
+     * - ProvisioningResult as Entity
+     */
+    @PATCH
+    @Path("{key}")
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    Response update(@NotNull UserPatch userPatch);
+
+    /**
+     * Updates user matching the provided key.
+     *
+     * @param userTO complete update
+     * @return Response object featuring the updated user enriched with propagation status information
+     * - ProvisioningResult as Entity
+     */
+    @PUT
+    @Path("{key}")
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    Response update(@NotNull UserTO userTO);
+
+    /**
      * Performs a status update on given user.
      *
      * @param statusPatch status update details

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
index cb1cc4a..fcd6751 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -83,11 +83,12 @@ public interface WorkflowService extends JAXRSService {
      * @param anyType any object type
      * @param key workflow definition key
      * @param definition workflow definition for matching kind
+     * @return an empty response if operation was successful
      */
     @PUT
     @Path("{anyType}/{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    void set(
+    Response set(
             @NotNull @PathParam("anyType") String anyType,
             @NotNull @PathParam("key") String key,
             @NotNull String definition);
@@ -97,10 +98,11 @@ public interface WorkflowService extends JAXRSService {
      *
      * @param anyType any object type
      * @param key workflow definition key
+     * @return an empty response if operation was successful
      */
     @DELETE
     @Path("{anyType}/{key}")
-    void delete(
+    Response delete(
             @NotNull @PathParam("anyType") String anyType,
             @NotNull @PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractAnyLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractAnyLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractAnyLogic.java
index fa3ca98..abff7a3 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractAnyLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractAnyLogic.java
@@ -247,15 +247,13 @@ public abstract class AbstractAnyLogic<TO extends AnyTO, P extends AnyPatch> ext
 
     public abstract TO read(String key);
 
-    public abstract ProvisioningResult<TO> create(TO anyTO, boolean nullPriorityAsync);
-
-    public abstract ProvisioningResult<TO> update(P anyPatch, boolean nullPriorityAsync);
-
-    public abstract ProvisioningResult<TO> delete(String key, boolean nullPriorityAsync);
-
     public abstract Pair<Integer, List<TO>> search(
             SearchCond searchCond,
             int page, int size, List<OrderByClause> orderBy,
             String realm,
             boolean details);
+
+    public abstract ProvisioningResult<TO> update(P anyPatch, boolean nullPriorityAsync);
+
+    public abstract ProvisioningResult<TO> delete(String key, boolean nullPriorityAsync);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
index 5857513..3acbc20 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
@@ -99,7 +99,6 @@ public class AnyObjectLogic extends AbstractAnyLogic<AnyObjectTO, AnyObjectPatch
         return Pair.of(count, result);
     }
 
-    @Override
     public ProvisioningResult<AnyObjectTO> create(final AnyObjectTO anyObjectTO, final boolean nullPriorityAsync) {
         Pair<AnyObjectTO, List<LogicActions>> before = beforeCreate(anyObjectTO);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
index 103dae8..cbda5b6 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
@@ -173,7 +173,6 @@ public class GroupLogic extends AbstractAnyLogic<GroupTO, GroupPatch> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.GROUP_CREATE + "')")
-    @Override
     public ProvisioningResult<GroupTO> create(final GroupTO groupTO, final boolean nullPriorityAsync) {
         Pair<GroupTO, List<LogicActions>> before = beforeCreate(groupTO);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
index 2b0b5cc..b4fb038 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
@@ -125,12 +125,6 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserPatch> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.USER_CREATE + "')")
-    @Override
-    public ProvisioningResult<UserTO> create(final UserTO userTO, final boolean nullPriorityAsync) {
-        return doCreate(userTO, true, false, nullPriorityAsync);
-    }
-
-    @PreAuthorize("hasRole('" + StandardEntitlement.USER_CREATE + "')")
     public ProvisioningResult<UserTO> create(
             final UserTO userTO, final boolean storePassword, final boolean nullPriorityAsync) {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
index ee8489c..c8c0572 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java
@@ -26,7 +26,6 @@ import javax.ws.rs.BadRequestException;
 import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.AnyOperations;
 import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.patch.AnyPatch;
 import org.apache.syncope.common.lib.patch.AssociationPatch;
@@ -57,7 +56,7 @@ import org.apache.syncope.core.persistence.api.dao.search.SearchCond;
 
 public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
         extends AbstractServiceImpl
-        implements AnyService<TO, P> {
+        implements AnyService<TO> {
 
     protected abstract AnyDAO<?> getAnyDAO();
 
@@ -65,7 +64,7 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
 
     protected abstract P newPatch(String key);
 
-    private String getActualKey(final String key) {
+    protected String getActualKey(final String key) {
         String actualKey = key;
         if (!SyncopeConstants.UUID_PATTERN.matcher(key).matches()) {
             actualKey = getAnyDAO().findKey(key);
@@ -152,12 +151,6 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
         return buildPagedResult(result.getRight(), anyQuery.getPage(), anyQuery.getSize(), result.getLeft());
     }
 
-    @Override
-    public Response create(final TO anyTO) {
-        ProvisioningResult<TO> created = getAnyLogic().create(anyTO, isNullPriorityAsync());
-        return createResponse(created);
-    }
-
     protected Date findLastChange(final String key) {
         Date lastChange = getAnyDAO().findLastChange(key);
         if (lastChange == null) {
@@ -167,8 +160,7 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
         return lastChange;
     }
 
-    @Override
-    public Response update(final P anyPatch) {
+    protected Response doUpdate(final P anyPatch) {
         anyPatch.setKey(getActualKey(anyPatch.getKey()));
         Date etagDate = findLastChange(anyPatch.getKey());
         checkETag(String.valueOf(etagDate.getTime()));
@@ -199,7 +191,7 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
             default:
         }
 
-        update(patch);
+        doUpdate(patch);
     }
 
     @Override
@@ -210,22 +202,11 @@ public abstract class AbstractAnyService<TO extends AnyTO, P extends AnyPatch>
     }
 
     @Override
-    public Response update(final TO anyTO) {
-        anyTO.setKey(getActualKey(anyTO.getKey()));
-        TO before = getAnyLogic().read(anyTO.getKey());
-
-        checkETag(before.getETagValue());
-
-        ProvisioningResult<TO> updated = getAnyLogic().update(AnyOperations.<TO, P>diff(anyTO, before, false),
-                isNullPriorityAsync());
-        return modificationResponse(updated);
-    }
-
-    @Override
-    public void delete(final String key, final SchemaType schemaType, final String schema) {
+    public Response delete(final String key, final SchemaType schemaType, final String schema) {
         String actualKey = getActualKey(key);
         addUpdateOrReplaceAttr(
                 actualKey, schemaType, new AttrTO.Builder().schema(schema).build(), PatchOperation.DELETE);
+        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
index aadbaf3..c5f3c89 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractExecutableService.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
+import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ExecTO;
@@ -51,8 +52,9 @@ public abstract class AbstractExecutableService extends AbstractServiceImpl impl
     }
 
     @Override
-    public void deleteExecution(final String executionKey) {
+    public Response deleteExecution(final String executionKey) {
         getExecutableLogic().deleteExecution(executionKey);
+        return Response.noContent().build();
     }
 
     @Override
@@ -76,8 +78,9 @@ public abstract class AbstractExecutableService extends AbstractServiceImpl impl
     }
 
     @Override
-    public void actionJob(final String key, final JobAction action) {
+    public Response actionJob(final String key, final JobAction action) {
         getExecutableLogic().actionJob(key, action);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
index 2b09324..1508298 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AccessTokenServiceImpl.java
@@ -59,8 +59,9 @@ public class AccessTokenServiceImpl extends AbstractServiceImpl implements Acces
     }
 
     @Override
-    public void logout() {
+    public Response logout() {
         logic.logout();
+        return Response.noContent().build();
     }
 
     @Override
@@ -73,8 +74,9 @@ public class AccessTokenServiceImpl extends AbstractServiceImpl implements Acces
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyObjectServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyObjectServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyObjectServiceImpl.java
index cf17f80..961a328 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyObjectServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AnyObjectServiceImpl.java
@@ -18,12 +18,15 @@
  */
 package org.apache.syncope.core.rest.cxf.service;
 
+import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.AnyOperations;
 import org.apache.syncope.common.lib.SyncopeClientException;
 import org.apache.syncope.common.lib.patch.AnyObjectPatch;
 import org.apache.syncope.common.lib.search.SpecialAttr;
 import org.apache.syncope.common.lib.to.AnyObjectTO;
 import org.apache.syncope.common.lib.to.PagedResult;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.rest.api.beans.AnyQuery;
 import org.apache.syncope.common.rest.api.service.AnyObjectService;
@@ -61,6 +64,29 @@ public class AnyObjectServiceImpl extends AbstractAnyService<AnyObjectTO, AnyObj
     }
 
     @Override
+    public Response create(final AnyObjectTO anyObjectTO) {
+        ProvisioningResult<AnyObjectTO> created = logic.create(anyObjectTO, isNullPriorityAsync());
+        return createResponse(created);
+    }
+
+    @Override
+    public Response update(final AnyObjectTO anyObjectTO) {
+        anyObjectTO.setKey(getActualKey(anyObjectTO.getKey()));
+        AnyObjectTO before = logic.read(anyObjectTO.getKey());
+
+        checkETag(before.getETagValue());
+
+        ProvisioningResult<AnyObjectTO> updated =
+                logic.update(AnyOperations.diff(anyObjectTO, before, false), isNullPriorityAsync());
+        return modificationResponse(updated);
+    }
+
+    @Override
+    public Response update(final AnyObjectPatch anyObjectPatch) {
+        return doUpdate(anyObjectPatch);
+    }
+
+    @Override
     public PagedResult<AnyObjectTO> search(final AnyQuery anyQuery) {
         if (StringUtils.isBlank(anyQuery.getFiql())
                 || -1 == anyQuery.getFiql().indexOf(SpecialAttr.TYPE.toString())) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 bd3149f..336cea4 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
@@ -54,13 +54,15 @@ public class AnyTypeClassServiceImpl extends AbstractServiceImpl implements AnyT
     }
 
     @Override
-    public void update(final AnyTypeClassTO anyTypeTO) {
+    public Response update(final AnyTypeClassTO anyTypeTO) {
         logic.update(anyTypeTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 9dd4982..c580241 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
@@ -54,13 +54,15 @@ public class AnyTypeServiceImpl extends AbstractServiceImpl implements AnyTypeSe
     }
 
     @Override
-    public void update(final AnyTypeTO anyTypeTO) {
+    public Response update(final AnyTypeTO anyTypeTO) {
         logic.update(anyTypeTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
index 4a40a75..befd5b3 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
@@ -50,8 +50,9 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public void delete(final String schema) {
+    public Response delete(final String schema) {
         logic.delete(schema);
+        return Response.noContent().build();
     }
 
     @Override
@@ -65,7 +66,8 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public void set(final AttrTO value) {
+    public Response set(final AttrTO value) {
         logic.set(value);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
index 3424c5e..205b3e0 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorHistoryServiceImpl.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 import org.apache.syncope.common.rest.api.service.ConnectorHistoryService;
 import org.apache.syncope.core.logic.ConnectorHistoryLogic;
@@ -37,13 +38,15 @@ public class ConnectorHistoryServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public void restore(final String key) {
+    public Response restore(final String key) {
         logic.restore(key);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 45da758..082d89e 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
@@ -46,8 +46,9 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -78,17 +79,20 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
     }
 
     @Override
-    public void update(final ConnInstanceTO connInstanceTO) {
+    public Response update(final ConnInstanceTO connInstanceTO) {
         logic.update(connInstanceTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void check(final ConnInstanceTO connInstanceTO) {
+    public Response check(final ConnInstanceTO connInstanceTO) {
         logic.check(connInstanceTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void reload() {
+    public Response reload() {
         logic.reload();
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
index daa8aad..168c3cd 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DomainServiceImpl.java
@@ -54,13 +54,15 @@ public class DomainServiceImpl extends AbstractServiceImpl implements DomainServ
     }
 
     @Override
-    public void update(final DomainTO anyTypeTO) {
+    public Response update(final DomainTO anyTypeTO) {
         logic.update(anyTypeTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
index 41e3bad..dec464b 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/DynRealmServiceImpl.java
@@ -54,13 +54,15 @@ public class DynRealmServiceImpl extends AbstractServiceImpl implements DynRealm
     }
 
     @Override
-    public void update(final DynRealmTO roleTO) {
+    public Response update(final DynRealmTO roleTO) {
         logic.update(roleTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
index 94c41c4..4e23d22 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
@@ -19,9 +19,12 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.AnyOperations;
 import org.apache.syncope.common.lib.patch.GroupPatch;
 import org.apache.syncope.common.lib.to.ExecTO;
 import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
 import org.apache.syncope.common.lib.types.BulkMembersActionType;
 import org.apache.syncope.common.rest.api.service.GroupService;
 import org.apache.syncope.core.logic.AbstractAnyLogic;
@@ -58,6 +61,29 @@ public class GroupServiceImpl extends AbstractAnyService<GroupTO, GroupPatch> im
     }
 
     @Override
+    public Response create(final GroupTO groupTO) {
+        ProvisioningResult<GroupTO> created = logic.create(groupTO, isNullPriorityAsync());
+        return createResponse(created);
+    }
+
+    @Override
+    public Response update(final GroupTO groupTO) {
+        groupTO.setKey(getActualKey(groupTO.getKey()));
+        GroupTO before = logic.read(groupTO.getKey());
+
+        checkETag(before.getETagValue());
+
+        ProvisioningResult<GroupTO> updated =
+                logic.update(AnyOperations.diff(groupTO, before, false), isNullPriorityAsync());
+        return modificationResponse(updated);
+    }
+
+    @Override
+    public Response update(final GroupPatch groupPatch) {
+        return doUpdate(groupPatch);
+    }
+
+    @Override
     public List<GroupTO> own() {
         return logic.own();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ImplementationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ImplementationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ImplementationServiceImpl.java
index c3190af..c85793b 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ImplementationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ImplementationServiceImpl.java
@@ -55,13 +55,15 @@ public class ImplementationServiceImpl extends AbstractServiceImpl implements Im
     }
 
     @Override
-    public void update(final ImplementationTO implementationTO) {
+    public Response update(final ImplementationTO implementationTO) {
         logic.update(implementationTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
index c62a55c..4f8c2f4 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/LoggerServiceImpl.java
@@ -21,6 +21,7 @@ package org.apache.syncope.core.rest.cxf.service;
 import java.text.ParseException;
 import java.util.List;
 import javax.ws.rs.BadRequestException;
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.log.EventCategoryTO;
 import org.apache.syncope.common.lib.log.LogAppender;
 import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -50,7 +51,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
     }
 
     @Override
-    public void delete(final LoggerType type, final String name) {
+    public Response delete(final LoggerType type, final String name) {
         switch (type) {
             case LOG:
                 logic.deleteLog(name);
@@ -67,7 +68,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
             default:
                 throw new BadRequestException();
         }
-
+        return Response.noContent().build();
     }
 
     @Override
@@ -100,7 +101,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
     }
 
     @Override
-    public void update(final LoggerType type, final LoggerTO logger) {
+    public Response update(final LoggerType type, final LoggerTO logger) {
         switch (type) {
             case LOG:
                 logic.setLogLevel(logger.getKey(), logger.getLevel().getLevel());
@@ -117,6 +118,7 @@ public class LoggerServiceImpl extends AbstractServiceImpl implements LoggerServ
             default:
                 throw new BadRequestException();
         }
+        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
index 2c1a434..ff5cb13 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/MailTemplateServiceImpl.java
@@ -61,8 +61,9 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -76,9 +77,10 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public void setFormat(final String key, final MailTemplateFormat format, final InputStream templateIn) {
+    public Response setFormat(final String key, final MailTemplateFormat format, final InputStream templateIn) {
         try {
             logic.setFormat(key, format, IOUtils.toString(templateIn, StandardCharsets.UTF_8));
+            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting format {} for mail template {}", format, key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -86,7 +88,8 @@ public class MailTemplateServiceImpl extends AbstractServiceImpl implements Mail
     }
 
     @Override
-    public void removeFormat(final String key, final MailTemplateFormat format) {
+    public Response removeFormat(final String key, final MailTemplateFormat format) {
         logic.setFormat(key, format, null);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 874f138..9671f93 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
@@ -56,13 +56,15 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
     }
 
     @Override
-    public void update(final NotificationTO notificationTO) {
+    public Response update(final NotificationTO notificationTO) {
         logic.update(notificationTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -71,7 +73,8 @@ public class NotificationServiceImpl extends AbstractServiceImpl implements Noti
     }
 
     @Override
-    public void actionJob(final JobAction action) {
+    public Response actionJob(final JobAction action) {
         logic.actionJob(action);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 8d6709a..64f765d 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
@@ -45,8 +45,9 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -60,7 +61,8 @@ public class PolicyServiceImpl extends AbstractServiceImpl implements PolicyServ
     }
 
     @Override
-    public void update(final AbstractPolicyTO policyTO) {
+    public Response update(final AbstractPolicyTO policyTO) {
         logic.update(policyTO);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
index 1cdc1d4..ffff1b3 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RelationshipTypeServiceImpl.java
@@ -54,13 +54,15 @@ public class RelationshipTypeServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public void update(final RelationshipTypeTO anyTypeTO) {
+    public Response update(final RelationshipTypeTO anyTypeTO) {
         logic.update(anyTypeTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 5a44cb0..65e1b43 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
@@ -54,8 +54,9 @@ public class ReportServiceImpl extends AbstractExecutableService implements Repo
     }
 
     @Override
-    public void update(final ReportTO reportTO) {
+    public Response update(final ReportTO reportTO) {
         logic.update(reportTO);
+        return Response.noContent().build();
     }
 
     @Override
@@ -81,7 +82,8 @@ public class ReportServiceImpl extends AbstractExecutableService implements Repo
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
index 9fc47d0..98dbc16 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportTemplateServiceImpl.java
@@ -62,8 +62,9 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -77,9 +78,10 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public void setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
+    public Response setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
         try {
             logic.setFormat(key, format, IOUtils.toString(templateIn, StandardCharsets.UTF_8.name()));
+            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting format {} for report template {}", format, key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -87,7 +89,8 @@ public class ReportTemplateServiceImpl extends AbstractServiceImpl implements Re
     }
 
     @Override
-    public void removeFormat(final String key, final ReportTemplateFormat format) {
+    public Response removeFormat(final String key, final ReportTemplateFormat format) {
         logic.setFormat(key, format, null);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
index b69b5be..ef5aead 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceHistoryServiceImpl.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 import org.apache.syncope.common.rest.api.service.ResourceHistoryService;
 import org.apache.syncope.core.logic.ResourceHistoryLogic;
@@ -37,13 +38,15 @@ public class ResourceHistoryServiceImpl extends AbstractServiceImpl implements R
     }
 
     @Override
-    public void restore(final String key) {
+    public Response restore(final String key) {
         logic.restore(key);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 2b76dfc..e3c9992 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
@@ -72,23 +72,27 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public void update(final ResourceTO resourceTO) {
+    public Response update(final ResourceTO resourceTO) {
         logic.update(resourceTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void setLatestSyncToken(final String key, final String anyTypeKey) {
+    public Response setLatestSyncToken(final String key, final String anyTypeKey) {
         logic.setLatestSyncToken(key, anyTypeKey);
+        return Response.noContent().build();
     }
 
     @Override
-    public void removeSyncToken(final String key, final String anyTypeKey) {
+    public Response removeSyncToken(final String key, final String anyTypeKey) {
         logic.removeSyncToken(key, anyTypeKey);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -138,8 +142,9 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
     }
 
     @Override
-    public void check(final ResourceTO resourceTO) {
+    public Response check(final ResourceTO resourceTO) {
         logic.check(resourceTO);
+        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 6a0a75a..b31b4e1 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
@@ -61,13 +61,15 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public void update(final RoleTO roleTO) {
+    public Response update(final RoleTO roleTO) {
         logic.update(roleTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -81,9 +83,10 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public void setConsoleLayoutInfo(final String key, final InputStream consoleLayoutIn) {
+    public Response setConsoleLayoutInfo(final String key, final InputStream consoleLayoutIn) {
         try {
             logic.setConsoleLayoutInfo(key, IOUtils.toString(consoleLayoutIn, StandardCharsets.UTF_8.name()));
+            return Response.noContent().build();
         } catch (final IOException e) {
             LOG.error("While setting console layout info for role {}", key, e);
             throw new InternalServerErrorException("Could not read entity", e);
@@ -91,8 +94,9 @@ public class RoleServiceImpl extends AbstractServiceImpl implements RoleService
     }
 
     @Override
-    public void removeConsoleLayoutInfo(final String key) {
+    public Response removeConsoleLayoutInfo(final String key) {
         logic.setConsoleLayoutInfo(key, null);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 810c520..b6c7397 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
@@ -47,8 +47,9 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public void delete(final SchemaType schemaType, final String key) {
+    public Response delete(final SchemaType schemaType, final String key) {
         logic.delete(schemaType, key);
+        return Response.noContent().build();
     }
 
     @Override
@@ -62,7 +63,8 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public void update(final SchemaType schemaType, final AbstractSchemaTO schemaTO) {
+    public Response update(final SchemaType schemaType, final AbstractSchemaTO schemaTO) {
         logic.update(schemaType, schemaTO);
+        return Response.noContent().build();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 5dca503..fbfd00a 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
@@ -55,13 +55,15 @@ public class SecurityQuestionServiceImpl extends AbstractServiceImpl implements
     }
 
     @Override
-    public void update(final SecurityQuestionTO securityQuestionTO) {
+    public Response update(final SecurityQuestionTO securityQuestionTO) {
         logic.update(securityQuestionTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 ea9f5af..47a860c 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
@@ -63,8 +63,9 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
     @SuppressWarnings("unchecked")
@@ -89,9 +90,10 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
     }
 
     @Override
-    public void update(final AbstractTaskTO taskTO) {
+    public Response update(final AbstractTaskTO taskTO) {
         if (taskTO instanceof SchedTaskTO) {
             logic.updateSchedTask((SchedTaskTO) taskTO);
+            return Response.noContent().build();
         } else {
             throw new BadRequestException();
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 c76986e..f6a800f 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
@@ -89,7 +89,7 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
     }
 
     @Override
-    public void requestPasswordReset(final String username, final String securityAnswer) {
+    public Response requestPasswordReset(final String username, final String securityAnswer) {
         if (!syncopeLogic.isPwdResetAllowed()) {
             SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.DelegatedAdministration);
             sce.getElements().add("Password reset forbidden by configuration");
@@ -97,10 +97,11 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
         }
 
         logic.requestPasswordReset(username, securityAnswer);
+        return Response.noContent().build();
     }
 
     @Override
-    public void confirmPasswordReset(final String token, final String password) {
+    public Response confirmPasswordReset(final String token, final String password) {
         if (!syncopeLogic.isPwdResetAllowed()) {
             SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.DelegatedAdministration);
             sce.getElements().add("Password reset forbidden by configuration");
@@ -108,6 +109,7 @@ public class UserSelfServiceImpl extends AbstractServiceImpl implements UserSelf
         }
 
         logic.confirmPasswordReset(token, password);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/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 90c706a..4af144b 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
@@ -20,6 +20,7 @@ package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.Date;
 import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.AnyOperations;
 import org.apache.syncope.common.lib.patch.StatusPatch;
 import org.apache.syncope.common.lib.patch.UserPatch;
 import org.apache.syncope.common.lib.to.ProvisioningResult;
@@ -65,6 +66,23 @@ public class UserServiceImpl extends AbstractAnyService<UserTO, UserPatch> imple
     }
 
     @Override
+    public Response update(final UserTO userTO) {
+        userTO.setKey(getActualKey(userTO.getKey()));
+        UserTO before = logic.read(userTO.getKey());
+
+        checkETag(before.getETagValue());
+
+        ProvisioningResult<UserTO> updated =
+                logic.update(AnyOperations.diff(userTO, before, false), isNullPriorityAsync());
+        return modificationResponse(updated);
+    }
+
+    @Override
+    public Response update(final UserPatch userPatch) {
+        return doUpdate(userPatch);
+    }
+
+    @Override
     public Response status(final StatusPatch statusPatch) {
         Date etagDate = findLastChange(statusPatch.getKey());
         checkETag(String.valueOf(etagDate.getTime()));

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
index 2321e0a..b67e5bb 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
@@ -66,18 +66,20 @@ public class WorkflowServiceImpl extends AbstractServiceImpl implements Workflow
     }
 
     @Override
-    public void set(final String anyType, final String key, final String definition) {
+    public Response set(final String anyType, final String key, final String definition) {
         WorkflowDefinitionFormat format =
                 messageContext.getHttpHeaders().getMediaType().equals(MediaType.APPLICATION_JSON_TYPE)
                 ? WorkflowDefinitionFormat.JSON
                 : WorkflowDefinitionFormat.XML;
 
         logic.importDefinition(anyType, key, format, definition);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String anyType, final String key) {
+    public Response delete(final String anyType, final String key) {
         logic.delete(anyType, key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 3346c5c..e576b52 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -29,6 +29,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.CamelMetrics;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -64,18 +65,21 @@ public interface CamelRouteService extends JAXRSService {
      * Update the given route.
      *
      * @param route to be updated
+     * @return an empty response if operation was successful
      */
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    void update(@NotNull CamelRouteTO route);
+    Response update(@NotNull CamelRouteTO route);
 
     /**
      * Restart the underlying Apache Camel context.
+     *
+     * @return an empty response if operation was successful
      */
     @POST
     @Path("restartContext")
-    void restartContext();
+    Response restartContext();
 
     /**
      * Provides Camel metrics.

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
index 163847f..a7f6fbd 100644
--- a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
+++ b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.to.CamelMetrics;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -44,13 +45,15 @@ public class CamelRouteServiceImpl extends AbstractServiceImpl implements CamelR
     }
 
     @Override
-    public void update(final CamelRouteTO route) {
+    public Response update(final CamelRouteTO route) {
         logic.update(route);
+        return Response.noContent().build();
     }
 
     @Override
-    public void restartContext() {
+    public Response restartContext() {
         logic.restartContext();
+        return Response.noContent().build();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
index 0d528c3..e273676 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
@@ -84,18 +84,20 @@ public interface SAML2IdPService extends JAXRSService {
      * Updates the SAML 2.0 Identity Provider with matching entityID.
      *
      * @param saml2IdpTO idp configuration to be stored
+     * @return an empty response if operation was successful
      */
     @PUT
     @Path("{key}")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    void update(@NotNull SAML2IdPTO saml2IdpTO);
+    Response update(@NotNull SAML2IdPTO saml2IdpTO);
 
     /**
      * Deletes the SAML 2.0 Identity Provider with matching entityID.
      *
      * @param key SAML 2.0 Identity Provider's entityID
+     * @return an empty response if operation was successful
      */
     @DELETE
     @Path("{key}")
-    void delete(@PathParam("key") String key);
+    Response delete(@PathParam("key") String key);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
index f3d420c..ed964d6 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
@@ -88,10 +88,11 @@ public interface SAML2SPService extends JAXRSService {
      * Validates the received SAML 2.0 logout response.
      *
      * @param response SAML response and relay state
+     * @return an empty response if operation was successful
      */
     @POST
     @Path("logoutResponse")
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    void validateLogoutResponse(SAML2ReceivedResponseTO response);
+    Response validateLogoutResponse(SAML2ReceivedResponseTO response);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
index ebda30d..bd2f5f9 100644
--- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
+++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2IdPServiceImpl.java
@@ -61,13 +61,15 @@ public class SAML2IdPServiceImpl extends AbstractServiceImpl implements SAML2IdP
     }
 
     @Override
-    public void update(final SAML2IdPTO saml2IdpTO) {
+    public Response update(final SAML2IdPTO saml2IdpTO) {
         logic.update(saml2IdpTO);
+        return Response.noContent().build();
     }
 
     @Override
-    public void delete(final String key) {
+    public Response delete(final String key) {
         logic.delete(key);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
index 4ec2074..93cd87b 100644
--- a/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
+++ b/ext/saml2sp/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
@@ -66,8 +66,9 @@ public class SAML2SPServiceImpl extends AbstractServiceImpl implements SAML2SPSe
     }
 
     @Override
-    public void validateLogoutResponse(final SAML2ReceivedResponseTO response) {
+    public Response validateLogoutResponse(final SAML2ReceivedResponseTO response) {
         logic.validateLogoutResponse(getJWTToken(), response);
+        return Response.noContent().build();
     }
 
     private String getJWTToken() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
index fdc4da3..1efad9a 100644
--- a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
+++ b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
@@ -25,6 +25,7 @@ import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.scim.SCIMConf;
 
 /**
@@ -46,8 +47,9 @@ public interface SCIMConfService extends JAXRSService {
      * Sets SCIM configuration.
      *
      * @param conf SCIM configuration
+     * @return Response.noContent().build();
      */
     @PUT
     @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    void set(@NotNull SCIMConf conf);
+    Response set(@NotNull SCIMConf conf);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
index 223aca7..1d14701 100644
--- a/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
+++ b/ext/scimv2/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SCIMConfServiceImpl.java
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.core.rest.cxf.service;
 
+import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.scim.SCIMConf;
 import org.apache.syncope.common.rest.api.service.SCIMConfService;
 import org.apache.syncope.core.logic.scim.SCIMConfManager;
@@ -34,8 +35,9 @@ public class SCIMConfServiceImpl extends AbstractServiceImpl implements SCIMConf
     }
 
     @Override
-    public void set(final SCIMConf conf) {
+    public Response set(final SCIMConf conf) {
         manager.set(conf);
+        return Response.noContent().build();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/UserServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/UserServiceImpl.java b/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/UserServiceImpl.java
index 2c73f44..4ecc966 100644
--- a/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/UserServiceImpl.java
+++ b/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/UserServiceImpl.java
@@ -40,7 +40,7 @@ public class UserServiceImpl extends AbstractService<SCIMUser> implements UserSe
 
     @Override
     public Response create(final SCIMUser user) {
-        ProvisioningResult<UserTO> result = userLogic().create(binder().toUserTO(user), false);
+        ProvisioningResult<UserTO> result = userLogic().create(binder().toUserTO(user), true, false);
         return createResponse(
                 result.getEntity().getKey(),
                 binder().toSCIMUser(

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
index 58dca0d..6951a60 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
@@ -249,7 +249,7 @@ public class AuthenticationITCase extends AbstractITCase {
             // 4. as delegated, create user under realm / -> fail
             UserTO user = UserITCase.getUniqueSampleTO("delegated@syncope.apache.org");
             try {
-                delegatedUserService.create(user);
+                delegatedUserService.create(user, true);
                 fail("This should not happen");
             } catch (SyncopeClientException e) {
                 assertEquals(ClientExceptionType.DelegatedAdministration, e.getType());
@@ -258,7 +258,7 @@ public class AuthenticationITCase extends AbstractITCase {
             // 5. set realm to /even/two -> succeed
             user.setRealm("/even/two");
 
-            Response response = delegatedUserService.create(user);
+            Response response = delegatedUserService.create(user, true);
             assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
 
             user = response.readEntity(new GenericType<ProvisioningResult<UserTO>>() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
index f98d468..db176df 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
@@ -120,7 +120,7 @@ public class MultitenancyITCase extends AbstractITCase {
         user.setUsername(getUUIDString());
         user.setPassword("password");
 
-        Response response = adminClient.getService(UserService.class).create(user);
+        Response response = adminClient.getService(UserService.class).create(user, true);
         assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
 
         user = response.readEntity(new GenericType<ProvisioningResult<UserTO>>() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SCIMITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SCIMITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SCIMITCase.java
index 290f888..deacadc 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SCIMITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SCIMITCase.java
@@ -313,9 +313,9 @@ public class SCIMITCase extends AbstractITCase {
         assertEquals("additional", additional.getDisplayName());
 
         // gt
-        UserTO newUser = userService.create(UserITCase.getUniqueSampleTO("scimsearch@syncope.apache.org")).readEntity(
-                new GenericType<ProvisioningResult<UserTO>>() {
-        }).getEntity();
+        UserTO newUser = userService.create(UserITCase.getUniqueSampleTO("scimsearch@syncope.apache.org"), true).
+                readEntity(new GenericType<ProvisioningResult<UserTO>>() {
+                }).getEntity();
 
         Date value = new Date(newUser.getCreationDate().getTime() - 1000);
         response = webClient().path("Users").query("filter", "meta.created gt \""

http://git-wip-us.apache.org/repos/asf/syncope/blob/75ee922a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
index 6c33ee7..83d41c1 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
@@ -882,7 +882,7 @@ public class UserITCase extends AbstractITCase {
         user.getResources().add(RESOURCE_NAME_TESTDB2);
         user.getResources().add(RESOURCE_NAME_LDAP);
 
-        ProvisioningResult<UserTO> result = asyncService.create(user).readEntity(
+        ProvisioningResult<UserTO> result = asyncService.create(user, true).readEntity(
                 new GenericType<ProvisioningResult<UserTO>>() {
         });
         assertNotNull(result);
@@ -1289,7 +1289,7 @@ public class UserITCase extends AbstractITCase {
         userTO.getResources().add("rest-target-resource");
 
         // 1. create
-        ProvisioningResult<UserTO> result = userService.create(userTO).readEntity(
+        ProvisioningResult<UserTO> result = userService.create(userTO, true).readEntity(
                 new GenericType<ProvisioningResult<UserTO>>() {
         });
         assertEquals(1, result.getPropagationStatuses().size());


Mime
View raw message