You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by jb...@apache.org on 2013/01/15 16:32:45 UTC
svn commit: r1433457 [2/2] - in /syncope/trunk:
client/src/main/java/org/apache/syncope/services/proxy/
console/src/main/java/org/apache/syncope/console/
console/src/main/java/org/apache/syncope/console/rest/
core/src/test/java/org/apache/syncope/core/...
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java?rev=1433457&r1=1433456&r2=1433457&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java Tue Jan 15 15:32:45 2013
@@ -18,9 +18,10 @@
*/
package org.apache.syncope.console.rest;
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+
import org.apache.syncope.client.to.NotificationTaskTO;
import org.apache.syncope.client.to.PropagationTaskTO;
import org.apache.syncope.client.to.SchedTaskTO;
@@ -28,7 +29,8 @@ import org.apache.syncope.client.to.Sync
import org.apache.syncope.client.to.TaskExecTO;
import org.apache.syncope.client.to.TaskTO;
import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.SyncopeSession;
+import org.apache.syncope.services.TaskService;
+import org.apache.syncope.types.TaskType;
import org.springframework.stereotype.Component;
/**
@@ -37,6 +39,8 @@ import org.springframework.stereotype.Co
@Component
public class TaskRestClient extends BaseRestClient implements ExecutionRestClient {
+ private static final long serialVersionUID = 6284485820911028843L;
+
/**
* Return a list of job classes.
*
@@ -46,8 +50,7 @@ public class TaskRestClient extends Base
List<String> jobClasses = null;
try {
- jobClasses = Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/jobClasses.json", String[].class));
+ jobClasses = new ArrayList<String>(getService(TaskService.class).getJobClasses());
} catch (SyncopeClientCompositeErrorException e) {
LOG.error("While getting all job classes", e);
}
@@ -58,8 +61,7 @@ public class TaskRestClient extends Base
List<String> actions = null;
try {
- actions = Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/syncActionsClasses.json", String[].class));
+ actions = new ArrayList<String>(getService(TaskService.class).getSyncActionsClasses());
} catch (SyncopeClientCompositeErrorException e) {
LOG.error("While getting all sync actions classes", e);
}
@@ -73,8 +75,7 @@ public class TaskRestClient extends Base
* @return number of stored tasks.
*/
public Integer count(final String kind) {
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/{kind}/count.json", Integer.class, kind);
+ return getService(TaskService.class).count(TaskType.fromString(kind));
}
/**
@@ -86,42 +87,34 @@ public class TaskRestClient extends Base
*/
public <T extends TaskTO> List<T> listTasks(final Class<T> reference, final int page, final int size) {
List<T> result = Collections.emptyList();
+ result = getService(TaskService.class).list(getTaskType(reference), page, size);
+ return result;
+ }
- if (PropagationTaskTO.class == reference) {
- result = (List<T>) Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/propagation/list/{page}/{size}.json", PropagationTaskTO[].class, page, size));
- } else if (NotificationTaskTO.class == reference) {
- result = (List<T>) Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/notification/list/{page}/{size}.json", NotificationTaskTO[].class, page, size));
- } else if (SchedTaskTO.class == reference) {
- result = (List<T>) Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/sched/list/{page}/{size}.json", SchedTaskTO[].class, page, size));
- } else if (SyncTaskTO.class == reference) {
- result = (List<T>) Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/sync/list/{page}/{size}.json", SyncTaskTO[].class, page, size));
+ private TaskType getTaskType(Class<?> reference) {
+ TaskType result = null;
+ if (PropagationTaskTO.class.equals(reference)) {
+ result = TaskType.PROPAGATION;
+ } else if (NotificationTaskTO.class.equals(reference)) {
+ result = TaskType.NOTIFICATION;
+ } else if (SchedTaskTO.class.equals(reference)) {
+ result = TaskType.SCHEDULED;
+ } else if (SyncTaskTO.class.equals(reference)) {
+ result = TaskType.SYNCHRONIZATION;
}
-
return result;
}
public PropagationTaskTO readPropagationTask(final Long taskId) {
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/read/{taskId}", PropagationTaskTO.class, taskId);
+ return getService(TaskService.class).read(TaskType.PROPAGATION, taskId);
}
public NotificationTaskTO readNotificationTask(final Long taskId) {
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/read/{taskId}", NotificationTaskTO.class, taskId);
+ return getService(TaskService.class).read(TaskType.NOTIFICATION, taskId);
}
public <T extends SchedTaskTO> T readSchedTask(final Class<T> reference, final Long taskId) {
- if (SyncTaskTO.class.getName().equals(reference.getName())) {
- return (T) SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/read/{taskId}", SyncTaskTO.class, taskId);
- } else {
- return (T) SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/read/{taskId}", SchedTaskTO.class, taskId);
- }
+ return getService(TaskService.class).read(getTaskType(reference), taskId);
}
/**
@@ -131,8 +124,10 @@ public class TaskRestClient extends Base
*/
@Override
public List<TaskExecTO> listExecutions() {
- return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/execution/list", TaskExecTO[].class));
+ throw new UnsupportedOperationException("You need to specify type of executed tasks to be listed");
+// return getService(TaskService.class).listExecutions();
+// Arrays.asList(SyncopeSession.get().getRestTemplate()
+// .getForObject(baseURL + "task/execution/list", TaskExecTO[].class)); FIXME interface?
}
/**
@@ -141,8 +136,7 @@ public class TaskRestClient extends Base
* @param taskId task to delete
*/
public TaskTO delete(final Long taskId, final Class<? extends TaskTO> taskToClass) {
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/delete/{taskId}", taskToClass, taskId);
+ return getService(TaskService.class).delete(getTaskType(taskToClass), taskId);
}
@Override
@@ -156,8 +150,7 @@ public class TaskRestClient extends Base
* @param taskId task id
*/
public void startExecution(final Long taskId, boolean dryRun) {
- SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "task/execute/{taskId}?dryRun={dryRun}", null, TaskExecTO.class, taskId, dryRun);
+ getService(TaskService.class).execute(taskId, dryRun);
}
/**
@@ -167,27 +160,22 @@ public class TaskRestClient extends Base
*/
@Override
public void deleteExecution(final Long taskExecId) {
- SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "task/execution/delete/{execId}", TaskExecTO.class, taskExecId);
+ getService(TaskService.class).deleteExecution(taskExecId);
}
public SyncTaskTO createSyncTask(final SyncTaskTO taskTO) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "task/create/sync", taskTO, SyncTaskTO.class);
+ return getService(TaskService.class).create(taskTO);
}
public SchedTaskTO createSchedTask(final SchedTaskTO taskTO) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "task/create/sched", taskTO, SchedTaskTO.class);
+ return getService(TaskService.class).create(taskTO);
}
public SchedTaskTO updateSchedTask(final SchedTaskTO taskTO) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "task/update/sched", taskTO, SchedTaskTO.class);
+ return getService(TaskService.class).update(taskTO.getId(), taskTO);
}
public SyncTaskTO updateSyncTask(final SyncTaskTO taskTO) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "task/update/sync", taskTO, SyncTaskTO.class);
+ return getService(TaskService.class).update(taskTO.getId(), taskTO);
}
}
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java?rev=1433457&r1=1433456&r2=1433457&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java Tue Jan 15 15:32:45 2013
@@ -18,39 +18,36 @@
*/
package org.apache.syncope.console.rest;
-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;
-import org.apache.syncope.console.SyncopeSession;
+import org.apache.syncope.services.UserRequestService;
import org.springframework.stereotype.Component;
@Component
public class UserRequestRestClient extends BaseRestClient {
+ private static final long serialVersionUID = 171408947099311191L;
+
public List<UserRequestTO> list() {
- return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "user/request/list", UserRequestTO[].class));
+ return getService(UserRequestService.class).list();
}
public UserRequestTO delete(final Long requestId) {
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "user/request/deleteRequest/{requestId}", UserRequestTO.class, requestId);
+ return getService(UserRequestService.class).delete(requestId);
}
public UserRequestTO requestCreate(final UserTO userTO) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "user/request/create", userTO, UserRequestTO.class);
+ return getService(UserRequestService.class).create(userTO);
}
public UserRequestTO requestUpdate(final UserMod userMod) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "user/request/update", userMod, UserRequestTO.class);
+ return getService(UserRequestService.class).update(userMod);
}
public UserRequestTO requestDelete(final Long userId) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "user/request/delete/", userId, UserRequestTO.class);
+ return getService(UserRequestService.class).delete(userId);
}
}
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java?rev=1433457&r1=1433456&r2=1433457&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java Tue Jan 15 15:32:45 2013
@@ -18,15 +18,19 @@
*/
package org.apache.syncope.console.rest;
-import java.util.Arrays;
import java.util.List;
+
+import org.apache.syncope.client.mod.StatusMod;
+import org.apache.syncope.client.mod.StatusMod.Status;
import org.apache.syncope.client.mod.UserMod;
import org.apache.syncope.client.search.NodeCond;
import org.apache.syncope.client.to.ConnObjectTO;
import org.apache.syncope.client.to.UserTO;
import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.SyncopeSession;
import org.apache.syncope.console.commons.StatusBean;
+import org.apache.syncope.services.ResourceService;
+import org.apache.syncope.services.UserService;
+import org.apache.syncope.types.AttributableType;
import org.springframework.stereotype.Component;
/**
@@ -35,9 +39,11 @@ import org.springframework.stereotype.Co
@Component
public class UserRestClient extends AbstractAttributableRestClient {
+ private static final long serialVersionUID = -1575748964398293968L;
+
@Override
public Integer count() {
- return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/count.json", Integer.class);
+ return getService(UserService.class).count();
}
/**
@@ -49,32 +55,26 @@ public class UserRestClient extends Abst
*/
@Override
public List<UserTO> list(final int page, final int size) {
- return Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "user/list/{page}/{size}.json", UserTO[].class, page, size));
+ return getService(UserService.class).list(page, size);
}
- public UserTO create(final UserTO userTO)
- throws SyncopeClientCompositeErrorException {
-
- return SyncopeSession.get().getRestTemplate().postForObject(baseURL + "user/create", userTO, UserTO.class);
+ public UserTO create(final UserTO userTO) throws SyncopeClientCompositeErrorException {
+ return getService(UserService.class).create(userTO);
}
- public UserTO update(UserMod userModTO)
- throws SyncopeClientCompositeErrorException {
-
- return SyncopeSession.get().getRestTemplate().postForObject(baseURL + "user/update", userModTO, UserTO.class);
+ public UserTO update(UserMod userModTO) throws SyncopeClientCompositeErrorException {
+ return getService(UserService.class).update(userModTO.getId(), userModTO);
}
@Override
public UserTO delete(final Long id) {
- return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/delete/{userId}", UserTO.class, id);
+ return getService(UserService.class).delete(id);
}
public UserTO read(final Long id) {
UserTO userTO = null;
try {
- userTO = SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "user/read/{userId}.json", UserTO.class, id);
+ userTO = getService(UserService.class).read(id);
} catch (SyncopeClientCompositeErrorException e) {
LOG.error("While reading a user", e);
}
@@ -84,8 +84,7 @@ public class UserRestClient extends Abst
public UserTO read(final String username) {
UserTO userTO = null;
try {
- userTO = SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "user/readByUsername/{username}.json", UserTO.class, username);
+ userTO = getService(UserService.class).read(username);
} catch (SyncopeClientCompositeErrorException e) {
LOG.error("While reading a user", e);
}
@@ -93,71 +92,60 @@ public class UserRestClient extends Abst
}
public UserTO readProfile() {
- return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/read/self", UserTO.class);
+ return getService(UserService.class).readSelf();
}
@Override
public Integer searchCount(final NodeCond searchCond) {
- return SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "user/search/count.json", searchCond, Integer.class);
+ return getService(UserService.class).searchCount(searchCond);
}
@Override
public List<UserTO> search(final NodeCond searchCond, final int page, final int size)
throws SyncopeClientCompositeErrorException {
-
- return Arrays.asList(SyncopeSession.get().getRestTemplate().postForObject(
- baseURL + "user/search/{page}/{size}", searchCond, UserTO[].class, page, size));
+ return getService(UserService.class).search(searchCond, page, size);
}
@Override
public ConnObjectTO getRemoteObject(final String resourceName, final String objectId)
throws SyncopeClientCompositeErrorException {
-
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "/resource/{resourceName}/read/USER/{objectId}.json",
- ConnObjectTO.class, resourceName, objectId);
+ return getService(ResourceService.class).getConnector(resourceName, AttributableType.USER, objectId);
}
- public UserTO reactivate(long userId, List<StatusBean> statuses)
- throws SyncopeClientCompositeErrorException {
-
+ public UserTO reactivate(long userId, List<StatusBean> statuses) throws SyncopeClientCompositeErrorException {
return enable(userId, statuses, true);
}
- public UserTO suspend(long userId, List<StatusBean> statuses)
- throws SyncopeClientCompositeErrorException {
-
+ public UserTO suspend(long userId, List<StatusBean> statuses) throws SyncopeClientCompositeErrorException {
return enable(userId, statuses, false);
}
private UserTO enable(final long userId, final List<StatusBean> statuses, final boolean enable)
throws SyncopeClientCompositeErrorException {
- final StringBuilder query = new StringBuilder();
+ StatusMod statusMod = new StatusMod();
+ statusMod.setId(userId);
+
+ statusMod.setStatus(enable
+ ? Status.REACTIVATE
+ : Status.SUSPEND);
- query.append(baseURL).append("user/").append(enable
- ? "reactivate/"
- : "suspend/").append(userId).append("?").
- // perform on resource if and only if resources have been speciofied
- append("performRemotely=").append(!statuses.isEmpty()).append("&");
+ // perform on resource if and only if resources have been speciofied
+ statusMod.setUpdateRemote(!statuses.isEmpty());
- boolean performLocal = false;
+ // perform on syncope if and only if it has been requested
+ statusMod.setUpdateInternal(false);
for (StatusBean status : statuses) {
if ((enable && !status.getStatus().isActive()) || (!enable && status.getStatus().isActive())) {
-
if ("Syncope".equals(status.getResourceName())) {
- performLocal = true;
+ statusMod.setUpdateInternal(true);
} else {
- query.append("resourceNames=").append(status.getResourceName()).append("&");
+ statusMod.getExcludeResources().add(status.getResourceName());
}
}
}
- // perform on syncope if and only if it has been requested
- query.append("performLocally=").append(performLocal);
-
- return SyncopeSession.get().getRestTemplate().getForObject(query.toString(), UserTO.class);
+ return getService(UserService.class).setStatus(userId, statusMod);
}
}
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java?rev=1433457&r1=1433456&r2=1433457&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java Tue Jan 15 15:32:45 2013
@@ -18,22 +18,21 @@
*/
package org.apache.syncope.console.rest;
-import org.springframework.stereotype.Component;
import org.apache.syncope.client.to.WorkflowDefinitionTO;
import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.SyncopeSession;
+import org.apache.syncope.services.WorkflowService;
+import org.springframework.stereotype.Component;
@Component
public class WorkflowRestClient extends BaseRestClient {
- public WorkflowDefinitionTO getDefinition()
- throws SyncopeClientCompositeErrorException {
- return SyncopeSession.get().getRestTemplate().getForObject(
- baseURL + "workflow/definition/user.json", WorkflowDefinitionTO.class);
+ private static final long serialVersionUID = 5049285686167071017L;
+
+ public WorkflowDefinitionTO getDefinition() throws SyncopeClientCompositeErrorException {
+ return getService(WorkflowService.class).getDefinition("user");
}
- public void updateDefinition(final WorkflowDefinitionTO workflowDef)
- throws SyncopeClientCompositeErrorException {
- SyncopeSession.get().getRestTemplate().put(baseURL + "workflow/definition/user.json", workflowDef);
+ public void updateDefinition(final WorkflowDefinitionTO workflowDef) throws SyncopeClientCompositeErrorException {
+ getService(WorkflowService.class).updateDefinition("user", workflowDef);
}
}
Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java?rev=1433457&r1=1433456&r2=1433457&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java Tue Jan 15 15:32:45 2013
@@ -50,7 +50,6 @@ import org.apache.syncope.services.proxy
import org.apache.syncope.services.proxy.ResourceServiceProxy;
import org.apache.syncope.services.proxy.RoleServiceProxy;
import org.apache.syncope.services.proxy.SchemaServiceProxy;
-import org.apache.syncope.services.proxy.SpringRestTemplate;
import org.apache.syncope.services.proxy.TaskServiceProxy;
import org.apache.syncope.services.proxy.UserRequestServiceProxy;
import org.apache.syncope.services.proxy.UserServiceProxy;
@@ -66,7 +65,7 @@ import org.springframework.web.client.Re
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:restClientContext.xml", "classpath:testJDBCContext.xml" })
-public abstract class AbstractTest implements SpringRestTemplate {
+public abstract class AbstractTest {
protected static AttributeTO attributeTO(final String schema, final String value) {
AttributeTO attr = new AttributeTO();
@@ -146,25 +145,20 @@ public abstract class AbstractTest imple
@Before
public void resetRestTemplate() {
setupRestTemplate(ADMIN_UID, ADMIN_PWD);
- userService = new UserServiceProxy(BASE_URL, this);
- roleService = new RoleServiceProxy(BASE_URL, this);
- resourceService = new ResourceServiceProxy(BASE_URL, this);
- entitlementService = new EntitlementServiceProxy(BASE_URL, this);
- configurationService = new ConfigurationServiceProxy(BASE_URL, this);
- connectorService = new ConnectorServiceProxy(BASE_URL, this);
- loggerService = new LoggerServiceProxy(BASE_URL, this);
- reportService = new ReportServiceProxy(BASE_URL, this);
- taskService = new TaskServiceProxy(BASE_URL, this);
- policyService = new PolicyServiceProxy(BASE_URL, this);
- workflowService = new WorkflowServiceProxy(BASE_URL, this);
- notificationService = new NotificationServiceProxy(BASE_URL, this);
- schemaService = new SchemaServiceProxy(BASE_URL, this);
- userRequestService = new UserRequestServiceProxy(BASE_URL, this);
- }
-
- @Override
- public RestTemplate getRestTemplate() {
- return restTemplate;
+ userService = new UserServiceProxy(BASE_URL, restTemplate);
+ roleService = new RoleServiceProxy(BASE_URL, restTemplate);
+ resourceService = new ResourceServiceProxy(BASE_URL, restTemplate);
+ entitlementService = new EntitlementServiceProxy(BASE_URL, restTemplate);
+ configurationService = new ConfigurationServiceProxy(BASE_URL, restTemplate);
+ connectorService = new ConnectorServiceProxy(BASE_URL, restTemplate);
+ loggerService = new LoggerServiceProxy(BASE_URL, restTemplate);
+ reportService = new ReportServiceProxy(BASE_URL, restTemplate);
+ taskService = new TaskServiceProxy(BASE_URL, restTemplate);
+ policyService = new PolicyServiceProxy(BASE_URL, restTemplate);
+ workflowService = new WorkflowServiceProxy(BASE_URL, restTemplate);
+ notificationService = new NotificationServiceProxy(BASE_URL, restTemplate);
+ schemaService = new SchemaServiceProxy(BASE_URL, restTemplate);
+ userRequestService = new UserRequestServiceProxy(BASE_URL, restTemplate);
}
}