syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject syncope git commit: Follow-up CXF-6688
Date Mon, 23 Nov 2015 08:58:24 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 986f2085d -> bf2dcae39


Follow-up CXF-6688


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

Branch: refs/heads/master
Commit: bf2dcae39cedec28ba2551834339ae96429a33c6
Parents: 986f208
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Nov 20 17:01:13 2015 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Nov 20 17:01:13 2015 +0100

----------------------------------------------------------------------
 .../schema/SchemaSyncopeOperations.java         |  8 ++---
 .../commands/task/TaskSyncopeOperations.java    |  2 +-
 .../client/console/rest/SchemaRestClient.java   |  4 +--
 .../client/console/rest/TaskRestClient.java     |  4 +--
 .../enduser/resources/SchemaResource.java       | 13 ++++---
 .../syncope/common/lib/types/TaskType.java      | 32 +++--------------
 .../common/rest/api/beans/SchemaQuery.java      | 21 +++++++++++
 .../common/rest/api/beans/TaskQuery.java        | 26 ++++++++++++++
 .../common/rest/api/service/SchemaService.java  |  7 ++--
 .../common/rest/api/service/TaskService.java    |  8 ++---
 .../rest/cxf/service/SchemaServiceImpl.java     |  4 +--
 .../core/rest/cxf/service/TaskServiceImpl.java  |  7 ++--
 .../fit/core/reference/AbstractTaskITCase.java  |  2 +-
 .../fit/core/reference/DerSchemaITCase.java     |  2 +-
 .../fit/core/reference/MultitenancyITCase.java  |  2 +-
 .../fit/core/reference/PlainSchemaITCase.java   |  4 +--
 .../core/reference/PropagationTaskITCase.java   | 15 ++++----
 .../fit/core/reference/PushTaskITCase.java      |  2 +-
 .../fit/core/reference/SchedTaskITCase.java     |  2 +-
 .../fit/core/reference/SyncTaskITCase.java      |  3 +-
 .../syncope/fit/core/reference/UserITCase.java  | 37 +++++++-------------
 .../fit/core/reference/VirSchemaITCase.java     |  6 ++--
 pom.xml                                         |  2 +-
 23 files changed, 108 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
index 73c483d..92f9bf3 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
@@ -34,19 +34,19 @@ public class SchemaSyncopeOperations {
     }
 
     public <T extends AbstractSchemaTO> List<T> list(final String schemaTypeString)
{
-        return schemaService.list(SchemaType.valueOf(schemaTypeString), new SchemaQuery.Builder().build());
+        return schemaService.list(new SchemaQuery.Builder().type(SchemaType.valueOf(schemaTypeString)).build());
     }
 
     public <T extends AbstractSchemaTO> List<T> listPlain() {
-        return schemaService.list(SchemaType.PLAIN, new SchemaQuery.Builder().build());
+        return schemaService.list(new SchemaQuery.Builder().type(SchemaType.PLAIN).build());
     }
 
     public <T extends AbstractSchemaTO> List<T> listDerived() {
-        return schemaService.list(SchemaType.DERIVED, new SchemaQuery.Builder().build());
+        return schemaService.list(new SchemaQuery.Builder().type(SchemaType.DERIVED).build());
     }
 
     public <T extends AbstractSchemaTO> List<T> listVirtual() {
-        return schemaService.list(SchemaType.VIRTUAL, new SchemaQuery.Builder().build());
+        return schemaService.list(new SchemaQuery.Builder().type(SchemaType.VIRTUAL).build());
     }
 
     public void delete(final String schemaTypeString, final String schemaName) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
index cecb2b8..8937e71 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
@@ -48,7 +48,7 @@ public class TaskSyncopeOperations {
     }
 
     public List<AbstractTaskTO> list(final String type) {
-        return taskService.list(TaskType.valueOf(type), new TaskQuery()).getResult();
+        return taskService.list(new TaskQuery.Builder().type(TaskType.valueOf(type)).build()).getResult();
     }
 
     public TaskExecTO readExecution(final String executionId) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
