syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/2] syncope git commit: [SYNCOPE-696] Implementation provided, some clean up
Date Thu, 24 Sep 2015 11:48:10 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 271052a88 -> c14a20d74


http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AbstractPropagationTaskExecutor.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AbstractPropagationTaskExecutor.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AbstractPropagationTaskExecutor.java
index e557699..90d3dbc 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AbstractPropagationTaskExecutor.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/AbstractPropagationTaskExecutor.java
@@ -303,7 +303,7 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
                 LOG.debug("Delete {} on {}", beforeObj.getUid(), task.getResource().getKey());
 
                 connector.delete(
-                        task.getPropagationMode(),
+                        task.getMode(),
                         beforeObj.getObjectClass(),
                         beforeObj.getUid(),
                         null,
@@ -346,7 +346,7 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
                 action.before(task, beforeObj);
             }
 
-            switch (task.getPropagationOperation()) {
+            switch (task.getOperation()) {
                 case CREATE:
                 case UPDATE:
                     createOrUpdate(task, beforeObj, connector, propagationAttempted);
@@ -359,7 +359,7 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
                 default:
             }
 
-            execution.setStatus(task.getPropagationMode() == PropagationMode.ONE_PHASE
+            execution.setStatus(task.getMode() == PropagationMode.ONE_PHASE
                     ? PropagationTaskExecStatus.SUCCESS.name()
                     : PropagationTaskExecStatus.SUBMITTED.name());
 
@@ -390,14 +390,14 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
             }
 
             try {
-                execution.setStatus(task.getPropagationMode() == PropagationMode.ONE_PHASE
+                execution.setStatus(task.getMode() == PropagationMode.ONE_PHASE
                         ? PropagationTaskExecStatus.FAILURE.name()
                         : PropagationTaskExecStatus.UNSUBMITTED.name());
             } catch (Exception wft) {
                 LOG.error("While executing KO action on {}", execution, wft);
             }
 
-            propagationAttempted.add(task.getPropagationOperation().name().toLowerCase());
+            propagationAttempted.add(task.getOperation().name().toLowerCase());
 
             for (PropagationActions action : actions) {
                 action.onError(task, execution, e);
@@ -449,7 +449,7 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
                 AuditElements.EventCategoryType.PROPAGATION,
                 task.getAnyTypeKind().name().toLowerCase(),
                 task.getResource().getKey(),
-                task.getPropagationOperation().name().toLowerCase(),
+                task.getOperation().name().toLowerCase(),
                 result,
                 beforeObj, // searching for before object is too much expensive ... 
                 new Object[] { execution, afterObj },
@@ -459,7 +459,7 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
                 AuditElements.EventCategoryType.PROPAGATION,
                 task.getAnyTypeKind().name().toLowerCase(),
                 task.getResource().getKey(),
-                task.getPropagationOperation().name().toLowerCase(),
+                task.getOperation().name().toLowerCase(),
                 result,
                 beforeObj, // searching for before object is too much expensive ... 
                 new Object[] { execution, afterObj },
@@ -488,7 +488,7 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
 
         final boolean failed = !PropagationTaskExecStatus.valueOf(execution.getStatus()).isSuccessful();
 
-        switch (task.getPropagationOperation()) {
+        switch (task.getOperation()) {
 
             case CREATE:
                 result = (failed && task.getResource().getCreateTraceLevel().ordinal()
>= TraceLevel.FAILURES.ordinal())
@@ -530,8 +530,8 @@ public abstract class AbstractPropagationTaskExecutor implements PropagationTask
 
         ConnectorObject obj = null;
         try {
-            obj = connector.getObject(task.getPropagationMode(),
-                    task.getPropagationOperation(),
+            obj = connector.getObject(task.getMode(),
+                    task.getOperation(),
                     new ObjectClass(task.getObjectClassName()),
                     new Uid(connObjectKey),
                     connector.getOperationOptions(MappingUtils.getMappingItems(provision,
MappingPurpose.PROPAGATION)));

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java
index dca9084..870be79 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPPasswordPropagationActions.java
@@ -82,7 +82,7 @@ public class LDAPPasswordPropagationActions extends DefaultPropagationActions
{
                     Attribute passwordAttribute = AttributeBuilder.buildPassword(
                             new GuardedString(cipherPlusPassword.toCharArray()));
 
-                    Set<Attribute> attributes = new HashSet<Attribute>(task.getAttributes());
+                    Set<Attribute> attributes = new HashSet<>(task.getAttributes());
                     attributes.add(passwordAttribute);
                     attributes.remove(missing);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PropagationManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PropagationManagerImpl.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PropagationManagerImpl.java
index d656bac..53d55a9 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PropagationManagerImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PropagationManagerImpl.java
@@ -379,8 +379,8 @@ public class PropagationManagerImpl implements PropagationManager {
                     if (!deleteOnResource) {
                         task.setAnyKey(any.getKey());
                     }
-                    task.setPropagationOperation(operation);
-                    task.setPropagationMode(resource.getPropagationMode());
+                    task.setOperation(operation);
+                    task.setMode(resource.getPropagationMode());
                     task.setOldConnObjectKey(propByRes.getOldConnObjectKey(resource.getKey()));
 
                     Pair<String, Set<Attribute>> preparedAttrs = MappingUtils.prepareAttrs(

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 e04053a..642ffe0 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
@@ -25,14 +25,12 @@ import java.util.List;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.StreamingOutput;
-import org.apache.syncope.common.lib.to.PagedResult;
 import org.apache.syncope.common.lib.to.ReportExecTO;
 import org.apache.syncope.common.lib.to.ReportTO;
 import org.apache.syncope.common.lib.types.JobAction;
 import org.apache.syncope.common.lib.types.JobStatusType;
 import org.apache.syncope.common.lib.types.ReportExecExportFormat;
 import org.apache.syncope.common.rest.api.RESTHeaders;
-import org.apache.syncope.common.rest.api.beans.ListQuery;
 import org.apache.syncope.common.rest.api.service.ReportService;
 import org.apache.syncope.core.logic.ReportLogic;
 import org.apache.syncope.core.persistence.api.entity.ReportExec;
@@ -60,15 +58,8 @@ public class ReportServiceImpl extends AbstractServiceImpl implements ReportServ
     }
 
     @Override
-    public PagedResult<ReportTO> list(final ListQuery listQuery) {
-        return buildPagedResult(
-                logic.list(
-                        listQuery.getPage(),
-                        listQuery.getSize(),
-                        getOrderByClauses(listQuery.getOrderBy())),
-                listQuery.getPage(),
-                listQuery.getSize(),
-                logic.count());
+    public List<ReportTO> list() {
+        return logic.list();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 3acf5c8..3744583 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
@@ -36,7 +36,7 @@ import org.apache.syncope.common.lib.types.JobStatusType;
 import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
 import org.apache.syncope.common.lib.types.TaskType;
 import org.apache.syncope.common.rest.api.RESTHeaders;
-import org.apache.syncope.common.rest.api.beans.ListQuery;
+import org.apache.syncope.common.rest.api.beans.TaskQuery;
 import org.apache.syncope.common.rest.api.service.TaskService;
 import org.apache.syncope.core.logic.TaskLogic;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -80,16 +80,23 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
 
     @SuppressWarnings("unchecked")
     @Override
-    public <T extends AbstractTaskTO> PagedResult<T> list(final TaskType taskType,
final ListQuery listQuery) {
+    public <T extends AbstractTaskTO> PagedResult<T> list(final TaskType type,
final TaskQuery query) {
         return (PagedResult<T>) buildPagedResult(
                 logic.list(
-                        taskType,
-                        listQuery.getPage(),
-                        listQuery.getSize(),
-                        getOrderByClauses(listQuery.getOrderBy())),
-                listQuery.getPage(),
-                listQuery.getSize(),
-                logic.count(taskType));
+                        type,
+                        query.getResource(),
+                        query.getAnyTypeKind(),
+                        query.getAnyTypeKey(),
+                        query.getPage(),
+                        query.getSize(),
+                        getOrderByClauses(query.getOrderBy())),
+                query.getPage(),
+                query.getSize(),
+                logic.count(
+                        type,
+                        query.getResource(),
+                        query.getAnyTypeKind(),
+                        query.getAnyTypeKey()));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 fe79eda..c118224 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, SyncopeClient.getListQueryBuilder().build());
+                taskService.list(TaskType.NOTIFICATION, SyncopeClient.getTaskQueryBuilder().build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 56abdb8..3125841 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
@@ -48,7 +48,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
     public void paginatedList() {
         PagedResult<PropagationTaskTO> tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(2).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(2).build());
         assertNotNull(tasks);
         assertEquals(2, tasks.getResult().size());
 
@@ -58,7 +58,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
 
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(2).size(2).build());
+                SyncopeClient.getTaskQueryBuilder().page(2).size(2).build());
         assertNotNull(tasks);
         assertEquals(2, tasks.getPage());
         assertEquals(2, tasks.getResult().size());
@@ -69,7 +69,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
 
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1000).size(2).build());
+                SyncopeClient.getTaskQueryBuilder().page(1000).size(2).build());
         assertNotNull(tasks);
         assertTrue(tasks.getResult().isEmpty());
     }
@@ -127,7 +127,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
     @Test
     public void bulkAction() {
         PagedResult<PropagationTaskTO> before = taskService.list(
-                TaskType.PROPAGATION, SyncopeClient.getListQueryBuilder().build());
+                TaskType.PROPAGATION, SyncopeClient.getTaskQueryBuilder().build());
 
         // create user with testdb resource
         UserTO userTO = UserITCase.getUniqueSampleTO("taskBulk@apache.org");
@@ -135,7 +135,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
         createUser(userTO);
 
         List<PropagationTaskTO> after = new ArrayList<>(
-                taskService.<PropagationTaskTO>list(TaskType.PROPAGATION, SyncopeClient.getListQueryBuilder().build()).
+                taskService.<PropagationTaskTO>list(TaskType.PROPAGATION, SyncopeClient.getTaskQueryBuilder().build()).
                 getResult());
         after.removeAll(before.getResult());
         assertFalse(after.isEmpty());
@@ -149,7 +149,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
 
         taskService.bulk(bulkAction);
 
-        assertFalse(taskService.list(TaskType.PROPAGATION, SyncopeClient.getListQueryBuilder().build()).getResult().
+        assertFalse(taskService.list(TaskType.PROPAGATION, SyncopeClient.getTaskQueryBuilder().build()).getResult().
                 containsAll(after));
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 dff129e..5ddcae4 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
@@ -81,7 +81,7 @@ public class PushTaskITCase extends AbstractTaskITCase {
     @Test
     public void list() {
         PagedResult<PushTaskTO> tasks = taskService.list(
-                TaskType.PUSH, SyncopeClient.getListQueryBuilder().build());
+                TaskType.PUSH, SyncopeClient.getTaskQueryBuilder().build());
         assertFalse(tasks.getResult().isEmpty());
         for (AbstractTaskTO task : tasks.getResult()) {
             if (!(task instanceof PushTaskTO)) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ReportITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ReportITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ReportITCase.java
index e092a1d..49c24e7 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ReportITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ReportITCase.java
@@ -30,11 +30,9 @@ import java.util.List;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
 import org.apache.commons.io.IOUtils;
-import org.apache.syncope.client.lib.SyncopeClient;
 import org.apache.syncope.common.lib.SyncopeClientException;
 import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.report.UserReportletConf;
-import org.apache.syncope.common.lib.to.PagedResult;
 import org.apache.syncope.common.lib.to.ReportExecTO;
 import org.apache.syncope.common.lib.to.ReportTO;
 import org.apache.syncope.common.lib.types.ReportExecExportFormat;
@@ -62,10 +60,10 @@ public class ReportITCase extends AbstractITCase {
 
     @Test
     public void list() {
-        PagedResult<ReportTO> reports = reportService.list(SyncopeClient.getListQueryBuilder().build());
+        List<ReportTO> reports = reportService.list();
         assertNotNull(reports);
-        assertFalse(reports.getResult().isEmpty());
-        for (ReportTO report : reports.getResult()) {
+        assertFalse(reports.isEmpty());
+        for (ReportTO report : reports) {
             assertNotNull(report);
         }
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 30425f9..42493af 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
@@ -55,7 +55,7 @@ public class SchedTaskITCase extends AbstractTaskITCase {
     @Test
     public void list() {
         PagedResult<SchedTaskTO> tasks =
-                taskService.list(TaskType.SCHEDULED, SyncopeClient.getListQueryBuilder().build());
+                taskService.list(TaskType.SCHEDULED, SyncopeClient.getTaskQueryBuilder().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/c14a20d7/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 f23f800..f4db643 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
@@ -90,7 +90,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
     @Test
     public void list() {
         PagedResult<SyncTaskTO> tasks =
-                taskService.list(TaskType.SYNCHRONIZATION, SyncopeClient.getListQueryBuilder().build());
+                taskService.list(TaskType.SYNCHRONIZATION, SyncopeClient.getTaskQueryBuilder().build());
         assertFalse(tasks.getResult().isEmpty());
         for (AbstractTaskTO task : tasks.getResult()) {
             if (!(task instanceof SyncTaskTO)) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/c14a20d7/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 fe91993..146c51b 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
@@ -146,7 +146,7 @@ public class UserITCase extends AbstractITCase {
         // get task list
         PagedResult<PropagationTaskTO> tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -163,7 +163,7 @@ public class UserITCase extends AbstractITCase {
         // get the new task list
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -348,7 +348,7 @@ public class UserITCase extends AbstractITCase {
         // get task list
         PagedResult<PropagationTaskTO> tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -399,7 +399,7 @@ public class UserITCase extends AbstractITCase {
         // get the new task list
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -694,7 +694,7 @@ public class UserITCase extends AbstractITCase {
     @Test
     public void updatePasswordOnly() {
         int beforeTasks = taskService.list(TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build()).getTotalCount();
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build()).getTotalCount();
         assertFalse(beforeTasks <= 0);
 
         UserTO userTO = getUniqueSampleTO("pwdonly@t.com");
@@ -712,7 +712,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(userTO.getChangePwdDate());
 
         int afterTasks = taskService.list(TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build()).getTotalCount();
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build()).getTotalCount();
         assertFalse(beforeTasks <= 0);
 
         assertTrue(beforeTasks < afterTasks);
@@ -724,7 +724,7 @@ public class UserITCase extends AbstractITCase {
         // get task list
         PagedResult<PropagationTaskTO> tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -745,7 +745,7 @@ public class UserITCase extends AbstractITCase {
         // get the new task list
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -771,7 +771,7 @@ public class UserITCase extends AbstractITCase {
         // get the new task list
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
 
         maxKey = newMaxKey;
         newMaxKey = tasks.getResult().iterator().next().getKey();
@@ -793,7 +793,7 @@ public class UserITCase extends AbstractITCase {
         // get the new task list
         tasks = taskService.list(
                 TaskType.PROPAGATION,
-                SyncopeClient.getListQueryBuilder().page(1).size(1).build());
+                SyncopeClient.getTaskQueryBuilder().page(1).size(1).build());
 
         maxKey = newMaxKey;
         newMaxKey = tasks.getResult().iterator().next().getKey();


Mime
View raw message