You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/01/17 17:28:58 UTC

svn commit: r1434763 - /syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/

Author: ilgrosso
Date: Thu Jan 17 16:28:57 2013
New Revision: 1434763

URL: http://svn.apache.org/viewvc?rev=1434763&view=rev
Log:
Adding final keywords in order to meet out Checkstyle rules + fixing incorrect marshalling in NotificationRestClient#getEvents

Modified:
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConfigurationServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConnectorServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/EntitlementServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/LoggerServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/NotificationServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/PolicyServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ReportServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/RoleServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SchemaServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SpringServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/TaskServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserRequestServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserServiceProxy.java
    syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/WorkflowServiceProxy.java

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConfigurationServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConfigurationServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConfigurationServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConfigurationServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -23,27 +23,25 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-
 import javax.ws.rs.core.Response;
-
 import org.apache.syncope.client.to.ConfigurationTO;
 import org.apache.syncope.services.ConfigurationService;
 import org.springframework.web.client.RestTemplate;
 
 public class ConfigurationServiceProxy extends SpringServiceProxy implements ConfigurationService {
 
-    public ConfigurationServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public ConfigurationServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public ConfigurationTO create(ConfigurationTO configurationTO) {
-        return getRestTemplate()
-                .postForObject(baseUrl + "configuration/create", configurationTO, ConfigurationTO.class);
+    public ConfigurationTO create(final ConfigurationTO configurationTO) {
+        return getRestTemplate().postForObject(
+                baseUrl + "configuration/create", configurationTO, ConfigurationTO.class);
     }
 
     @Override
-    public ConfigurationTO delete(String key) {
+    public ConfigurationTO delete(final String key) {
         return getRestTemplate().getForObject(baseUrl + "configuration/delete/{key}.json", ConfigurationTO.class, key);
     }
 
@@ -54,12 +52,12 @@ public class ConfigurationServiceProxy e
     }
 
     @Override
-    public ConfigurationTO read(String key) {
+    public ConfigurationTO read(final String key) {
         return getRestTemplate().getForObject(baseUrl + "configuration/read/{key}.json", ConfigurationTO.class, key);
     }
 
     @Override
-    public ConfigurationTO update(String key, ConfigurationTO configurationTO) {
+    public ConfigurationTO update(final String key, final ConfigurationTO configurationTO) {
         return getRestTemplate()
                 .postForObject(baseUrl + "configuration/update", configurationTO, ConfigurationTO.class);
     }
@@ -81,5 +79,4 @@ public class ConfigurationServiceProxy e
         return Response.ok(getRestTemplate().getForObject(baseUrl + "configuration/dbexport", InputStream.class))
                 .build();
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConnectorServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConnectorServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConnectorServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ConnectorServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.to.ConnBundleTO;
 import org.apache.syncope.client.to.ConnInstanceTO;
 import org.apache.syncope.services.ConnectorService;
@@ -29,30 +28,30 @@ import org.springframework.web.client.Re
 
 public class ConnectorServiceProxy extends SpringServiceProxy implements ConnectorService {
 
-    public ConnectorServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public ConnectorServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public ConnInstanceTO create(ConnInstanceTO connectorTO) {
+    public ConnInstanceTO create(final ConnInstanceTO connectorTO) {
         return getRestTemplate().postForObject(baseUrl + "connector/create.json", connectorTO,
                 ConnInstanceTO.class);
     }
 
     @Override
-    public ConnInstanceTO update(Long connectorId, ConnInstanceTO connectorTO) {
+    public ConnInstanceTO update(final Long connectorId, final ConnInstanceTO connectorTO) {
         return getRestTemplate().postForObject(baseUrl + "connector/update.json", connectorTO,
                 ConnInstanceTO.class);
     }
 
     @Override
-    public ConnInstanceTO delete(Long connectorId) {
+    public ConnInstanceTO delete(final Long connectorId) {
         return getRestTemplate().getForObject(baseUrl + "connector/delete/{connectorId}.json",
                 ConnInstanceTO.class, connectorId);
     }
 
     @Override
-    public List<ConnInstanceTO> list(String lang) {
+    public List<ConnInstanceTO> list(final String lang) {
         String param = (lang != null)
                 ? "?lang=" + lang
                 : "";
@@ -62,13 +61,13 @@ public class ConnectorServiceProxy exten
     }
 
     @Override
-    public ConnInstanceTO read(Long connectorId) {
+    public ConnInstanceTO read(final Long connectorId) {
         return getRestTemplate().getForObject(baseUrl + "connector/read/{connectorId}", ConnInstanceTO.class,
                 connectorId);
     }
 
     @Override
-    public List<ConnBundleTO> getBundles(String lang) {
+    public List<ConnBundleTO> getBundles(final String lang) {
         String param = (lang != null)
                 ? "?lang=" + lang
                 : "";
@@ -78,31 +77,29 @@ public class ConnectorServiceProxy exten
     }
 
     @Override
-    public List<String> getSchemaNames(Long connectorId, ConnInstanceTO connectorTO, boolean showall) {
-        String param = (showall)
-                ? "?showall=true"
-                : "?showall=false";
+    public List<String> getSchemaNames(final Long connectorId, final ConnInstanceTO connectorTO, boolean showall) {
+        final String queryString = "?showall=" + String.valueOf(showall);
 
-        return Arrays.asList(getRestTemplate().postForObject(baseUrl + "connector/schema/list" + param, connectorTO,
+        return Arrays.asList(getRestTemplate().postForObject(baseUrl + "connector/schema/list" + queryString,
+                connectorTO,
                 String[].class));
     }
 
     @Override
-    public List<ConnConfProperty> getConfigurationProperties(Long connectorId) {
+    public List<ConnConfProperty> getConfigurationProperties(final Long connectorId) {
         return Arrays.asList(getRestTemplate()
                 .getForObject(baseUrl + "connector/{connectorId}/configurationProperty/list",
-                        ConnConfProperty[].class, connectorId));
+                ConnConfProperty[].class, connectorId));
     }
 
     @Override
-    public boolean validate(ConnInstanceTO connectorTO) {
+    public boolean validate(final ConnInstanceTO connectorTO) {
         return getRestTemplate().postForObject(baseUrl + "connector/check.json", connectorTO, Boolean.class);
     }
 
     @Override
-    public ConnInstanceTO readConnectorBean(String resourceName) {
+    public ConnInstanceTO readConnectorBean(final String resourceName) {
         return getRestTemplate().getForObject(baseUrl + "connector/{resourceName}/connectorBean",
                 ConnInstanceTO.class, resourceName);
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/EntitlementServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/EntitlementServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/EntitlementServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/EntitlementServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -21,13 +21,12 @@ package org.apache.syncope.services.prox
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
-
 import org.apache.syncope.services.EntitlementService;
 import org.springframework.web.client.RestTemplate;
 
 public class EntitlementServiceProxy extends SpringServiceProxy implements EntitlementService {
 
-    public EntitlementServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public EntitlementServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
@@ -42,5 +41,4 @@ public class EntitlementServiceProxy ext
         return new HashSet<String>(Arrays.asList(getRestTemplate().getForObject(baseUrl + "auth/entitlements.json",
                 String[].class)));
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/LoggerServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/LoggerServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/LoggerServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/LoggerServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -18,19 +18,17 @@
  */
 package org.apache.syncope.services.proxy;
 
+import ch.qos.logback.classic.Level;
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.to.LoggerTO;
 import org.apache.syncope.services.LoggerService;
 import org.apache.syncope.types.AuditLoggerName;
 import org.springframework.web.client.RestTemplate;
 
-import ch.qos.logback.classic.Level;
-
 public class LoggerServiceProxy extends SpringServiceProxy implements LoggerService {
 
-    public LoggerServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public LoggerServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
@@ -41,29 +39,27 @@ public class LoggerServiceProxy extends 
 
     @Override
     public List<AuditLoggerName> listAudits() {
-        return Arrays.asList(getRestTemplate().getForObject(baseUrl + "logger/audit/list",
-                AuditLoggerName[].class));
+        return Arrays.asList(getRestTemplate().getForObject(baseUrl + "logger/audit/list", AuditLoggerName[].class));
     }
 
     @Override
-    public LoggerTO update(String name, Level level) {
+    public LoggerTO update(final String name, final Level level) {
         return getRestTemplate().postForObject(baseUrl + "logger/log/{name}/{level}", null, LoggerTO.class, name,
                 level);
     }
 
     @Override
-    public LoggerTO delete(String name) {
+    public LoggerTO delete(final String name) {
         return getRestTemplate().getForObject(baseUrl + "logger/log/delete/{name}", LoggerTO.class, name);
     }
 
     @Override
-    public void enableAudit(AuditLoggerName auditLoggerName) {
+    public void enableAudit(final AuditLoggerName auditLoggerName) {
         getRestTemplate().put(baseUrl + "logger/audit/enable", auditLoggerName);
     }
 
     @Override
-    public void disableAudit(AuditLoggerName auditLoggerName) {
+    public void disableAudit(final AuditLoggerName auditLoggerName) {
         getRestTemplate().put(baseUrl + "logger/audit/disable", auditLoggerName);
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/NotificationServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/NotificationServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/NotificationServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/NotificationServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,19 +20,18 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.to.NotificationTO;
 import org.apache.syncope.services.NotificationService;
 import org.springframework.web.client.RestTemplate;
 
 public class NotificationServiceProxy extends SpringServiceProxy implements NotificationService {
 
-    public NotificationServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public NotificationServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public NotificationTO read(Long notificationId) {
+    public NotificationTO read(final Long notificationId) {
         return getRestTemplate().getForObject(baseUrl + "notification/read/{notificationId}.json",
                 NotificationTO.class, notificationId);
     }
@@ -44,21 +43,20 @@ public class NotificationServiceProxy ex
     }
 
     @Override
-    public NotificationTO create(NotificationTO notificationTO) {
+    public NotificationTO create(final NotificationTO notificationTO) {
         return getRestTemplate().postForObject(baseUrl + "notification/create.json", notificationTO,
                 NotificationTO.class);
     }
 
     @Override
-    public NotificationTO update(Long notificationId, NotificationTO notificationTO) {
+    public NotificationTO update(final Long notificationId, final NotificationTO notificationTO) {
         return getRestTemplate().postForObject(baseUrl + "notification/update.json", notificationTO,
                 NotificationTO.class);
     }
 
     @Override
-    public NotificationTO delete(Long notificationId) {
+    public NotificationTO delete(final Long notificationId) {
         return getRestTemplate().getForObject(baseUrl + "notification/delete/{notificationId}.json",
                 NotificationTO.class, notificationId);
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/PolicyServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/PolicyServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/PolicyServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/PolicyServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.to.AccountPolicyTO;
 import org.apache.syncope.client.to.PasswordPolicyTO;
 import org.apache.syncope.client.to.PolicyTO;
@@ -29,91 +28,89 @@ import org.apache.syncope.services.Polic
 import org.apache.syncope.types.PolicyType;
 import org.springframework.web.client.RestTemplate;
 
+@SuppressWarnings("unchecked")
 public class PolicyServiceProxy extends SpringServiceProxy implements PolicyService {
 
-    public PolicyServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public PolicyServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public <T extends PolicyTO> T create(PolicyType type, final T policyTO) {
-        @SuppressWarnings("unchecked")
-        T result = (T) getRestTemplate().postForObject(baseUrl + "policy/{kind}/create", policyTO, policyTO.getClass(),
-        		typeToUrl(policyTO.getType()));
-        return result;
+    public <T extends PolicyTO> T create(final PolicyType type, final T policyTO) {
+        return (T) getRestTemplate().postForObject(baseUrl + "policy/{kind}/create", policyTO, policyTO.getClass(),
+                typeToUrl(policyTO.getType()));
     }
 
-    @SuppressWarnings("unchecked")
     @Override
-    public <T extends PolicyTO> T delete(PolicyType type, Long policyId) {
-        T result = (T) getRestTemplate().getForObject(baseUrl + "policy/delete/{id}", getTOClass(type), policyId);
-        return result;
+    public <T extends PolicyTO> T delete(final PolicyType type, final Long policyId) {
+        return (T) getRestTemplate().getForObject(baseUrl + "policy/delete/{id}", getTOClass(type), policyId);
     }
 
     @Override
-    @SuppressWarnings("unchecked")
-    public <T extends PolicyTO> List<T> listByType(PolicyType type) {
+    public <T extends PolicyTO> List<T> listByType(final PolicyType type) {
         switch (type) {
-        case ACCOUNT:
-        case GLOBAL_ACCOUNT:
-			return (List<T>) Arrays.asList(getRestTemplate().getForObject(
-					baseUrl + "policy/{kind}/list", AccountPolicyTO[].class,
-					type));
-        case PASSWORD:
-        case GLOBAL_PASSWORD:
-			return (List<T>) Arrays.asList(getRestTemplate().getForObject(
-					baseUrl + "policy/{kind}/list", PasswordPolicyTO[].class,
-					type));
-        case SYNC:
-        case GLOBAL_SYNC:
-			return (List<T>) Arrays.asList(getRestTemplate().getForObject(
-					baseUrl + "policy/{kind}/list", SyncPolicyTO[].class,
-					type));
-        default:
-            throw new IllegalArgumentException("Policy Type not supported: " + type);
+            case ACCOUNT:
+            case GLOBAL_ACCOUNT:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(
+                        baseUrl + "policy/{kind}/list", AccountPolicyTO[].class,
+                        type));
+
+            case PASSWORD:
+            case GLOBAL_PASSWORD:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(
+                        baseUrl + "policy/{kind}/list", PasswordPolicyTO[].class,
+                        type));
+
+            case SYNC:
+            case GLOBAL_SYNC:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(
+                        baseUrl + "policy/{kind}/list", SyncPolicyTO[].class,
+                        type));
+
+            default:
+                throw new IllegalArgumentException("Policy Type not supported: " + type);
         }
     }
 
-    @SuppressWarnings("unchecked")
     @Override
-    public <T extends PolicyTO> T read(PolicyType type, Long policyId) {
-        T result = (T) getRestTemplate().getForObject(baseUrl + "policy/read/{id}", getTOClass(type), policyId);
-        return result;
+    public <T extends PolicyTO> T read(final PolicyType type, final Long policyId) {
+        return (T) getRestTemplate().getForObject(baseUrl + "policy/read/{id}", getTOClass(type), policyId);
     }
 
     @Override
-    @SuppressWarnings("unchecked")
-    public <T extends PolicyTO> T readGlobal(PolicyType type) {
-        T result = (T) getRestTemplate().getForObject(baseUrl + "policy/{kind}/global/read", getTOClass(type),
+    public <T extends PolicyTO> T readGlobal(final PolicyType type) {
+        return (T) getRestTemplate().getForObject(baseUrl + "policy/{kind}/global/read", getTOClass(type),
                 typeToUrl(type));
-        return result;
     }
 
     @Override
-    public <T extends PolicyTO> T update(PolicyType type, Long policyId, T policyTO) {
+    public <T extends PolicyTO> T update(final PolicyType type, final Long policyId, final T policyTO) {
         @SuppressWarnings("unchecked")
         T result = (T) getRestTemplate().postForObject(baseUrl + "policy/{kind}/update", policyTO, policyTO.getClass(),
-        		typeToUrl(policyTO.getType()));
+                typeToUrl(policyTO.getType()));
         return result;
     }
 
-    private Class<? extends PolicyTO> getTOClass(PolicyType type) {
+    private Class<? extends PolicyTO> getTOClass(final PolicyType type) {
         switch (type) {
-        case ACCOUNT:
-        case GLOBAL_ACCOUNT:
-            return AccountPolicyTO.class;
-        case PASSWORD:
-        case GLOBAL_PASSWORD:
-            return PasswordPolicyTO.class;
-        case SYNC:
-        case GLOBAL_SYNC:
-            return SyncPolicyTO.class;
-        default:
-            throw new IllegalArgumentException("Policy Type not supported: " + type);
+            case ACCOUNT:
+            case GLOBAL_ACCOUNT:
+                return AccountPolicyTO.class;
+
+            case PASSWORD:
+            case GLOBAL_PASSWORD:
+                return PasswordPolicyTO.class;
+
+            case SYNC:
+            case GLOBAL_SYNC:
+                return SyncPolicyTO.class;
+
+            default:
+                throw new IllegalArgumentException("Policy Type not supported: " + type);
         }
     }
 
-    private String typeToUrl(PolicyType type) {
+    private String typeToUrl(final PolicyType type) {
         String url = type.name().toLowerCase();
         int index = url.indexOf("_");
         if (index != -1) {
@@ -122,5 +119,4 @@ public class PolicyServiceProxy extends 
             return url;
         }
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ReportServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ReportServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ReportServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/ReportServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -21,9 +21,7 @@ package org.apache.syncope.services.prox
 import java.io.InputStream;
 import java.util.Arrays;
 import java.util.List;
-
 import javax.ws.rs.core.Response;
-
 import org.apache.syncope.client.to.ReportExecTO;
 import org.apache.syncope.client.to.ReportTO;
 import org.apache.syncope.services.ReportService;
@@ -32,17 +30,17 @@ import org.springframework.web.client.Re
 
 public class ReportServiceProxy extends SpringServiceProxy implements ReportService {
 
-    public ReportServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public ReportServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public ReportTO create(ReportTO reportTO) {
+    public ReportTO create(final ReportTO reportTO) {
         return getRestTemplate().postForObject(baseUrl + "report/create", reportTO, ReportTO.class);
     }
 
     @Override
-    public ReportTO update(Long reportId, ReportTO reportTO) {
+    public ReportTO update(final Long reportId, final ReportTO reportTO) {
         return getRestTemplate().postForObject(baseUrl + "report/update", reportTO, ReportTO.class);
     }
 
@@ -57,7 +55,7 @@ public class ReportServiceProxy extends 
     }
 
     @Override
-    public List<ReportTO> list(int page, int size) {
+    public List<ReportTO> list(final int page, final int size) {
         return Arrays.asList(getRestTemplate().getForObject(baseUrl + "report/list/{page}/{size}", ReportTO[].class,
                 page, size));
     }
@@ -74,18 +72,18 @@ public class ReportServiceProxy extends 
     }
 
     @Override
-    public ReportTO read(Long reportId) {
+    public ReportTO read(final Long reportId) {
         return getRestTemplate().getForObject(baseUrl + "report/read/{reportId}", ReportTO.class, reportId);
     }
 
     @Override
-    public ReportExecTO readExecution(Long executionId) {
+    public ReportExecTO readExecution(final Long executionId) {
         return getRestTemplate().getForObject(baseUrl + "report/execution/read/{executionId}", ReportExecTO.class,
                 executionId);
     }
 
     @Override
-    public Response exportExecutionResult(Long executionId, ReportExecExportFormat fmt) {
+    public Response exportExecutionResult(final Long executionId, final ReportExecExportFormat fmt) {
         String format = (fmt != null)
                 ? "?fmt=" + fmt.toString()
                 : "";
@@ -95,20 +93,19 @@ public class ReportServiceProxy extends 
     }
 
     @Override
-    public ReportExecTO execute(Long reportId) {
+    public ReportExecTO execute(final Long reportId) {
         return getRestTemplate().postForObject(baseUrl + "report/execute/{reportId}", null, ReportExecTO.class,
                 reportId);
     }
 
     @Override
-    public ReportTO delete(Long reportId) {
+    public ReportTO delete(final Long reportId) {
         return getRestTemplate().getForObject(baseUrl + "report/delete/{reportId}", ReportTO.class, reportId);
     }
 
     @Override
-    public ReportExecTO deleteExecution(Long executionId) {
+    public ReportExecTO deleteExecution(final Long executionId) {
         return getRestTemplate().getForObject(baseUrl + "report/execution/delete/{executionId}", ReportExecTO.class,
                 executionId);
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/RoleServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/RoleServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/RoleServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/RoleServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.mod.RoleMod;
 import org.apache.syncope.client.search.NodeCond;
 import org.apache.syncope.client.to.RoleTO;
@@ -29,14 +28,14 @@ import org.springframework.web.client.Re
 
 public class RoleServiceProxy extends SpringServiceProxy implements RoleService {
 
-    public RoleServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public RoleServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public List<RoleTO> children(Long roleId) {
-        return Arrays
-                .asList(getRestTemplate().getForObject(baseUrl + "role/children/{roleId}.json", RoleTO[].class, roleId));
+    public List<RoleTO> children(final Long roleId) {
+        return Arrays.asList(getRestTemplate().getForObject(baseUrl + "role/children/{roleId}.json",
+                RoleTO[].class, roleId));
     }
 
     @Override
@@ -46,12 +45,12 @@ public class RoleServiceProxy extends Sp
     }
 
     @Override
-    public RoleTO create(RoleTO roleTO) {
+    public RoleTO create(final RoleTO roleTO) {
         return getRestTemplate().postForObject(baseUrl + "role/create", roleTO, RoleTO.class);
     }
 
     @Override
-    public RoleTO delete(Long roleId) {
+    public RoleTO delete(final Long roleId) {
         return getRestTemplate().getForObject(baseUrl + "role/delete/{roleId}", RoleTO.class, roleId);
     }
 
@@ -61,45 +60,44 @@ public class RoleServiceProxy extends Sp
     }
 
     @Override
-    public List<RoleTO> list(int page, int size) {
-        //        return Arrays.asList(getRestTemplate().getForObject(baseURL + "role/list.json", RoleTO[].class, page, size));
+    public List<RoleTO> list(final int page, final int size) {
+        //return Arrays.asList(getRestTemplate().getForObject(baseURL + "role/list.json", RoleTO[].class, page, size));
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public RoleTO parent(Long roleId) {
+    public RoleTO parent(final Long roleId) {
         return getRestTemplate().getForObject(baseUrl + "role/parent/{roleId}.json", RoleTO.class, roleId);
     }
 
     @Override
-    public RoleTO read(Long roleId) {
+    public RoleTO read(final Long roleId) {
         return getRestTemplate().getForObject(baseUrl + "role/read/{roleId}.json", RoleTO.class, roleId);
     }
 
     @Override
-    public List<RoleTO> search(NodeCond searchCondition) {
+    public List<RoleTO> search(final NodeCond searchCondition) {
         return Arrays.asList(getRestTemplate().postForObject(baseUrl + "role/search", searchCondition, RoleTO[].class));
     }
 
     @Override
-    public List<RoleTO> search(NodeCond searchCondition, int page, int size) {
+    public List<RoleTO> search(final NodeCond searchCondition, final int page, final int size) {
         return Arrays.asList(getRestTemplate().postForObject(baseUrl + "role/search/{page}/{size}", searchCondition,
                 RoleTO[].class, page, size));
     }
 
     @Override
-    public int searchCount(NodeCond searchCondition) {
+    public int searchCount(final NodeCond searchCondition) {
         return getRestTemplate().postForObject(baseUrl + "role/search/count.json", searchCondition, Integer.class);
     }
 
     @Override
-    public RoleTO selfRead(Long roleId) {
+    public RoleTO selfRead(final Long roleId) {
         return getRestTemplate().getForObject(baseUrl + "role/selfRead/{roleId}", RoleTO.class, roleId);
     }
 
     @Override
-    public RoleTO update(Long roleId, RoleMod roleMod) {
+    public RoleTO update(final Long roleId, final RoleMod roleMod) {
         return getRestTemplate().postForObject(baseUrl + "role/update", roleMod, RoleTO.class);
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SchemaServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SchemaServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SchemaServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SchemaServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -32,60 +32,71 @@ import org.springframework.web.client.Re
 @SuppressWarnings("unchecked")
 public class SchemaServiceProxy extends SpringServiceProxy implements SchemaService {
 
-    public SchemaServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public SchemaServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public <T extends AbstractSchemaTO> T create(AttributableType kind, SchemaType type, T schemaTO) {
+    public <T extends AbstractSchemaTO> T create(final AttributableType kind, final SchemaType type, final T schemaTO) {
         return (T) getRestTemplate().postForObject(baseUrl + type + "/{kind}/create", schemaTO, getTOClass(type), kind);
     }
 
     @Override
-    public <T extends AbstractSchemaTO> T delete(AttributableType kind, SchemaType type, String schemaName) {
+    public <T extends AbstractSchemaTO> T delete(final AttributableType kind, final SchemaType type,
+            final String schemaName) {
+
         return (T) getRestTemplate().getForObject(baseUrl + type + "/{kind}/delete/{name}.json", getTOClass(type), kind,
                 schemaName);
     }
 
     @Override
-    public <T extends AbstractSchemaTO> List<T> list(AttributableType kind, SchemaType type) {
+    public <T extends AbstractSchemaTO> List<T> list(final AttributableType kind, final SchemaType type) {
         switch (type) {
-        case NORMAL:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + type + "/{kind}/list.json",
-                    SchemaTO[].class, kind));
-        case DERIVED:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + type + "/{kind}/list.json",
-                    DerivedSchemaTO[].class, kind));
-        case VIRTUAL:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + type + "/{kind}/list.json",
-                    VirtualSchemaTO[].class, kind));
-        default:
-            throw new IllegalArgumentException("SchemaType is not supported.");
+            case NORMAL:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + type + "/{kind}/list.json",
+                        SchemaTO[].class, kind));
+
+            case DERIVED:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + type + "/{kind}/list.json",
+                        DerivedSchemaTO[].class, kind));
+
+            case VIRTUAL:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + type + "/{kind}/list.json",
+                        VirtualSchemaTO[].class, kind));
+
+            default:
+                throw new IllegalArgumentException("SchemaType is not supported.");
         }
     }
 
     @Override
-    public <T extends AbstractSchemaTO> T read(AttributableType kind, SchemaType type, String schemaName) {
+    public <T extends AbstractSchemaTO> T read(final AttributableType kind, final SchemaType type,
+            final String schemaName) {
+
         return (T) getRestTemplate().getForObject(baseUrl + type + "/{kind}/read/{name}.json", getTOClass(type), kind,
                 schemaName);
     }
 
     @Override
-    public <T extends AbstractSchemaTO> T update(AttributableType kind, SchemaType type, String schemaName, T schemaTO) {
+    public <T extends AbstractSchemaTO> T update(final AttributableType kind, final SchemaType type,
+            final String schemaName, final T schemaTO) {
+
         return (T) getRestTemplate().postForObject(baseUrl + type + "/{kind}/update", schemaTO, getTOClass(type), kind);
     }
 
-    private Class<? extends AbstractSchemaTO> getTOClass(SchemaType type) {
+    private Class<? extends AbstractSchemaTO> getTOClass(final SchemaType type) {
         switch (type) {
-        case NORMAL:
-            return SchemaTO.class;
-        case DERIVED:
-            return DerivedSchemaTO.class;
-        case VIRTUAL:
-            return VirtualSchemaTO.class;
-        default:
-            throw new IllegalArgumentException("SchemaType is not supported: " + type);
+            case NORMAL:
+                return SchemaTO.class;
+
+            case DERIVED:
+                return DerivedSchemaTO.class;
+
+            case VIRTUAL:
+                return VirtualSchemaTO.class;
+
+            default:
+                throw new IllegalArgumentException("SchemaType is not supported: " + type);
         }
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SpringServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SpringServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SpringServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/SpringServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -22,16 +22,16 @@ import org.springframework.web.client.Re
 
 public abstract class SpringServiceProxy {
 
-	protected String baseUrl;
+    protected String baseUrl;
 
-	private RestTemplate restTemplate;
+    private RestTemplate restTemplate;
 
-	public SpringServiceProxy(String baseUrl, RestTemplate restTemplate) {
-		this.baseUrl = baseUrl;
-		this.restTemplate = restTemplate;
-	}
+    public SpringServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
+        this.baseUrl = baseUrl;
+        this.restTemplate = restTemplate;
+    }
 
-	public void setRestTemplate(RestTemplate restTemplate) {
+    public void setRestTemplate(final RestTemplate restTemplate) {
         this.restTemplate = restTemplate;
     }
 

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/TaskServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/TaskServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/TaskServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/TaskServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -22,7 +22,6 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-
 import org.apache.syncope.client.to.NotificationTaskTO;
 import org.apache.syncope.client.to.PropagationTaskTO;
 import org.apache.syncope.client.to.SchedTaskTO;
@@ -37,145 +36,165 @@ import org.springframework.web.client.Re
 @SuppressWarnings("unchecked")
 public class TaskServiceProxy extends SpringServiceProxy implements TaskService {
 
-    public TaskServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public TaskServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public int count(TaskType type) {
+    public int count(final TaskType type) {
         return getRestTemplate().getForObject(baseUrl + "task/{type}/count.json", Integer.class, type);
     }
 
     @Override
-    public <T extends TaskTO> T create(T taskTO) {
+    public <T extends TaskTO> T create(final T taskTO) {
         String subTypeString = (taskTO instanceof SyncTaskTO)
                 ? "sync"
                 : (taskTO instanceof SchedTaskTO)
-                        ? "sched"
-                        : "";
+                ? "sched"
+                : "";
 
-        return (T) getRestTemplate().postForObject(baseUrl + "task/create/{type}", taskTO, taskTO.getClass(), subTypeString);
+        return (T) getRestTemplate().postForObject(baseUrl + "task/create/{type}",
+                taskTO, taskTO.getClass(), subTypeString);
     }
 
     @Override
-    public <T extends TaskTO> T delete(TaskType type, Long taskId) {
+    public <T extends TaskTO> T delete(final TaskType type, final Long taskId) {
         return (T) getRestTemplate().getForObject(baseUrl + "task/delete/{taskId}", getTOClass(type), taskId);
     }
 
     @Override
-    public TaskExecTO deleteExecution(Long executionId) {
+    public TaskExecTO deleteExecution(final Long executionId) {
         return getRestTemplate()
                 .getForObject(baseUrl + "task/execution/delete/{executionId}", TaskExecTO.class, executionId);
     }
 
     @Override
-    public TaskExecTO execute(Long taskId, boolean dryRun) {
+    public TaskExecTO execute(final Long taskId, final boolean dryRun) {
         String param = (dryRun)
                 ? "?dryRun=true"
                 : "";
-        return getRestTemplate().postForObject(baseUrl + "task/execute/{taskId}" + param, null, TaskExecTO.class, taskId);
+        return getRestTemplate().
+                postForObject(baseUrl + "task/execute/{taskId}" + param, null, TaskExecTO.class, taskId);
     }
 
     @Override
     public Set<String> getJobClasses() {
-        return new HashSet<String>(Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/jobClasses.json",
+        return new HashSet<String>(
+                Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/jobClasses.json",
                 String[].class)));
     }
 
     @Override
     public Set<String> getSyncActionsClasses() {
-        return new HashSet<String>(Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/syncActionsClasses.json",
+        return new HashSet<String>(
+                Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/syncActionsClasses.json",
                 String[].class)));
     }
 
     @Override
-    public <T extends TaskTO> List<T> list(TaskType type) {
+    public <T extends TaskTO> List<T> list(final TaskType type) {
         switch (type) {
-        case PROPAGATION:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list",
-                    PropagationTaskTO[].class, type));
-        case NOTIFICATION:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list",
-                    NotificationTaskTO[].class, type));
-        case SCHEDULED:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list", SchedTaskTO[].class,
-                    type));
-        case SYNCHRONIZATION:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list", SyncTaskTO[].class,
-                    type));
-        default:
-            throw new IllegalArgumentException("TaskType is not supported.");
+            case PROPAGATION:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list",
+                        PropagationTaskTO[].class, type));
+
+            case NOTIFICATION:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list",
+                        NotificationTaskTO[].class, type));
+
+            case SCHEDULED:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list",
+                        SchedTaskTO[].class, type));
+
+            case SYNCHRONIZATION:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list",
+                        SyncTaskTO[].class, type));
+
+            default:
+                throw new IllegalArgumentException("TaskType is not supported.");
         }
     }
 
     @Override
-    public <T extends TaskTO> List<T> list(TaskType type, int page, int size) {
+    public <T extends TaskTO> List<T> list(final TaskType type, final int page, final int size) {
         switch (type) {
-        case PROPAGATION:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list/{page}/{size}.json",
-                    PropagationTaskTO[].class, type, page, size));
-        case NOTIFICATION:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list/{page}/{size}.json",
-                    NotificationTaskTO[].class, type, page, size));
-        case SCHEDULED:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list/{page}/{size}.json",
-                    SchedTaskTO[].class, type, page, size));
-        case SYNCHRONIZATION:
-            return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl + "task/{type}/list/{page}/{size}.json",
-                    SyncTaskTO[].class, type, page, size));
-        default:
-            throw new IllegalArgumentException("TaskType is not supported :" + type);
+            case PROPAGATION:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl
+                        + "task/{type}/list/{page}/{size}.json",
+                        PropagationTaskTO[].class, type, page, size));
+
+            case NOTIFICATION:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl
+                        + "task/{type}/list/{page}/{size}.json",
+                        NotificationTaskTO[].class, type, page, size));
+
+            case SCHEDULED:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl
+                        + "task/{type}/list/{page}/{size}.json",
+                        SchedTaskTO[].class, type, page, size));
+
+            case SYNCHRONIZATION:
+                return (List<T>) Arrays.asList(getRestTemplate().getForObject(baseUrl
+                        + "task/{type}/list/{page}/{size}.json",
+                        SyncTaskTO[].class, type, page, size));
+
+            default:
+                throw new IllegalArgumentException("TaskType is not supported :" + type);
         }
     }
 
     @Override
-    public List<TaskExecTO> listExecutions(TaskType type) {
-        return Arrays.asList(getRestTemplate()
-                .getForObject(baseUrl + "task/{type}/execution/list", TaskExecTO[].class, type));
+    public List<TaskExecTO> listExecutions(final TaskType type) {
+        return Arrays.asList(getRestTemplate().getForObject(
+                baseUrl + "task/{type}/execution/list", TaskExecTO[].class, type));
     }
 
     @Override
-    public <T extends TaskTO> T read(TaskType type, Long taskId) {
+    public <T extends TaskTO> T read(final TaskType type, final Long taskId) {
         return (T) getRestTemplate().getForObject(baseUrl + "task/read/{taskId}", getTOClass(type), taskId);
     }
 
     @Override
-    public TaskExecTO readExecution(Long executionId) {
+    public TaskExecTO readExecution(final Long executionId) {
         return getRestTemplate().getForObject(baseUrl + "task/execution/read/{taskId}", TaskExecTO.class, executionId);
     }
 
     @Override
-    public TaskExecTO report(Long executionId, PropagationTaskExecStatus status, String message) {
+    public TaskExecTO report(final Long executionId, final PropagationTaskExecStatus status, final String message) {
         return getRestTemplate().getForObject(baseUrl + "task/execution/report/{executionId}"
                 + "?executionStatus={status}&message={message}", TaskExecTO.class, executionId, status, message);
     }
 
     @Override
-    public <T extends TaskTO> T update(Long taskId, T taskTO) {
+    public <T extends TaskTO> T update(final Long taskId, final T taskTO) {
         String path = (taskTO instanceof SyncTaskTO)
                 ? "sync"
                 : (taskTO instanceof SchedTaskTO)
-                        ? "sched"
-                        : null;
-        if (path == null)
+                ? "sched"
+                : null;
+        if (path == null) {
             throw new IllegalArgumentException("Task can only be instance of SchedTaskTO or SyncTaskTO");
+        }
 
         return (T) getRestTemplate().postForObject(baseUrl + "task/update/" + path, taskTO, taskTO.getClass());
     }
 
-    private Class<? extends TaskTO> getTOClass(TaskType type) {
+    private Class<? extends TaskTO> getTOClass(final TaskType type) {
         switch (type) {
-        case PROPAGATION:
-            return PropagationTaskTO.class;
-        case NOTIFICATION:
-            return NotificationTaskTO.class;
-        case SCHEDULED:
-            return SchedTaskTO.class;
-        case SYNCHRONIZATION:
-            return SyncTaskTO.class;
-        default:
-            throw new IllegalArgumentException("SchemaType is not supported: " + type);
+            case PROPAGATION:
+                return PropagationTaskTO.class;
+
+            case NOTIFICATION:
+                return NotificationTaskTO.class;
+
+            case SCHEDULED:
+                return SchedTaskTO.class;
+
+            case SYNCHRONIZATION:
+                return SyncTaskTO.class;
+
+            default:
+                throw new IllegalArgumentException("SchemaType is not supported: " + type);
         }
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserRequestServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserRequestServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserRequestServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserRequestServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.mod.UserMod;
 import org.apache.syncope.client.to.UserRequestTO;
 import org.apache.syncope.client.to.UserTO;
@@ -29,7 +28,7 @@ import org.springframework.web.client.Re
 
 public class UserRequestServiceProxy extends SpringServiceProxy implements UserRequestService {
 
-    public UserRequestServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public UserRequestServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
@@ -39,17 +38,17 @@ public class UserRequestServiceProxy ext
     }
 
     @Override
-    public UserRequestTO create(UserTO userTO) {
+    public UserRequestTO create(final UserTO userTO) {
         return getRestTemplate().postForObject(baseUrl + "user/request/create", userTO, UserRequestTO.class);
     }
 
     @Override
-    public UserRequestTO update(UserMod userMod) {
+    public UserRequestTO update(final UserMod userMod) {
         return getRestTemplate().postForObject(baseUrl + "user/request/update", userMod, UserRequestTO.class);
     }
 
     @Override
-    public UserRequestTO delete(Long userId) {
+    public UserRequestTO delete(final Long userId) {
         return getRestTemplate().getForObject(baseUrl + "user/request/delete/{userId}", UserRequestTO.class, userId);
     }
 
@@ -59,15 +58,14 @@ public class UserRequestServiceProxy ext
     }
 
     @Override
-    public UserRequestTO read(Long requestId) {
-        return getRestTemplate()
-                .getForObject(baseUrl + "user/request/read/{requestId}", UserRequestTO.class, requestId);
+    public UserRequestTO read(final Long requestId) {
+        return getRestTemplate().getForObject(
+                baseUrl + "user/request/read/{requestId}", UserRequestTO.class, requestId);
     }
 
     @Override
-    public UserRequestTO deleteRequest(Long requestId) {
-        return getRestTemplate().getForObject(baseUrl + "user/request/deleteRequest/{requestId}", UserRequestTO.class,
-                requestId);
+    public UserRequestTO deleteRequest(final Long requestId) {
+        return getRestTemplate().getForObject(
+                baseUrl + "user/request/deleteRequest/{requestId}", UserRequestTO.class, requestId);
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/UserServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.mod.StatusMod;
 import org.apache.syncope.client.mod.UserMod;
 import org.apache.syncope.client.search.NodeCond;
@@ -31,12 +30,12 @@ import org.springframework.web.client.Re
 
 public class UserServiceProxy extends SpringServiceProxy implements UserService {
 
-    public UserServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public UserServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public Boolean verifyPassword(String username, String password) {
+    public Boolean verifyPassword(final String username, final String password) {
         return getRestTemplate().getForObject(
                 baseUrl + "user/verifyPassword/{username}.json?password={password}", Boolean.class,
                 username, password);
@@ -53,39 +52,39 @@ public class UserServiceProxy extends Sp
     }
 
     @Override
-    public List<UserTO> list(int page, int size) {
+    public List<UserTO> list(final int page, final int size) {
         return Arrays.asList(getRestTemplate().getForObject(baseUrl + "user/list/{page}/{size}.json",
                 UserTO[].class, page, size));
     }
 
     @Override
-    public UserTO read(Long userId) {
+    public UserTO read(final Long userId) {
         return getRestTemplate().getForObject(baseUrl + "user/read/{userId}.json", UserTO.class, userId);
     }
 
     @Override
-    public UserTO read(String username) {
+    public UserTO read(final String username) {
         return getRestTemplate().getForObject(baseUrl + "user/readByUsername/{username}.json", UserTO.class,
                 username);
     }
 
     @Override
-    public UserTO create(UserTO userTO) {
+    public UserTO create(final UserTO userTO) {
         return getRestTemplate().postForObject(baseUrl + "user/create", userTO, UserTO.class);
     }
 
     @Override
-    public UserTO update(Long userId, UserMod userMod) {
+    public UserTO update(final Long userId, final UserMod userMod) {
         return getRestTemplate().postForObject(baseUrl + "user/update", userMod, UserTO.class);
     }
 
     @Override
-    public UserTO delete(Long userId) {
+    public UserTO delete(final Long userId) {
         return getRestTemplate().getForObject(baseUrl + "user/delete/{userId}", UserTO.class, userId);
     }
 
     @Override
-    public UserTO executeWorkflow(String taskId, UserTO userTO) {
+    public UserTO executeWorkflow(final String taskId, final UserTO userTO) {
         return null;
     }
 
@@ -96,41 +95,41 @@ public class UserServiceProxy extends Sp
     }
 
     @Override
-    public WorkflowFormTO getFormForUser(Long userId) {
+    public WorkflowFormTO getFormForUser(final Long userId) {
         return getRestTemplate().getForObject(baseUrl + "user/workflow/form/{userId}", WorkflowFormTO.class,
                 userId);
     }
 
     @Override
-    public WorkflowFormTO claimForm(String taskId) {
+    public WorkflowFormTO claimForm(final String taskId) {
         return getRestTemplate().getForObject(baseUrl + "user/workflow/form/claim/{taskId}",
                 WorkflowFormTO.class, taskId);
     }
 
     @Override
-    public UserTO submitForm(WorkflowFormTO form) {
+    public UserTO submitForm(final WorkflowFormTO form) {
         return getRestTemplate().postForObject(baseUrl + "user/workflow/form/submit", form, UserTO.class);
     }
 
     @Override
-    public UserTO activate(long userId, String token) {
+    public UserTO activate(final long userId, final String token) {
         return getRestTemplate().getForObject(baseUrl + "user/activate/{userId}?token=" + token, UserTO.class,
                 userId);
     }
 
     @Override
-    public UserTO activateByUsername(String username, String token) {
+    public UserTO activateByUsername(final String username, final String token) {
         return getRestTemplate().getForObject(baseUrl + "user/activateByUsername/{username}.json?token=" + token,
                 UserTO.class, username);
     }
 
     @Override
-    public UserTO suspend(long userId) {
+    public UserTO suspend(final long userId) {
         return getRestTemplate().getForObject(baseUrl + "user/suspend/{userId}", UserTO.class, userId);
     }
 
     @Override
-    public UserTO reactivate(long userId) {
+    public UserTO reactivate(final long userId) {
         return getRestTemplate().getForObject(baseUrl + "user/reactivate/{userId}", UserTO.class, userId);
     }
 
@@ -140,19 +139,19 @@ public class UserServiceProxy extends Sp
     }
 
     @Override
-    public UserTO suspendByUsername(String username) {
+    public UserTO suspendByUsername(final String username) {
         return getRestTemplate().getForObject(baseUrl + "user/suspendByUsername/{username}.json", UserTO.class,
                 username);
     }
 
     @Override
-    public UserTO reactivateByUsername(String username) {
+    public UserTO reactivateByUsername(final String username) {
         return getRestTemplate().getForObject(baseUrl + "user/reactivateByUsername/{username}.json",
                 UserTO.class, username);
     }
 
     @Override
-    public UserTO suspend(long userId, String query) {
+    public UserTO suspend(final long userId, final String query) {
         return getRestTemplate().getForObject(baseUrl + "user/suspend/" + userId + query, UserTO.class);
     }
 
@@ -162,26 +161,25 @@ public class UserServiceProxy extends Sp
     }
 
     @Override
-    public List<UserTO> search(NodeCond searchCondition) {
+    public List<UserTO> search(final NodeCond searchCondition) {
         return Arrays.asList(getRestTemplate().postForObject(baseUrl + "user/search", searchCondition,
                 UserTO[].class));
     }
 
     @Override
-    public List<UserTO> search(NodeCond searchCondition, int page, int size) {
+    public List<UserTO> search(final NodeCond searchCondition, final int page, final int size) {
         return Arrays.asList(getRestTemplate().postForObject(baseUrl + "user/search/{page}/{size}",
                 searchCondition, UserTO[].class, page, size));
     }
 
     @Override
-    public int searchCount(NodeCond searchCondition) {
+    public int searchCount(final NodeCond searchCondition) {
         return getRestTemplate()
                 .postForObject(baseUrl + "user/search/count.json", searchCondition, Integer.class);
     }
 
     @Override
-    public UserTO setStatus(Long userId, StatusMod statusUpdate) {
+    public UserTO setStatus(final Long userId, final StatusMod statusUpdate) {
         return null; // Not used in old REST API
     }
-
 }

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/WorkflowServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/WorkflowServiceProxy.java?rev=1434763&r1=1434762&r2=1434763&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/WorkflowServiceProxy.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/services/proxy/WorkflowServiceProxy.java Thu Jan 17 16:28:57 2013
@@ -20,31 +20,28 @@ package org.apache.syncope.services.prox
 
 import java.util.Arrays;
 import java.util.List;
-
 import org.apache.syncope.client.to.WorkflowDefinitionTO;
 import org.apache.syncope.services.WorkflowService;
 import org.springframework.web.client.RestTemplate;
 
 public class WorkflowServiceProxy extends SpringServiceProxy implements WorkflowService {
 
-    public WorkflowServiceProxy(String baseUrl, RestTemplate restTemplate) {
+    public WorkflowServiceProxy(final String baseUrl, final RestTemplate restTemplate) {
         super(baseUrl, restTemplate);
     }
 
     @Override
-    public WorkflowDefinitionTO getDefinition(String type) {
-        return getRestTemplate()
-                .getForObject(baseUrl + "workflow/definition/" + type, WorkflowDefinitionTO.class);
+    public WorkflowDefinitionTO getDefinition(final String type) {
+        return getRestTemplate().getForObject(baseUrl + "workflow/definition/" + type, WorkflowDefinitionTO.class);
     }
 
     @Override
-    public void updateDefinition(String type, WorkflowDefinitionTO definition) {
+    public void updateDefinition(final String type, final WorkflowDefinitionTO definition) {
         getRestTemplate().put(baseUrl + "workflow/definition/" + type, definition);
     }
 
     @Override
     public List<String> getDefinedTasks(final String type) {
-        return Arrays.asList(getRestTemplate().getForObject(baseUrl + "workflow/tasks/{type}", String.class, type));
+        return Arrays.asList(getRestTemplate().getForObject(baseUrl + "workflow/tasks/{type}", String[].class, type));
     }
-
 }