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: Cleanup
Date Thu, 29 Mar 2018 15:05:45 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X ac8653e0f -> 2a500bf33
  refs/heads/master ec63a29d1 -> 1135e3b77


Cleanup


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

Branch: refs/heads/2_0_X
Commit: 2a500bf33f7ca178cb99b093c1341c0e187e15ed
Parents: ac8653e
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Thu Mar 29 16:35:21 2018 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Thu Mar 29 16:35:21 2018 +0200

----------------------------------------------------------------------
 .../commands/task/TaskSyncopeOperations.java    |  4 ++--
 .../client/console/rest/TaskRestClient.java     | 24 +++++++++-----------
 .../common/rest/api/service/TaskService.java    |  2 +-
 .../syncope/core/logic/AccessTokenLogic.java    |  2 ++
 .../syncope/core/logic/ConfigurationLogic.java  |  1 +
 .../core/logic/ConnectorHistoryLogic.java       | 16 ++++---------
 .../apache/syncope/core/logic/DomainLogic.java  |  3 +++
 .../syncope/core/logic/DynRealmLogic.java       |  3 +++
 .../apache/syncope/core/logic/LoggerLogic.java  |  2 ++
 .../syncope/core/logic/MailTemplateLogic.java   |  3 +++
 .../syncope/core/logic/NotificationLogic.java   |  3 +++
 .../apache/syncope/core/logic/PolicyLogic.java  |  3 +++
 .../apache/syncope/core/logic/RealmLogic.java   |  2 ++
 .../core/logic/RelationshipTypeLogic.java       |  3 +++
 .../apache/syncope/core/logic/ReportLogic.java  |  3 +++
 .../syncope/core/logic/ReportTemplateLogic.java |  3 +++
 .../core/logic/ResourceHistoryLogic.java        | 16 ++++---------
 .../apache/syncope/core/logic/SchemaLogic.java  | 13 ++---------
 .../apache/syncope/core/logic/TaskLogic.java    |  5 +++-
 .../syncope/core/logic/UserWorkflowLogic.java   |  7 +++---
 .../api/data/ConnInstanceDataBinder.java        |  4 ++++
 .../api/data/ResourceDataBinder.java            |  4 ++++
 .../java/data/ConnInstanceDataBinderImpl.java   | 12 ++++++++++
 .../java/data/ResourceDataBinderImpl.java       | 12 ++++++++++
 .../rest/cxf/service/SchemaServiceImpl.java     |  4 +++-
 .../core/rest/cxf/service/TaskServiceImpl.java  |  4 ++--
 .../syncope/fit/core/AbstractTaskITCase.java    |  2 +-
 .../syncope/fit/core/ExceptionMapperITCase.java |  6 ++---
 .../syncope/fit/core/MigrationITCase.java       |  2 +-
 .../fit/core/NotificationTaskITCase.java        |  4 ++--
 .../syncope/fit/core/PropagationTaskITCase.java | 14 ++++++------
 .../apache/syncope/fit/core/PullTaskITCase.java |  6 ++---
 .../apache/syncope/fit/core/PushTaskITCase.java |  2 +-
 .../syncope/fit/core/SchedTaskITCase.java       |  2 +-
 .../org/apache/syncope/fit/core/UserITCase.java | 18 +++++++--------
 35 files changed, 127 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/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 48fd7c6..d577968 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
@@ -45,11 +45,11 @@ public class TaskSyncopeOperations {
     }
 
     public List<TaskTO> list(final String type) {
-        return taskService.list(new TaskQuery.Builder(TaskType.valueOf(type)).build()).getResult();
+        return taskService.search(new TaskQuery.Builder(TaskType.valueOf(type)).build()).getResult();
     }
 
     public List<TaskTO> listPropagationTask() {
-        return taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).build()).getResult();
+        return taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).build()).getResult();
     }
 
     public void deleteExecution(final String executionKey) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/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 723ae2e..516ef7c 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