index 517aaa4..10c2fa2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
@@ -64,10 +64,10 @@ public class SchemaRestClient extends BaseRestClient {
         try {
             if (kind == null || kind.length == 0) {
                 schemas.addAll(getService(SchemaService.class).
-                        <T>list(schemaType, new SchemaQuery.Builder().build()));
+                        <T>list(new SchemaQuery.Builder().type(schemaType).build()));
             } else {
                 schemas.addAll(getService(SchemaService.class).
-                        <T>list(schemaType, new SchemaQuery.Builder().anyTypeClasses(kind).build()));
+                        <T>list(new SchemaQuery.Builder().type(schemaType).anyTypeClasses(kind).build()));
             }
         } catch (SyncopeClientException e) {
             LOG.error("While getting all {} schemas for {}", schemaType, kind, e);

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
index 175633f..6781390 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
@@ -63,7 +63,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
      */
     public int count(final String kind) {
         return getService(TaskService.class).
-                list(TaskType.fromString(kind), new TaskQuery.Builder().page(1).size(1).build()).
+                list(new TaskQuery.Builder().type(TaskType.valueOf(kind)).page(1).size(1).build()).
                 getTotalCount();
     }
 
@@ -72,7 +72,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
             final Class<T> reference, final int page, final int size, final SortParam<String>
sort) {
 
         return (List<T>) getService(TaskService.class).
-                list(getTaskType(reference), new TaskQuery.Builder().page(page).size(size).
+                list(new TaskQuery.Builder().type(getTaskType(reference)).page(page).size(size).
                         orderBy(toOrderBy(sort)).build()).
                 getResult();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/SchemaResource.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/SchemaResource.java
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/SchemaResource.java
index 3cf3fc0..db6a7e4 100644
--- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/SchemaResource.java
+++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/SchemaResource.java
@@ -31,7 +31,6 @@ import org.apache.syncope.common.lib.to.VirSchemaTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.apache.syncope.common.rest.api.beans.SchemaQuery;
-import org.apache.syncope.common.rest.api.service.AnyTypeClassService;
 import org.apache.syncope.common.rest.api.service.AnyTypeService;
 import org.apache.syncope.common.rest.api.service.SchemaService;
 import org.apache.syncope.core.misc.serialization.POJOHelper;
@@ -48,13 +47,10 @@ public class SchemaResource extends AbstractBaseResource {
 
     private final AnyTypeService anyTypeService;
 
-    private final AnyTypeClassService anyTypeClassService;
-
     private final SchemaService schemaService;
 
     public SchemaResource() {
         anyTypeService = SyncopeEnduserSession.get().getService(AnyTypeService.class);
-        anyTypeClassService = SyncopeEnduserSession.get().getService(AnyTypeClassService.class);
         schemaService = SyncopeEnduserSession.get().getService(SchemaService.class);
     }
 
@@ -71,11 +67,14 @@ public class SchemaResource extends AbstractBaseResource {
             final AnyTypeTO anyTypeUserTO = anyTypeService.read(AnyTypeKind.USER.name());
 
             final List<PlainSchemaTO> plainSchemas = schemaService.list(
-                    SchemaType.PLAIN, new SchemaQuery.Builder().anyTypeClasses(anyTypeUserTO.getClasses()).build());
+                    new SchemaQuery.Builder().type(SchemaType.PLAIN).
+                    anyTypeClasses(anyTypeUserTO.getClasses()).build());
             final List<DerSchemaTO> derSchemas = schemaService.list(
-                    SchemaType.DERIVED, new SchemaQuery.Builder().anyTypeClasses(anyTypeUserTO.getClasses()).build());
+                    new SchemaQuery.Builder().type(SchemaType.DERIVED).
+                    anyTypeClasses(anyTypeUserTO.getClasses()).build());
             final List<VirSchemaTO> virSchemas = schemaService.list(
-                    SchemaType.VIRTUAL, new SchemaQuery.Builder().anyTypeClasses(anyTypeUserTO.getClasses()).build());
+                    new SchemaQuery.Builder().type(SchemaType.VIRTUAL).
+                    anyTypeClasses(anyTypeUserTO.getClasses()).build());
 
             response.setWriteCallback(new AbstractResource.WriteCallback() {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
index ce1b5cd..d17ecc7 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
@@ -23,32 +23,10 @@ import javax.xml.bind.annotation.XmlEnum;
 @XmlEnum
 public enum TaskType {
 
-    PROPAGATION("propagation"),
-    NOTIFICATION("notification"),
-    SCHEDULED("sched"),
-    SYNCHRONIZATION("sync"),
-    PUSH("push");
+    PROPAGATION,
+    NOTIFICATION,
+    SCHEDULED,
+    SYNCHRONIZATION,
+    PUSH;
 
-    private final String name;
-
-    TaskType(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String toString() {
-        return name;
-    }
-
-    public static TaskType fromString(final String name) {
-        if (name != null) {
-            for (TaskType t : TaskType.values()) {
-                if (t.name.equalsIgnoreCase(name)) {
-                    return t;
-                }
-            }
-        }
-
-        return null;
-    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/SchemaQuery.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/SchemaQuery.java
b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/SchemaQuery.java
index a96b09f..8893c9c 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/SchemaQuery.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/SchemaQuery.java
@@ -22,8 +22,10 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
+import javax.ws.rs.PathParam;
 import javax.ws.rs.QueryParam;
 import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.SchemaType;
 
 public class SchemaQuery extends AbstractBaseBean {
 
@@ -33,6 +35,11 @@ public class SchemaQuery extends AbstractBaseBean {
 
         private final SchemaQuery instance = new SchemaQuery();
 
+        public Builder type(final SchemaType type) {
+            instance.setType(type);
+            return this;
+        }
+
         public Builder anyTypeClass(final String anyTypeClass) {
             if (instance.getAnyTypeClasses() == null) {
                 instance.setAnyTypeClasses(new ArrayList<String>());
@@ -54,12 +61,26 @@ public class SchemaQuery extends AbstractBaseBean {
         }
 
         public SchemaQuery build() {
+            if (instance.type == null) {
+                throw new IllegalArgumentException("type is required");
+            }
             return instance;
         }
     }
 
+    private SchemaType type;
+
     private List<String> anyTypeClasses;
 
+    public SchemaType getType() {
+        return type;
+    }
+
+    @PathParam("type")
+    public void setType(final SchemaType type) {
+        this.type = type;
+    }
+
     public List<String> getAnyTypeClasses() {
         return anyTypeClasses;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
index 8fe942f..523da53 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/TaskQuery.java
@@ -19,8 +19,10 @@
 package org.apache.syncope.common.rest.api.beans;
 
 import javax.validation.constraints.Min;
+import javax.ws.rs.MatrixParam;
 import javax.ws.rs.QueryParam;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
+import org.apache.syncope.common.lib.types.TaskType;
 import org.apache.syncope.common.rest.api.service.JAXRSService;
 
 public class TaskQuery extends AbstractQuery {
@@ -34,6 +36,11 @@ public class TaskQuery extends AbstractQuery {
             return new TaskQuery();
         }
 
+        public Builder type(final TaskType type) {
+            getInstance().setType(type);
+            return this;
+        }
+
         public Builder resource(final String resource) {
             getInstance().setResource(resource);
             return this;
@@ -49,14 +56,33 @@ public class TaskQuery extends AbstractQuery {
             return this;
         }
 
+        @Override
+        public TaskQuery build() {
+            if (getInstance().type == null) {
+                throw new IllegalArgumentException("type is required");
+            }
+            return super.build();
+        }
+
     }
 
+    private TaskType type;
+
     private String resource;
 
     private AnyTypeKind anyTypeKind;
 
     private Long anyTypeKey;
 
+    public TaskType getType() {
+        return type;
+    }
+
+    @MatrixParam("type")
+    public void setType(final TaskType type) {
+        this.type = type;
+    }
+
     public String getResource() {
         return resource;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index 9049f92..bdb11ee 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -56,18 +56,15 @@ public interface SchemaService extends JAXRSService {
             @NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String
key);
 
     /**
-     * Returns a list of schemas matching type and the given query.
+     * Returns a list of schemas matching the given query.
      *
      * @param <T> actual SchemaTO
-     * @param type type for schemas to be listed
      * @param query query conditions
      * @return list of schemas with matching type, for the given anyTypeClass if provided
      */
     @GET
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractSchemaTO> List<T> list(
-            @NotNull @PathParam("type") SchemaType type,
-            @BeanParam SchemaQuery query);
+    <T extends AbstractSchemaTO> List<T> list(@BeanParam SchemaQuery query);
 
     /**
      * Creates a new schema.

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
index 2029a53..5aacaae 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -42,7 +42,6 @@ import org.apache.syncope.common.lib.to.SchedTaskTO;
 import org.apache.syncope.common.lib.to.TaskExecTO;
 import org.apache.syncope.common.lib.types.JobAction;
 import org.apache.syncope.common.lib.types.JobStatusType;
-import org.apache.syncope.common.lib.types.TaskType;
 import org.apache.syncope.common.rest.api.beans.TaskQuery;
 
 /**
@@ -75,18 +74,15 @@ public interface TaskService extends JAXRSService {
     TaskExecTO readExecution(@NotNull @PathParam("executionKey") Long executionKey);
 
     /**
-     * Returns a paged list of existing tasks matching type and the given query.
+     * Returns a paged list of existing tasks matching the given query.
      *
-     * @param type type of tasks to be listed
      * @param query query conditions
      * @param <T> type of taskTO
      * @return paged list of existing tasks matching type and the given query
      */
     @GET
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractTaskTO> PagedResult<T> list(
-            @NotNull @MatrixParam("type") TaskType type,
-            @BeanParam TaskQuery query);
+    <T extends AbstractTaskTO> PagedResult<T> list(@BeanParam TaskQuery query);
 
     /**
      * Creates a new task.

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/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 fc98926..810c520 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
@@ -52,8 +52,8 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
     }
 
     @Override
-    public <T extends AbstractSchemaTO> List<T> list(final SchemaType schemaType,
final SchemaQuery query) {
-        return logic.list(schemaType, query.getAnyTypeClasses());
+    public <T extends AbstractSchemaTO> List<T> list(final SchemaQuery query)
{
+        return logic.list(query.getType(), query.getAnyTypeClasses());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/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 2f9de23..17bceb8 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
@@ -32,7 +32,6 @@ import org.apache.syncope.common.lib.to.SyncTaskTO;
 import org.apache.syncope.common.lib.to.TaskExecTO;
 import org.apache.syncope.common.lib.types.JobAction;
 import org.apache.syncope.common.lib.types.JobStatusType;
-import org.apache.syncope.common.lib.types.TaskType;
 import org.apache.syncope.common.rest.api.RESTHeaders;
 import org.apache.syncope.common.rest.api.beans.TaskQuery;
 import org.apache.syncope.common.rest.api.service.TaskService;
@@ -78,10 +77,10 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
 
     @SuppressWarnings("unchecked")
     @Override
-    public <T extends AbstractTaskTO> PagedResult<T> list(final TaskType type,
final TaskQuery query) {
+    public <T extends AbstractTaskTO> PagedResult<T> list(final TaskQuery query)
{
         return (PagedResult<T>) buildPagedResult(
                 logic.list(
-                        type,
+                        query.getType(),
                         query.getResource(),
                         query.getAnyTypeKind(),
                         query.getAnyTypeKey(),
@@ -91,7 +90,7 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
                 query.getPage(),
                 query.getSize(),
                 logic.count(
-                        type,
+                        query.getType(),
                         query.getResource(),
                         query.getAnyTypeKind(),
                         query.getAnyTypeKey()));

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
index 2d98fd8..41f287a 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
@@ -166,7 +166,7 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
 
     protected NotificationTaskTO findNotificationTaskBySender(final String sender) {
         PagedResult<NotificationTaskTO> tasks =
-                taskService.list(TaskType.NOTIFICATION, new TaskQuery.Builder().build());
+                taskService.list(new TaskQuery.Builder().type(TaskType.NOTIFICATION).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
index 766ed0a..6221f45 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
@@ -41,7 +41,7 @@ public class DerSchemaITCase extends AbstractITCase {
 
     @Test
     public void list() {
-        List<DerSchemaTO> derSchemas = schemaService.list(SchemaType.DERIVED, new SchemaQuery.Builder().build());
+        List<DerSchemaTO> derSchemas = schemaService.list(new SchemaQuery.Builder().type(SchemaType.DERIVED).build());
         assertFalse(derSchemas.isEmpty());
         for (DerSchemaTO derivedSchemaTO : derSchemas) {
             assertNotNull(derivedSchemaTO);

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
index d675692..8d456ff 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
@@ -104,7 +104,7 @@ public class MultitenancyITCase extends AbstractITCase {
     @Test
     public void readPlainSchemas() {
         assertEquals(17, adminClient.getService(SchemaService.class).
-                list(SchemaType.PLAIN, new SchemaQuery.Builder().build()).size());
+                list(new SchemaQuery.Builder().type(SchemaType.PLAIN).build()).size());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
index 7f46848..6a697b9 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
@@ -158,7 +158,7 @@ public class PlainSchemaITCase extends AbstractITCase {
 
     @Test
     public void list() {
-        List<PlainSchemaTO> schemas = schemaService.list(SchemaType.PLAIN, new SchemaQuery.Builder().build());
+        List<PlainSchemaTO> schemas = schemaService.list(new SchemaQuery.Builder().type(SchemaType.PLAIN).build());
         assertFalse(schemas.isEmpty());
         for (PlainSchemaTO schemaTO : schemas) {
             assertNotNull(schemaTO);
@@ -170,7 +170,7 @@ public class PlainSchemaITCase extends AbstractITCase {
         final String clazz = anyTypeService.read(AnyTypeKind.USER.name()).getClasses().get(0);
 
         List<PlainSchemaTO> userSchemas = schemaService.list(
-                SchemaType.PLAIN, new SchemaQuery.Builder().anyTypeClass(clazz).build());
+                new SchemaQuery.Builder().type(SchemaType.PLAIN).anyTypeClass(clazz).build());
 
         assertTrue(CollectionUtils.exists(userSchemas, new Predicate<PlainSchemaTO>()
{
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PropagationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PropagationTaskITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PropagationTaskITCase.java
index ec0f275..5b65496 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PropagationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PropagationTaskITCase.java
@@ -43,8 +43,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
     @Test
     public void paginatedList() {
         PagedResult<PropagationTaskTO> tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(2).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(2).build());
         assertNotNull(tasks);
         assertEquals(2, tasks.getResult().size());
 
@@ -53,8 +52,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
         }
 
         tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(2).size(2).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(2).size(2).build());
         assertNotNull(tasks);
         assertEquals(2, tasks.getPage());
         assertEquals(2, tasks.getResult().size());
@@ -64,8 +62,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
         }
 
         tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1000).size(2).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1000).size(2).build());
         assertNotNull(tasks);
         assertTrue(tasks.getResult().isEmpty());
     }
@@ -87,7 +84,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
     @Test
     public void bulkAction() {
         PagedResult<PropagationTaskTO> before = taskService.list(
-                TaskType.PROPAGATION, new TaskQuery.Builder().build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).build());
 
         // create user with testdb resource
         UserTO userTO = UserITCase.getUniqueSampleTO("taskBulk@apache.org");
@@ -95,7 +92,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
         createUser(userTO);
 
         List<PropagationTaskTO> after = new ArrayList<>(
-                taskService.<PropagationTaskTO>list(TaskType.PROPAGATION, new TaskQuery.Builder().build()).
+                taskService.<PropagationTaskTO>list(new TaskQuery.Builder().type(TaskType.PROPAGATION).build()).
                 getResult());
         after.removeAll(before.getResult());
         assertFalse(after.isEmpty());
@@ -109,7 +106,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
 
         taskService.bulk(bulkAction);
 
-        assertFalse(taskService.list(TaskType.PROPAGATION, new TaskQuery.Builder().build()).getResult().
+        assertFalse(taskService.list(new TaskQuery.Builder().type(TaskType.PROPAGATION).build()).getResult().
                 containsAll(after));
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PushTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PushTaskITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PushTaskITCase.java
index 3a907b2..1371d69 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PushTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PushTaskITCase.java
@@ -80,7 +80,7 @@ public class PushTaskITCase extends AbstractTaskITCase {
 
     @Test
     public void list() {
-        PagedResult<PushTaskTO> tasks = taskService.list(TaskType.PUSH, new TaskQuery.Builder().build());
+        PagedResult<PushTaskTO> tasks = taskService.list(new TaskQuery.Builder().type(TaskType.PUSH).build());
         assertFalse(tasks.getResult().isEmpty());
         for (AbstractTaskTO task : tasks.getResult()) {
             if (!(task instanceof PushTaskTO)) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SchedTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SchedTaskITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SchedTaskITCase.java
index a8f4d23..884ff9a 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SchedTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SchedTaskITCase.java
@@ -56,7 +56,7 @@ public class SchedTaskITCase extends AbstractTaskITCase {
     @Test
     public void list() {
         PagedResult<SchedTaskTO> tasks =
-                taskService.list(TaskType.SCHEDULED, new TaskQuery.Builder().build());
+                taskService.list(new TaskQuery.Builder().type(TaskType.SCHEDULED).build());
         assertFalse(tasks.getResult().isEmpty());
         for (AbstractTaskTO task : tasks.getResult()) {
             if (!(task instanceof SchedTaskTO) || task instanceof SyncTaskTO || task instanceof
PushTaskTO) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
index e94001f..75631e7 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
@@ -97,7 +97,8 @@ public class SyncTaskITCase extends AbstractTaskITCase {
 
     @Test
     public void list() {
-        PagedResult<SyncTaskTO> tasks = taskService.list(TaskType.SYNCHRONIZATION,
new TaskQuery.Builder().build());
+        PagedResult<SyncTaskTO> tasks = taskService.list(
+                new TaskQuery.Builder().type(TaskType.SYNCHRONIZATION).build());
         assertFalse(tasks.getResult().isEmpty());
         for (AbstractTaskTO task : tasks.getResult()) {
             if (!(task instanceof SyncTaskTO)) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
index e8ccf7d..54589c6 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
@@ -150,8 +150,7 @@ public class UserITCase extends AbstractITCase {
     public void createUserWithNoPropagation() {
         // get task list
         PagedResult<PropagationTaskTO> tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -166,8 +165,7 @@ public class UserITCase extends AbstractITCase {
 
         // get the new task list
         tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -356,8 +354,7 @@ public class UserITCase extends AbstractITCase {
     public void create() {
         // get task list
         PagedResult<PropagationTaskTO> tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -397,9 +394,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(newUserTO.getCreationDate());
 
         // get the new task list
-        tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+        tasks = taskService.list(new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -693,8 +688,8 @@ public class UserITCase extends AbstractITCase {
 
     @Test
     public void updatePasswordOnly() {
-        int beforeTasks = taskService.list(TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build()).getTotalCount();
+        int beforeTasks = taskService.list(
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build()).getTotalCount();
         assertFalse(beforeTasks <= 0);
 
         UserTO userTO = getUniqueSampleTO("pwdonly@t.com");
@@ -711,8 +706,8 @@ public class UserITCase extends AbstractITCase {
         // check for changePwdDate
         assertNotNull(userTO.getChangePwdDate());
 
-        int afterTasks = taskService.list(TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build()).getTotalCount();
+        int afterTasks = taskService.list(
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build()).getTotalCount();
         assertFalse(beforeTasks <= 0);
 
         assertTrue(beforeTasks < afterTasks);
@@ -723,8 +718,7 @@ public class UserITCase extends AbstractITCase {
     public void verifyTaskRegistration() {
         // get task list
         PagedResult<PropagationTaskTO> tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+                new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -743,9 +737,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(userTO);
 
         // get the new task list
-        tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+        tasks = taskService.list(new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -769,9 +761,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(userTO);
 
         // get the new task list
-        tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+        tasks = taskService.list(new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
 
         maxKey = newMaxKey;
         newMaxKey = tasks.getResult().iterator().next().getKey();
@@ -791,9 +781,7 @@ public class UserITCase extends AbstractITCase {
         userService.delete(userTO.getKey());
 
         // get the new task list
-        tasks = taskService.list(
-                TaskType.PROPAGATION,
-                new TaskQuery.Builder().page(1).size(1).build());
+        tasks = taskService.list(new TaskQuery.Builder().type(TaskType.PROPAGATION).page(1).size(1).build());
 
         maxKey = newMaxKey;
         newMaxKey = tasks.getResult().iterator().next().getKey();
@@ -1529,6 +1517,7 @@ public class UserITCase extends AbstractITCase {
             ProvisioningResult<UserTO> result = updateUser(userPatch);
             assertNotNull(result);
             userTO = result.getAny();
+            assertNotNull(userTO);
 
             // 5. verify that propagation was successful
             List<PropagationStatus> props = result.getPropagationStatuses();

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
index f19f9dd..f251525 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
@@ -45,7 +45,7 @@ public class VirSchemaITCase extends AbstractITCase {
 
     @Test
     public void list() {
-        List<VirSchemaTO> vSchemas = schemaService.list(SchemaType.VIRTUAL, new SchemaQuery.Builder().build());
+        List<VirSchemaTO> vSchemas = schemaService.list(new SchemaQuery.Builder().type(SchemaType.VIRTUAL).build());
         assertFalse(vSchemas.isEmpty());
         for (VirSchemaTO vSchemaTO : vSchemas) {
             assertNotNull(vSchemaTO);
@@ -95,14 +95,14 @@ public class VirSchemaITCase extends AbstractITCase {
     public void anonymous() {
         SchemaService unauthenticated = clientFactory.create().getService(SchemaService.class);
         try {
-            unauthenticated.list(SchemaType.VIRTUAL, new SchemaQuery.Builder().build());
+            unauthenticated.list(new SchemaQuery.Builder().type(SchemaType.VIRTUAL).build());
             fail();
         } catch (AccessControlException e) {
             assertNotNull(e);
         }
 
         SchemaService anonymous = clientFactory.create(ANONYMOUS_UNAME, ANONYMOUS_KEY).getService(SchemaService.class);
-        assertFalse(anonymous.list(SchemaType.VIRTUAL, new SchemaQuery.Builder().build()).isEmpty());
+        assertFalse(anonymous.list(new SchemaQuery.Builder().type(SchemaType.VIRTUAL).build()).isEmpty());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/syncope/blob/bf2dcae3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 23dfb6e..2c76468 100644
--- a/pom.xml
+++ b/pom.xml
@@ -326,7 +326,7 @@ under the License.
     <connid.ldap.version>1.5.0-SNAPSHOT</connid.ldap.version>
     <connid.ad.version>1.3.0-SNAPSHOT</connid.ad.version>
 
-    <cxf.version>3.1.4</cxf.version>
+    <cxf.version>3.1.5-SNAPSHOT</cxf.version>
 
     <camel.version>2.16.0</camel.version>	
 


Mime
View raw message