@@ -60,23 +60,23 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
     }
 
     public int count(final TaskType kind) {
-        return getService(TaskService.class).list(
+        return getService(TaskService.class).search(
                 new TaskQuery.Builder(kind).page(1).size(1).build()).getTotalCount();
     }
 
     public int count(final String resource, final TaskType kind) {
-        return getService(TaskService.class).list(
+        return getService(TaskService.class).search(
                 new TaskQuery.Builder(kind).resource(resource).page(1).size(1).build()).getTotalCount();
     }
 
     public int count(final AnyTypeKind anyTypeKind, final String entityKey, final TaskType kind) {
-        return getService(TaskService.class).list(
+        return getService(TaskService.class).search(
                 new TaskQuery.Builder(kind).anyTypeKind(anyTypeKind).entityKey(entityKey).page(1).size(1).build()).
                 getTotalCount();
     }
 
     public int count(final AnyTypeKind anyTypeKind, final String entityKey, final String notification) {
-        return getService(TaskService.class).list(
+        return getService(TaskService.class).search(
                 new TaskQuery.Builder(TaskType.NOTIFICATION).notification(notification).
                         anyTypeKind(anyTypeKind).entityKey(entityKey).page(1).size(1).build()).
                 getTotalCount();
@@ -92,7 +92,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
             final String resource, final int page, final int size, final SortParam<String> sort) {
 
         return getService(TaskService.class).
-                <PropagationTaskTO>list(new TaskQuery.Builder(TaskType.PROPAGATION).
+                <PropagationTaskTO>search(new TaskQuery.Builder(TaskType.PROPAGATION).
                         resource(resource).
                         page(page).size(size).
                         orderBy(toOrderBy(sort)).build()).
@@ -104,7 +104,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
             final int page, final int size, final SortParam<String> sort) {
 
         return getService(TaskService.class).
-                <PropagationTaskTO>list(new TaskQuery.Builder(TaskType.PROPAGATION).
+                <PropagationTaskTO>search(new TaskQuery.Builder(TaskType.PROPAGATION).
                         anyTypeKind(anyTypeKind).entityKey(entityKey).
                         page(page).size(size).
                         orderBy(toOrderBy(sort)).build()).
@@ -133,7 +133,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
         }
 
         PagedResult<NotificationTaskTO> list = getService(TaskService.class).
-                list(builder.page(page).size(size).orderBy(toOrderBy(sort)).build());
+                search(builder.page(page).size(size).orderBy(toOrderBy(sort)).build());
         return list.getResult();
     }
 
@@ -142,9 +142,8 @@ 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(new TaskQuery.Builder(getTaskType(reference)).page(page).size(size).
-                        orderBy(toOrderBy(sort)).build()).
-                getResult();
+                search(new TaskQuery.Builder(getTaskType(reference)).page(page).size(size).
+                        orderBy(toOrderBy(sort)).build()).getResult();
     }
 
     @SuppressWarnings("unchecked")
@@ -156,9 +155,8 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
             final SortParam<String> sort) {
 
         return (List<T>) getService(TaskService.class).
-                list(new TaskQuery.Builder(getTaskType(reference)).page(page).size(size).resource(resource).
-                        orderBy(toOrderBy(sort)).build()).
-                getResult();
+                search(new TaskQuery.Builder(getTaskType(reference)).page(page).size(size).resource(resource).
+                        orderBy(toOrderBy(sort)).build()).getResult();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/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 b065a861..740d961 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
@@ -83,7 +83,7 @@ public interface TaskService extends ExecutableService {
     @GET
     @Path("{type}")
     @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
-    <T extends TaskTO> PagedResult<T> list(@BeanParam TaskQuery query);
+    <T extends TaskTO> PagedResult<T> search(@BeanParam TaskQuery query);
 
     /**
      * Creates a new task.

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java
index 62f57a2..e81299d 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AccessTokenLogic.java
@@ -43,6 +43,7 @@ import org.apache.syncope.core.spring.security.Encryptor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class AccessTokenLogic extends AbstractTransactionalLogic<AccessTokenTO> {
@@ -107,6 +108,7 @@ public class AccessTokenLogic extends AbstractTransactionalLogic<AccessTokenTO>
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.ACCESS_TOKEN_LIST + "')")
+    @Transactional(readOnly = true)
     public Pair<Integer, List<AccessTokenTO>> list(
             final int page,
             final int size,

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
index eea22ad..9516010 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
@@ -77,6 +77,7 @@ public class ConfigurationLogic extends AbstractTransactionalLogic<AttrTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.CONFIGURATION_LIST + "')")
+    @Transactional(readOnly = true)
     public List<AttrTO> list() {
         return binder.getConfTO();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorHistoryLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorHistoryLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorHistoryLogic.java
index 2d0afa7..286ddc3 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorHistoryLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ConnectorHistoryLogic.java
@@ -34,6 +34,7 @@ import org.apache.syncope.core.provisioning.api.data.ConnInstanceDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class ConnectorHistoryLogic extends AbstractTransactionalLogic<ConnInstanceHistoryConfTO> {
@@ -47,17 +48,8 @@ public class ConnectorHistoryLogic extends AbstractTransactionalLogic<ConnInstan
     @Autowired
     private ConnInstanceDataBinder binder;
 
-    private ConnInstanceHistoryConfTO getConnInstanceHistoryConfTO(final ConnInstanceHistoryConf history) {
-        ConnInstanceHistoryConfTO historyTO = new ConnInstanceHistoryConfTO();
-        historyTO.setKey(history.getKey());
-        historyTO.setCreator(history.getCreator());
-        historyTO.setCreation(history.getCreation());
-        historyTO.setConnInstanceTO(history.getConf());
-
-        return historyTO;
-    }
-
     @PreAuthorize("hasRole('" + StandardEntitlement.CONNECTOR_HISTORY_LIST + "')")
+    @Transactional(readOnly = true)
     public List<ConnInstanceHistoryConfTO> list(final String key) {
         ConnInstance connInstance = connInstanceDAO.find(key);
         if (connInstance == null) {
@@ -69,7 +61,7 @@ public class ConnectorHistoryLogic extends AbstractTransactionalLogic<ConnInstan
 
             @Override
             public ConnInstanceHistoryConfTO transform(final ConnInstanceHistoryConf input) {
-                return getConnInstanceHistoryConfTO(input);
+                return binder.getConnInstanceHistoryConfTO(input);
             }
 
         }, new ArrayList<ConnInstanceHistoryConfTO>());
@@ -102,7 +94,7 @@ public class ConnectorHistoryLogic extends AbstractTransactionalLogic<ConnInstan
         if (!"list".equals(method.getName())) {
             try {
                 String key = (String) args[0];
-                return getConnInstanceHistoryConfTO(connInstanceHistoryConfDAO.find(key));
+                return binder.getConnInstanceHistoryConfTO(connInstanceHistoryConfDAO.find(key));
             } catch (Throwable ignore) {
                 LOG.debug("Unresolved reference", ignore);
                 throw new UnresolvedReferenceException(ignore);

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/DomainLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/DomainLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/DomainLogic.java
index cfefdd0..e9b671d 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/DomainLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/DomainLogic.java
@@ -35,6 +35,7 @@ import org.apache.syncope.core.provisioning.api.data.DomainDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class DomainLogic extends AbstractTransactionalLogic<DomainTO> {
@@ -50,6 +51,7 @@ public class DomainLogic extends AbstractTransactionalLogic<DomainTO> {
 
     @PreAuthorize("hasRole('" + StandardEntitlement.DOMAIN_READ + "') and authentication.details.domain == "
             + "T(org.apache.syncope.common.lib.SyncopeConstants).MASTER_DOMAIN")
+    @Transactional(readOnly = true)
     public DomainTO read(final String key) {
         Domain domain = domainDAO.find(key);
         if (domain == null) {
@@ -62,6 +64,7 @@ public class DomainLogic extends AbstractTransactionalLogic<DomainTO> {
     }
 
     @PreAuthorize("isAuthenticated()")
+    @Transactional(readOnly = true)
     public List<DomainTO> list() {
         return CollectionUtils.collect(domainDAO.findAll(), new Transformer<Domain, DomainTO>() {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/DynRealmLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/DynRealmLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/DynRealmLogic.java
index 0b17724..bebf275 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/DynRealmLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/DynRealmLogic.java
@@ -33,6 +33,7 @@ import org.apache.syncope.core.provisioning.api.data.DynRealmDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class DynRealmLogic extends AbstractTransactionalLogic<DynRealmTO> {
@@ -44,6 +45,7 @@ public class DynRealmLogic extends AbstractTransactionalLogic<DynRealmTO> {
     private DynRealmDAO dynRealmDAO;
 
     @PreAuthorize("hasRole('" + StandardEntitlement.DYNREALM_READ + "')")
+    @Transactional(readOnly = true)
     public DynRealmTO read(final String key) {
         DynRealm dynRealm = dynRealmDAO.find(key);
         if (dynRealm == null) {
@@ -55,6 +57,7 @@ public class DynRealmLogic extends AbstractTransactionalLogic<DynRealmTO> {
         return binder.getDynRealmTO(dynRealm);
     }
 
+    @Transactional(readOnly = true)
     public List<DynRealmTO> list() {
         return CollectionUtils.collect(dynRealmDAO.findAll(), new Transformer<DynRealm, DynRealmTO>() {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
index 0b0760c..623d880 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
@@ -112,6 +112,7 @@ public class LoggerLogic extends AbstractTransactionalLogic<LoggerTO> {
 
     @PreAuthorize("hasRole('" + StandardEntitlement.LOG_LIST + "') and authentication.details.domain == "
             + "T(org.apache.syncope.common.lib.SyncopeConstants).MASTER_DOMAIN")
+    @Transactional(readOnly = true)
     public List<LogAppender> memoryAppenders() {
         return CollectionUtils.collect(
                 loggerLoader.getMemoryAppenders().keySet(),
@@ -128,6 +129,7 @@ public class LoggerLogic extends AbstractTransactionalLogic<LoggerTO> {
 
     @PreAuthorize("hasRole('" + StandardEntitlement.LOG_READ + "') and authentication.details.domain == "
             + "T(org.apache.syncope.common.lib.SyncopeConstants).MASTER_DOMAIN")
+    @Transactional(readOnly = true)
     public List<LogStatementTO> getLastLogStatements(final String memoryAppender) {
         MemoryAppender appender = loggerLoader.getMemoryAppenders().get(memoryAppender);
         if (appender == null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
index 7839e12..7d58270 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/MailTemplateLogic.java
@@ -40,6 +40,7 @@ import org.apache.syncope.core.persistence.api.entity.Notification;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class MailTemplateLogic extends AbstractTransactionalLogic<MailTemplateTO> {
@@ -60,6 +61,7 @@ public class MailTemplateLogic extends AbstractTransactionalLogic<MailTemplateTO
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.MAIL_TEMPLATE_READ + "')")
+    @Transactional(readOnly = true)
     public MailTemplateTO read(final String key) {
         MailTemplate mailTemplate = mailTemplateDAO.find(key);
         if (mailTemplate == null) {
@@ -72,6 +74,7 @@ public class MailTemplateLogic extends AbstractTransactionalLogic<MailTemplateTO
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.MAIL_TEMPLATE_LIST + "')")
+    @Transactional(readOnly = true)
     public List<MailTemplateTO> list() {
         return CollectionUtils.collect(mailTemplateDAO.findAll(), new Transformer<MailTemplate, MailTemplateTO>() {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
index 3b867b4..ef26965 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
@@ -40,6 +40,7 @@ import org.quartz.JobKey;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class NotificationLogic extends AbstractJobLogic<NotificationTO> {
@@ -51,6 +52,7 @@ public class NotificationLogic extends AbstractJobLogic<NotificationTO> {
     private NotificationDataBinder binder;
 
     @PreAuthorize("hasRole('" + StandardEntitlement.NOTIFICATION_READ + "')")
+    @Transactional(readOnly = true)
     public NotificationTO read(final String key) {
         Notification notification = notificationDAO.find(key);
         if (notification == null) {
@@ -63,6 +65,7 @@ public class NotificationLogic extends AbstractJobLogic<NotificationTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.NOTIFICATION_LIST + "')")
+    @Transactional(readOnly = true)
     public List<NotificationTO> list() {
         return CollectionUtils.collect(notificationDAO.findAll(), new Transformer<Notification, NotificationTO>() {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java
index 4285d22..f2dc52f 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java
@@ -38,6 +38,7 @@ import org.apache.syncope.core.provisioning.api.data.PolicyDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class PolicyLogic extends AbstractTransactionalLogic<PolicyTO> {
@@ -78,6 +79,7 @@ public class PolicyLogic extends AbstractTransactionalLogic<PolicyTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.POLICY_LIST + "')")
+    @Transactional(readOnly = true)
     public <T extends PolicyTO> List<T> list(final PolicyType type) {
         PolicyUtils policyUtils = policyUtilsFactory.getInstance(type);
 
@@ -91,6 +93,7 @@ public class PolicyLogic extends AbstractTransactionalLogic<PolicyTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.POLICY_READ + "')")
+    @Transactional(readOnly = true)
     public <T extends PolicyTO> T read(final PolicyType type, final String key) {
         Policy policy = policyDAO.find(key);
         if (policy == null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java
index f767728..54ac004 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/RealmLogic.java
@@ -52,6 +52,7 @@ import org.apache.syncope.core.spring.security.AuthContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class RealmLogic extends AbstractTransactionalLogic<RealmTO> {
@@ -72,6 +73,7 @@ public class RealmLogic extends AbstractTransactionalLogic<RealmTO> {
     private PropagationTaskExecutor taskExecutor;
 
     @PreAuthorize("isAuthenticated()")
+    @Transactional(readOnly = true)
     public List<RealmTO> list(final String fullPath) {
         Realm realm = realmDAO.findByFullPath(fullPath);
         if (realm == null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/RelationshipTypeLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/RelationshipTypeLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/RelationshipTypeLogic.java
index 6d96e8b..cb24266 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/RelationshipTypeLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/RelationshipTypeLogic.java
@@ -34,6 +34,7 @@ import org.apache.syncope.core.provisioning.api.data.RelationshipTypeDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class RelationshipTypeLogic extends AbstractTransactionalLogic<RelationshipTypeTO> {
@@ -45,6 +46,7 @@ public class RelationshipTypeLogic extends AbstractTransactionalLogic<Relationsh
     private RelationshipTypeDAO relationshipTypeDAO;
 
     @PreAuthorize("hasRole('" + StandardEntitlement.RELATIONSHIPTYPE_READ + "')")
+    @Transactional(readOnly = true)
     public RelationshipTypeTO read(final String key) {
         RelationshipType relationshipType = relationshipTypeDAO.find(key);
         if (relationshipType == null) {
@@ -57,6 +59,7 @@ public class RelationshipTypeLogic extends AbstractTransactionalLogic<Relationsh
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.RELATIONSHIPTYPE_LIST + "')")
+    @Transactional(readOnly = true)
     public List<RelationshipTypeTO> list() {
         return CollectionUtils.collect(relationshipTypeDAO.findAll(),
                 new Transformer<RelationshipType, RelationshipTypeTO>() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
index da8f2b7..a0c39ff 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
@@ -70,6 +70,7 @@ import org.quartz.SchedulerException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class ReportLogic extends AbstractExecutableLogic<ReportTO> {
@@ -138,6 +139,7 @@ public class ReportLogic extends AbstractExecutableLogic<ReportTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.REPORT_LIST + "')")
+    @Transactional(readOnly = true)
     public List<ReportTO> list() {
         return CollectionUtils.collect(reportDAO.findAll(), new Transformer<Report, ReportTO>() {
 
@@ -149,6 +151,7 @@ public class ReportLogic extends AbstractExecutableLogic<ReportTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.REPORT_READ + "')")
+    @Transactional(readOnly = true)
     public ReportTO read(final String key) {
         Report report = reportDAO.find(key);
         if (report == null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
index f44427f..29644f2 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportTemplateLogic.java
@@ -40,6 +40,7 @@ import org.apache.syncope.core.persistence.api.entity.Report;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class ReportTemplateLogic extends AbstractTransactionalLogic<ReportTemplateTO> {
@@ -60,6 +61,7 @@ public class ReportTemplateLogic extends AbstractTransactionalLogic<ReportTempla
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.REPORT_TEMPLATE_READ + "')")
+    @Transactional(readOnly = true)
     public ReportTemplateTO read(final String key) {
         ReportTemplate reportTemplate = reportTemplateDAO.find(key);
         if (reportTemplate == null) {
@@ -72,6 +74,7 @@ public class ReportTemplateLogic extends AbstractTransactionalLogic<ReportTempla
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.REPORT_TEMPLATE_LIST + "')")
+    @Transactional(readOnly = true)
     public List<ReportTemplateTO> list() {
         return CollectionUtils.collect(
                 reportTemplateDAO.findAll(), new Transformer<ReportTemplate, ReportTemplateTO>() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceHistoryLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceHistoryLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceHistoryLogic.java
index fc95f81..c4b6413 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceHistoryLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceHistoryLogic.java
@@ -34,6 +34,7 @@ import org.apache.syncope.core.provisioning.api.data.ResourceDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class ResourceHistoryLogic extends AbstractTransactionalLogic<ResourceHistoryConfTO> {
@@ -47,17 +48,8 @@ public class ResourceHistoryLogic extends AbstractTransactionalLogic<ResourceHis
     @Autowired
     private ResourceDataBinder binder;
 
-    private ResourceHistoryConfTO getResourceHistoryConfTO(final ExternalResourceHistoryConf history) {
-        ResourceHistoryConfTO historyTO = new ResourceHistoryConfTO();
-        historyTO.setKey(history.getKey());
-        historyTO.setCreator(history.getCreator());
-        historyTO.setCreation(history.getCreation());
-        historyTO.setResourceTO(history.getConf());
-
-        return historyTO;
-    }
-
     @PreAuthorize("hasRole('" + StandardEntitlement.RESOURCE_HISTORY_LIST + "')")
+    @Transactional(readOnly = true)
     public List<ResourceHistoryConfTO> list(final String key) {
         ExternalResource resource = resourceDAO.find(key);
         if (resource == null) {
@@ -69,7 +61,7 @@ public class ResourceHistoryLogic extends AbstractTransactionalLogic<ResourceHis
 
             @Override
             public ResourceHistoryConfTO transform(final ExternalResourceHistoryConf input) {
-                return getResourceHistoryConfTO(input);
+                return binder.getResourceHistoryConfTO(input);
             }
         }, new ArrayList<ResourceHistoryConfTO>());
     }
@@ -101,7 +93,7 @@ public class ResourceHistoryLogic extends AbstractTransactionalLogic<ResourceHis
         if (!"list".equals(method.getName())) {
             try {
                 String key = (String) args[0];
-                return getResourceHistoryConfTO(resourceHistoryConfDAO.find(key));
+                return binder.getResourceHistoryConfTO(resourceHistoryConfDAO.find(key));
             } catch (Throwable ignore) {
                 LOG.debug("Unresolved reference", ignore);
                 throw new UnresolvedReferenceException(ignore);

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
index 9c81f4a..38869cf 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
@@ -48,6 +48,7 @@ import org.apache.syncope.core.provisioning.api.data.SchemaDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class SchemaLogic extends AbstractTransactionalLogic<SchemaTO> {
@@ -145,20 +146,10 @@ public class SchemaLogic extends AbstractTransactionalLogic<SchemaTO> {
     }
 
     @PreAuthorize("isAuthenticated()")
-    public <T extends SchemaTO> List<T> list(final SchemaType schemaType, final List<String> anyTypeClasses) {
-        return doSearch(schemaType, anyTypeClasses, null);
-    }
-
-    @PreAuthorize("isAuthenticated()")
+    @Transactional(readOnly = true)
     public <T extends SchemaTO> List<T> search(
             final SchemaType schemaType, final List<String> anyTypeClasses, final String keyword) {
 
-        return doSearch(schemaType, anyTypeClasses, keyword == null ? null : keyword.replace('*', '%'));
-    }
-
-    private <T extends SchemaTO> List<T> doSearch(
-            final SchemaType schemaType, final List<String> anyTypeClasses, final String keyword) {
-
         List<AnyTypeClass> classes = new ArrayList<>(anyTypeClasses == null ? 0 : anyTypeClasses.size());
         if (anyTypeClasses != null) {
             anyTypeClasses.remove(AnyTypeKind.USER.name());

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
index 25f06a1..6f225a0 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
@@ -65,6 +65,7 @@ import org.quartz.SchedulerException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 @Component
 public class TaskLogic extends AbstractExecutableLogic<TaskTO> {
@@ -159,7 +160,8 @@ public class TaskLogic extends AbstractExecutableLogic<TaskTO> {
 
     @PreAuthorize("hasRole('" + StandardEntitlement.TASK_LIST + "')")
     @SuppressWarnings("unchecked")
-    public <T extends TaskTO> Pair<Integer, List<T>> list(
+    @Transactional(readOnly = true)
+    public <T extends TaskTO> Pair<Integer, List<T>> search(
             final TaskType type,
             final String resource,
             final String notification,
@@ -197,6 +199,7 @@ public class TaskLogic extends AbstractExecutableLogic<TaskTO> {
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.TASK_READ + "')")
+    @Transactional(readOnly = true)
     public <T extends TaskTO> T read(final TaskType type, final String key, final boolean details) {
         Task task = taskDAO.find(key);
         if (task == null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/logic/src/main/java/org/apache/syncope/core/logic/UserWorkflowLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/UserWorkflowLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/UserWorkflowLogic.java
index 62b43ae..5a41b9c 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/UserWorkflowLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/UserWorkflowLogic.java
@@ -58,7 +58,7 @@ public class UserWorkflowLogic extends AbstractTransactionalLogic<WorkflowFormTO
     private UserDAO userDAO;
 
     @PreAuthorize("hasRole('" + StandardEntitlement.WORKFLOW_FORM_CLAIM + "')")
-    @Transactional(rollbackFor = { Throwable.class })
+
     public WorkflowFormTO claimForm(final String taskId) {
         return uwfAdapter.claimForm(taskId);
     }
@@ -82,20 +82,19 @@ public class UserWorkflowLogic extends AbstractTransactionalLogic<WorkflowFormTO
 
     @PreAuthorize("hasRole('" + StandardEntitlement.WORKFLOW_FORM_READ + "') and hasRole('"
             + StandardEntitlement.USER_READ + "')")
-    @Transactional(rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     public WorkflowFormTO getFormForUser(final String key) {
         User user = userDAO.authFind(key);
         return uwfAdapter.getForm(user.getWorkflowId());
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.WORKFLOW_FORM_LIST + "')")
-    @Transactional(rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     public List<WorkflowFormTO> getForms() {
         return uwfAdapter.getForms();
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.WORKFLOW_FORM_SUBMIT + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     public UserTO submitForm(final WorkflowFormTO form) {
         WorkflowResult<? extends AnyPatch> updated = uwfAdapter.submitForm(form);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
index ae7074f..9fa892e 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
@@ -18,9 +18,11 @@
  */
 package org.apache.syncope.core.provisioning.api.data;
 
+import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 import org.apache.syncope.common.lib.to.ConnInstanceTO;
 import org.apache.syncope.common.lib.types.ConnConfPropSchema;
 import org.apache.syncope.core.persistence.api.entity.ConnInstance;
+import org.apache.syncope.core.persistence.api.entity.ConnInstanceHistoryConf;
 import org.identityconnectors.framework.api.ConfigurationProperty;
 
 public interface ConnInstanceDataBinder {
@@ -31,6 +33,8 @@ public interface ConnInstanceDataBinder {
 
     ConnInstanceTO getConnInstanceTO(ConnInstance connInstance);
 
+    ConnInstanceHistoryConfTO getConnInstanceHistoryConfTO(ConnInstanceHistoryConf history);
+
     ConnInstance update(ConnInstanceTO connInstanceTO);
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
index 9f1ea5d..7ed6ce0 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
@@ -18,8 +18,10 @@
  */
 package org.apache.syncope.core.provisioning.api.data;
 
+import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource;
+import org.apache.syncope.core.persistence.api.entity.resource.ExternalResourceHistoryConf;
 
 public interface ResourceDataBinder {
 
@@ -29,4 +31,6 @@ public interface ResourceDataBinder {
 
     ExternalResource update(ExternalResource resource, ResourceTO resourceTO);
 
+    ResourceHistoryConfTO getResourceHistoryConfTO(ExternalResourceHistoryConf history);
+
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ConnInstanceDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ConnInstanceDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ConnInstanceDataBinderImpl.java
index 7dfb721..c590faa 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ConnInstanceDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ConnInstanceDataBinderImpl.java
@@ -27,6 +27,7 @@ import java.util.Date;
 import java.util.List;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
 import org.apache.syncope.common.lib.to.ConnInstanceTO;
 import org.apache.syncope.common.lib.to.ConnPoolConfTO;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
@@ -276,4 +277,15 @@ public class ConnInstanceDataBinderImpl implements ConnInstanceDataBinder {
 
         return connInstanceTO;
     }
+
+    @Override
+    public ConnInstanceHistoryConfTO getConnInstanceHistoryConfTO(final ConnInstanceHistoryConf history) {
+        ConnInstanceHistoryConfTO historyTO = new ConnInstanceHistoryConfTO();
+        historyTO.setKey(history.getKey());
+        historyTO.setCreator(history.getCreator());
+        historyTO.setCreation(history.getCreation());
+        historyTO.setConnInstanceTO(history.getConf());
+
+        return historyTO;
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
index 5df9531..d4c4a76 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ResourceDataBinderImpl.java
@@ -34,6 +34,7 @@ import org.apache.syncope.common.lib.to.ItemTO;
 import org.apache.syncope.common.lib.to.MappingTO;
 import org.apache.syncope.common.lib.to.OrgUnitTO;
 import org.apache.syncope.common.lib.to.ProvisionTO;
+import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
 import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.lib.types.MappingPurpose;
@@ -597,4 +598,15 @@ public class ResourceDataBinderImpl implements ResourceDataBinder {
 
         return resourceTO;
     }
+
+    @Override
+    public ResourceHistoryConfTO getResourceHistoryConfTO(final ExternalResourceHistoryConf history) {
+        ResourceHistoryConfTO historyTO = new ResourceHistoryConfTO();
+        historyTO.setKey(history.getKey());
+        historyTO.setCreator(history.getCreator());
+        historyTO.setCreation(history.getCreation());
+        historyTO.setResourceTO(history.getConf());
+
+        return historyTO;
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/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 ac5f5c6..ede71cc 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
@@ -21,6 +21,7 @@ package org.apache.syncope.core.rest.cxf.service;
 import java.net.URI;
 import java.util.List;
 import javax.ws.rs.core.Response;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.common.lib.to.SchemaTO;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -53,7 +54,8 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
 
     @Override
     public <T extends SchemaTO> List<T> search(final SchemaQuery query) {
-        return logic.search(query.getType(), query.getAnyTypeClasses(), query.getKeyword());
+        String keyword = StringUtils.isBlank(query.getKeyword()) ? null : query.getKeyword().replace('*', '%');
+        return logic.search(query.getType(), query.getAnyTypeClasses(), keyword);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/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 6c3a10b..cbeb886 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
@@ -70,8 +70,8 @@ public class TaskServiceImpl extends AbstractExecutableService implements TaskSe
 
     @SuppressWarnings("unchecked")
     @Override
-    public <T extends TaskTO> PagedResult<T> list(final TaskQuery query) {
-        Pair<Integer, List<T>> result = logic.list(
+    public <T extends TaskTO> PagedResult<T> search(final TaskQuery query) {
+        Pair<Integer, List<T>> result = logic.search(
                 query.getType(),
                 query.getResource(),
                 query.getNotification(),

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
index c2ec86b..7147cdc 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
@@ -211,7 +211,7 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
             }
 
             PagedResult<NotificationTaskTO> tasks =
-                    taskService.list(new TaskQuery.Builder(TaskType.NOTIFICATION).notification(notification).build());
+                    taskService.search(new TaskQuery.Builder(TaskType.NOTIFICATION).notification(notification).build());
             if (!tasks.getResult().isEmpty()) {
                 notificationTask = tasks.getResult().get(0);
             }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
index ed68dcc..c593ff4 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
@@ -156,19 +156,19 @@ public class ExceptionMapperITCase extends AbstractITCase {
     @Test
     public void invalidRequests() {
         try {
-            taskService.list(new TaskQuery.Builder(TaskType.NOTIFICATION).resource(RESOURCE_NAME_LDAP).build());
+            taskService.search(new TaskQuery.Builder(TaskType.NOTIFICATION).resource(RESOURCE_NAME_LDAP).build());
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(ClientExceptionType.InvalidRequest, e.getType());
         }
         try {
-            taskService.list(new TaskQuery.Builder(TaskType.PULL).anyTypeKind(AnyTypeKind.ANY_OBJECT).build());
+            taskService.search(new TaskQuery.Builder(TaskType.PULL).anyTypeKind(AnyTypeKind.ANY_OBJECT).build());
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(ClientExceptionType.InvalidRequest, e.getType());
         }
         try {
-            taskService.list(new TaskQuery.Builder(TaskType.PULL).
+            taskService.search(new TaskQuery.Builder(TaskType.PULL).
                     notification("e00945b5-1184-4d43-8e45-4318a8dcdfd4").build());
             fail();
         } catch (SyncopeClientException e) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
index c5e5cb9..ebd8b7d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
@@ -426,7 +426,7 @@ public class MigrationITCase extends AbstractTaskITCase {
     public void migrateFromSyncope12() throws InterruptedException {
         // 1. cleanup
         try {
-            for (TaskTO task : taskService.list(
+            for (TaskTO task : taskService.search(
                     new TaskQuery.Builder(TaskType.PULL).resource(RESOURCE_KEY).build()).getResult()) {
 
                 if (PULL_TASK_NAME.equals(PullTaskTO.class.cast(task).getName())) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
index bab038e..52f1995 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
@@ -264,7 +264,7 @@ public class NotificationTaskITCase extends AbstractNotificationTaskITCase {
         assertTrue(taskTO.getRecipients().containsAll(
                 new TestNotificationRecipientsProvider().provideRecipients(null)));
 
-        NotificationTaskTO foundViaList = taskService.<NotificationTaskTO>list(
+        NotificationTaskTO foundViaList = taskService.<NotificationTaskTO>search(
                 new TaskQuery.Builder(TaskType.NOTIFICATION).notification(notification.getKey()).build()).
                 getResult().get(0);
         assertEquals(taskTO, foundViaList);
@@ -283,7 +283,7 @@ public class NotificationTaskITCase extends AbstractNotificationTaskITCase {
 
         // verify that no task was created for disabled notification
         PagedResult<NotificationTaskTO> tasks =
-                taskService.list(new TaskQuery.Builder(TaskType.NOTIFICATION).notification(created.getLeft()).build());
+                taskService.search(new TaskQuery.Builder(TaskType.NOTIFICATION).notification(created.getLeft()).build());
         assertEquals(0, tasks.getSize());
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
index 4134b6f..f583d86 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
@@ -50,7 +50,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
 
     @Test
     public void paginatedList() {
-        PagedResult<PropagationTaskTO> tasks = taskService.list(
+        PagedResult<PropagationTaskTO> tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(2).build());
         assertNotNull(tasks);
         assertEquals(2, tasks.getResult().size());
@@ -59,7 +59,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
             assertNotNull(task);
         }
 
-        tasks = taskService.list(
+        tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(2).size(2).build());
         assertNotNull(tasks);
         assertEquals(2, tasks.getPage());
@@ -69,7 +69,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
             assertNotNull(task);
         }
 
-        tasks = taskService.list(
+        tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1000).size(2).build());
         assertNotNull(tasks);
         assertTrue(tasks.getResult().isEmpty());
@@ -91,7 +91,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
         userTO = createUser(userTO).getEntity();
 
         List<PropagationTaskTO> tasks = new ArrayList<>(
-                taskService.<PropagationTaskTO>list(new TaskQuery.Builder(TaskType.PROPAGATION).
+                taskService.<PropagationTaskTO>search(new TaskQuery.Builder(TaskType.PROPAGATION).
                         anyTypeKind(AnyTypeKind.USER).entityKey(userTO.getKey()).build()).
                         getResult());
         assertFalse(tasks.isEmpty());
@@ -104,7 +104,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
 
         taskService.bulk(bulkAction);
 
-        assertFalse(taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(100).build()).
+        assertFalse(taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(100).build()).
                 getResult().containsAll(tasks));
     }
 
@@ -167,13 +167,13 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
         }
 
         // check list
-        PagedResult<TaskTO> tasks = taskService.list(
+        PagedResult<TaskTO> tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(2).details(false).build());
         for (TaskTO item : tasks.getResult()) {
             assertTrue(item.getExecutions().isEmpty());
         }
 
-        tasks = taskService.list(
+        tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(2).details(true).build());
         for (TaskTO item : tasks.getResult()) {
             assertFalse(item.getExecutions().isEmpty());

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
index 17d00e9..3833366 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
@@ -120,7 +120,7 @@ public class PullTaskITCase extends AbstractTaskITCase {
 
     @Test
     public void list() {
-        PagedResult<PullTaskTO> tasks = taskService.list(new TaskQuery.Builder(TaskType.PULL).build());
+        PagedResult<PullTaskTO> tasks = taskService.search(new TaskQuery.Builder(TaskType.PULL).build());
         assertFalse(tasks.getResult().isEmpty());
         for (TaskTO task : tasks.getResult()) {
             if (!(task instanceof PullTaskTO)) {
@@ -1059,7 +1059,7 @@ public class PullTaskITCase extends AbstractTaskITCase {
                     getLdapRemoteObject(RESOURCE_LDAP_ADMIN_DN, RESOURCE_LDAP_ADMIN_PWD, userDn.getValues().get(0)));
 
             // ...and propagated
-            PagedResult<TaskTO> propagationTasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).
+            PagedResult<TaskTO> propagationTasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).
                     resource(RESOURCE_NAME_DBPULL).
                     anyTypeKind(AnyTypeKind.USER).entityKey(user.getKey()).build());
             assertEquals(1, propagationTasks.getSize());
@@ -1082,7 +1082,7 @@ public class PullTaskITCase extends AbstractTaskITCase {
             assertEquals("pullFromLDAP2@syncope.apache.org", user.getPlainAttr("email").getValues().get(0));
 
             // ...and propagated
-            propagationTasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).
+            propagationTasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).
                     resource(RESOURCE_NAME_DBPULL).
                     anyTypeKind(AnyTypeKind.USER).entityKey(user.getKey()).build());
             assertEquals(2, propagationTasks.getSize());

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
index e79c3f7..4e445dc 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
@@ -88,7 +88,7 @@ public class PushTaskITCase extends AbstractTaskITCase {
 
     @Test
     public void list() {
-        PagedResult<PushTaskTO> tasks = taskService.list(new TaskQuery.Builder(TaskType.PUSH).build());
+        PagedResult<PushTaskTO> tasks = taskService.search(new TaskQuery.Builder(TaskType.PUSH).build());
         assertFalse(tasks.getResult().isEmpty());
         for (TaskTO task : tasks.getResult()) {
             if (!(task instanceof PushTaskTO)) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
index 3ae3a6d..4d02d81 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
@@ -60,7 +60,7 @@ public class SchedTaskITCase extends AbstractTaskITCase {
     @Test
     public void list() {
         PagedResult<SchedTaskTO> tasks =
-                taskService.list(new TaskQuery.Builder(TaskType.SCHEDULED).build());
+                taskService.search(new TaskQuery.Builder(TaskType.SCHEDULED).build());
         assertFalse(tasks.getResult().isEmpty());
         for (TaskTO task : tasks.getResult()) {
             if (!(task instanceof SchedTaskTO) || task instanceof PullTaskTO || task instanceof PushTaskTO) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/2a500bf3/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 166ed86..f61ad8b 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
@@ -127,7 +127,7 @@ public class UserITCase extends AbstractITCase {
         userTO = createUser(userTO).getEntity();
 
         // get the propagation task just created
-        PagedResult<PropagationTaskTO> tasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).
+        PagedResult<PropagationTaskTO> tasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).
                 anyTypeKind(AnyTypeKind.USER).entityKey(userTO.getKey()).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
@@ -257,7 +257,7 @@ public class UserITCase extends AbstractITCase {
     @Test
     public void create() {
         // get task list
-        PagedResult<PropagationTaskTO> tasks = taskService.list(
+        PagedResult<PropagationTaskTO> tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
@@ -299,7 +299,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(newUserTO.getCreationDate());
 
         // get the new task list
-        tasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
+        tasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -583,7 +583,7 @@ public class UserITCase extends AbstractITCase {
 
     @Test
     public void updatePasswordOnly() {
-        int beforeTasks = taskService.list(
+        int beforeTasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build()).getTotalCount();
         assertFalse(beforeTasks <= 0);
 
@@ -601,7 +601,7 @@ public class UserITCase extends AbstractITCase {
         // check for changePwdDate
         assertNotNull(userTO.getChangePwdDate());
 
-        int afterTasks = taskService.list(
+        int afterTasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build()).getTotalCount();
         assertFalse(afterTasks <= 0);
 
@@ -612,7 +612,7 @@ public class UserITCase extends AbstractITCase {
     @Test
     public void verifyTaskRegistration() {
         // get task list
-        PagedResult<PropagationTaskTO> tasks = taskService.list(
+        PagedResult<PropagationTaskTO> tasks = taskService.search(
                 new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
@@ -633,7 +633,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(userTO);
 
         // get the new task list
-        tasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
+        tasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
 
@@ -657,7 +657,7 @@ public class UserITCase extends AbstractITCase {
         assertNotNull(userTO);
 
         // get the new task list
-        tasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
+        tasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
 
         // default configuration for ws-target-resource2 during update:
         // all update executions have to be registered
@@ -674,7 +674,7 @@ public class UserITCase extends AbstractITCase {
         userService.delete(userTO.getKey());
 
         // get the new task list
-        tasks = taskService.list(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
+        tasks = taskService.search(new TaskQuery.Builder(TaskType.PROPAGATION).page(1).size(1).build());
 
         maxKey = newMaxKey;
         newMaxKey = tasks.getResult().iterator().next().getKey();


Mime
View raw message