From 12f2c1c27aa963218630396640b9c572f3d24224 Mon Sep 17 00:00:00 2001 From: chenson42 Date: Thu, 1 Nov 2012 20:03:55 +0000 Subject: [PATCH] start of development of a rest api --- .../symmetric/web/rest/RestService.java | 461 +++++++++--------- .../symmetric/web/rest/RestService2.java | 224 --------- .../symmetric/web/rest/model/Engine.java | 25 +- .../symmetric/web/rest/model/EngineList.java | 25 + .../web/rest/{ => model}/RestError.java | 4 +- 5 files changed, 269 insertions(+), 470 deletions(-) delete mode 100644 symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService2.java create mode 100644 symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/EngineList.java rename symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/{ => model}/RestError.java (92%) diff --git a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService.java b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService.java index 35c9488cc8..34028a510f 100644 --- a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService.java +++ b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService.java @@ -1,236 +1,227 @@ -package org.jumpmind.symmetric.web.rest; - -import java.lang.annotation.Annotation; -import java.util.Set; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -import org.jumpmind.symmetric.ISymmetricEngine; -import org.jumpmind.symmetric.web.SymmetricEngineHolder; -import org.jumpmind.symmetric.web.WebConstants; -import org.jumpmind.symmetric.web.rest.model.ChannelStatus; -import org.jumpmind.symmetric.web.rest.model.Engine; -import org.jumpmind.symmetric.web.rest.model.Identity; -import org.jumpmind.symmetric.web.rest.model.NodeStatus; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.multipart.MultipartFile; - -@Controller -public class RestService { - - @Autowired - ServletContext context; - - /** - * Returns the list of engine names that are configured on the node. - * @return Set<{@link Engine> of engine names configured on the node - */ - @RequestMapping(value = "/engine", method = RequestMethod.GET) - @ResponseBody - public final Set engine() { - //TODO:implement - //return getSymmetricEngineHolder().getEngines().keySet(); - return null; - } - - /** - * Returns the identity for the specified engine on the node. - * @param String engine - * @return {@link Identity} of the engine - */ - @RequestMapping(value = "/engine/{engine}/identity", method = RequestMethod.GET) - @ResponseBody - public final Identity identity(@PathVariable("engine") String engineName) { - //TODO:implement - //ISymmetricEngine engine = getSymmetricEngine(engineName); - //return engine.getNodeService().findIdentityNodeId(); - return null; - } - - /** - * Returns the identity for the single engine on the node. - * If more than one engine exists on the node, service will - * return an HTTP Status Code 405 (Method Not Allowed) - * @return Identity the identity of the engine - */ - @RequestMapping(value = "/engine/identity", method = RequestMethod.GET) - @ResponseBody - public final Identity identity() { - //TODO: implement - return null; - } - - /** - * Loads a profile for the specified engine on the node. - * @param engineName - */ - @RequestMapping(value = "/engines/{engine}/profile", method = RequestMethod.POST) +package org.jumpmind.symmetric.web.rest; + +import java.lang.annotation.Annotation; +import java.util.ArrayList; +import java.util.Set; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; + +import org.jumpmind.symmetric.ISymmetricEngine; +import org.jumpmind.symmetric.web.SymmetricEngineHolder; +import org.jumpmind.symmetric.web.WebConstants; +import org.jumpmind.symmetric.web.rest.model.ChannelStatus; +import org.jumpmind.symmetric.web.rest.model.Engine; +import org.jumpmind.symmetric.web.rest.model.EngineList; +import org.jumpmind.symmetric.web.rest.model.Identity; +import org.jumpmind.symmetric.web.rest.model.NodeStatus; +import org.jumpmind.symmetric.web.rest.model.RestError; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.multipart.MultipartFile; + +@Controller +public class RestService { + + @Autowired + ServletContext context; + + /** + * Returns the list of engine names that are configured on the node. + * @return Set<{@link Engine> of engine names configured on the node + */ + @RequestMapping(value = "/engine", method = RequestMethod.GET) @ResponseBody - //TODO: figure out how we will pass the file info... - public final void loadProfile(@PathVariable("engine") String engineName, @RequestParam MultipartFile file) { - System.out.println("File '" + file.getOriginalFilename() + "' uploaded successfully"); - } - - /** - * Drops SymmetricDS triggers for the specified engine and table on the node. - * @param engineName - * @param tableName - */ - @RequestMapping(value = "/engines/{engine}/tables/{table}/trigger", method = RequestMethod.DELETE) - @ResponseBody - public final void dropTrigger(@PathVariable("engine") String engineName, - @PathVariable("table") String tableName) { - //TODO: Implementation - } - - /** - * Drops all SymmetricDS triggers for the specified engine on the node. - * @param engineName - */ - @RequestMapping(value = "/engines/{engine}/trigger", method = RequestMethod.DELETE) - @ResponseBody - public final void dropTrigger(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Creates SymmetricDS triggers for the specified engine and table on the node. - * @param engineName - * @param tableName - */ - @RequestMapping(value = "engines/{engine}/tables/{table}/trigger", method = RequestMethod.POST) - @ResponseBody - public final void syncTrigger(@PathVariable("engine") String engineName, - @PathVariable("table") String tableName) { - //TODO: Implementation - } - - /** - * Creates SymmetricDS triggers for all configured tables on the specified engine on the node. - * @param engineName - */ - @RequestMapping(value = "/engines/{engine}/trigger", method = RequestMethod.POST) - @ResponseBody - public final void syncTrigger(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Reinitializes the specified engine on the node. This includes: - * - * @param engineName - */ - @RequestMapping(value = "/reinitialize/engines/{engine}", method = RequestMethod.POST) - @ResponseBody - public final void initialize(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Returns an overall status for the specified engine of the node. - * @param engineName - * @return {@link NodeStatus} - */ - @RequestMapping(value = "/engines/{engine}/node/status", method = RequestMethod.GET) - @ResponseBody - public final NodeStatus nodeStatus(@PathVariable("engine") String engineName) { - //TODO: Implementation - return new NodeStatus(); - } - - /** - * Returns status of each channel for the specified engine of the node. - * @param engineName - * @return Set<{@link ChannelStatus}> - */ - @RequestMapping(value = "/engines/{engine}/channel/status", method = RequestMethod.GET) - @ResponseBody - public final Set channelStatus(@PathVariable("engine") String engineName) { - throw new RuntimeException("Test"); - } - - /** - * Uninstalls all SymmetricDS objects from the database for the specified engine of the node. - * @param engineName - */ - @RequestMapping(value = "/engines/{engine}", method = RequestMethod.DELETE) - @ResponseBody - public final void unintstall(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Starts SymmetricDS for the node. - */ - @RequestMapping(value = "/start", method = RequestMethod.POST) - @ResponseBody - public final void start() { - //TODO: Implementation - } - - /** - * Stops SymmetricDS for the node. - */ - @RequestMapping(value = "/stop", method = RequestMethod.POST) - @ResponseBody - public final void stop() { - //TODO: Implementation - } - - /** - * Refreshes the cache for the node. - */ - @RequestMapping(value = "/cache", method = RequestMethod.PUT) - @ResponseBody - public final void refreshCache() { - //TODO: Implementation - } - - //TODO: reloadtable - //TODO: reloadnode - - @ExceptionHandler(Exception.class) - @ResponseBody - public RestError handleError(Exception ex, HttpServletRequest req) { - int httpErrorCode = 500; - Annotation annotation = ex.getClass().getAnnotation(ResponseStatus.class); - if (annotation != null) { - httpErrorCode = ((ResponseStatus)annotation).value().value(); - } - return new RestError(ex, httpErrorCode); - } - - protected SymmetricEngineHolder getSymmetricEngineHolder() { - SymmetricEngineHolder holder = (SymmetricEngineHolder) context - .getAttribute(WebConstants.ATTR_ENGINE_HOLDER); - if (holder == null) { - throw new NotFoundException(); - } - return holder; - } - - protected ISymmetricEngine getSymmetricEngine(String engineName) { - SymmetricEngineHolder holder = getSymmetricEngineHolder(); - ISymmetricEngine engine = holder.getEngines().get(engineName); - if (engine == null) { - throw new NotFoundException(); - } else { - return engine; - } - } - -} + public final EngineList engine() { + //TODO:implement + //return getSymmetricEngineHolder().getEngines().keySet(); + return new EngineList(new Engine("one"), new Engine("two")); + } + + /** + * Returns the identity for the single engine on the node. + * If more than one engine exists on the node, service will + * return an HTTP Status Code 405 (Method Not Allowed) + * @return Identity the identity of the engine + */ + @RequestMapping(value = "/identity", method = RequestMethod.GET) + @ResponseBody + public final Identity identity(@RequestParam("engine") String engineName) { + //TODO:implement + //ISymmetricEngine engine = getSymmetricEngine(engineName); + //return engine.getNodeService().findIdentityNodeId(); + return null; + } + + /** + * Loads a profile for the specified engine on the node. + * @param engineName + */ + @RequestMapping(value = "profile", method = RequestMethod.POST) + @ResponseBody + //TODO: figure out how we will pass the file info... + public final void loadProfile(@RequestParam("engine") String engineName, @RequestParam MultipartFile file) { + System.out.println("File '" + file.getOriginalFilename() + "' uploaded successfully"); + } + + /** + * Drops SymmetricDS triggers for the specified engine and table on the node. + * @param engineName + * @param tableName + */ + @RequestMapping(value = "/tables/{table}/trigger", method = RequestMethod.DELETE) + @ResponseBody + public final void dropTrigger(@RequestParam("engine") String engineName, + @PathVariable("table") String tableName) { + //TODO: Implementation + } + + /** + * Drops all SymmetricDS triggers for the specified engine on the node. + * @param engineName + */ + @RequestMapping(value = "/trigger", method = RequestMethod.DELETE) + @ResponseBody + public final void dropTrigger(@PathVariable("engine") String engineName) { + //TODO: Implementation + } + + /** + * Creates SymmetricDS triggers for the specified engine and table on the node. + * @param engineName + * @param tableName + */ + @RequestMapping(value = "/tables/{table}/trigger", method = RequestMethod.POST) + @ResponseBody + public final void syncTrigger(@RequestParam("engine") String engineName, + @PathVariable("table") String tableName) { + //TODO: Implementation + } + + /** + * Creates SymmetricDS triggers for all configured tables on the specified engine on the node. + * @param engineName + */ + @RequestMapping(value = "/trigger", method = RequestMethod.POST) + @ResponseBody + public final void syncTrigger(@RequestParam("engine") String engineName) { + //TODO: Implementation + } + + /** + * Reinitializes the specified engine on the node. This includes: + *
    + *
  • Uninstalling all SymmetricDS objects from the database
  • + *
  • Reregistering the node
  • + *
  • Initial load (if configured)
  • + *
  • Reverse initial load (if configured)
  • + *
+ * @param engineName + */ + @RequestMapping(value = "/reinitialize/engines/{engine}", method = RequestMethod.POST) + @ResponseBody + public final void initialize(@PathVariable("engine") String engineName) { + //TODO: Implementation + } + + /** + * Returns an overall status for the specified engine of the node. + * @param engineName + * @return {@link NodeStatus} + */ + @RequestMapping(value = "/engines/{engine}/node/status", method = RequestMethod.GET) + @ResponseBody + public final NodeStatus nodeStatus(@PathVariable("engine") String engineName) { + //TODO: Implementation + return new NodeStatus(); + } + + /** + * Returns status of each channel for the specified engine of the node. + * @param engineName + * @return Set<{@link ChannelStatus}> + */ + @RequestMapping(value = "/engines/{engine}/channel/status", method = RequestMethod.GET) + @ResponseBody + public final Set channelStatus(@PathVariable("engine") String engineName) { + throw new RuntimeException("Test"); + } + + /** + * Uninstalls all SymmetricDS objects from the database for the specified engine of the node. + * @param engineName + */ + @RequestMapping(value = "/engines/{engine}", method = RequestMethod.DELETE) + @ResponseBody + public final void unintstall(@PathVariable("engine") String engineName) { + //TODO: Implementation + } + + /** + * Starts SymmetricDS for the node. + */ + @RequestMapping(value = "/start", method = RequestMethod.POST) + @ResponseBody + public final void start() { + //TODO: Implementation + } + + /** + * Stops SymmetricDS for the node. + */ + @RequestMapping(value = "/stop", method = RequestMethod.POST) + @ResponseBody + public final void stop() { + //TODO: Implementation + } + + /** + * Refreshes the cache for the node. + */ + @RequestMapping(value = "/cache", method = RequestMethod.PUT) + @ResponseBody + public final void refreshCache() { + //TODO: Implementation + } + + //TODO: reloadtable + //TODO: reloadnode + + @ExceptionHandler(Exception.class) + @ResponseBody + public RestError handleError(Exception ex, HttpServletRequest req) { + int httpErrorCode = 500; + Annotation annotation = ex.getClass().getAnnotation(ResponseStatus.class); + if (annotation != null) { + httpErrorCode = ((ResponseStatus)annotation).value().value(); + } + return new RestError(ex, httpErrorCode); + } + + protected SymmetricEngineHolder getSymmetricEngineHolder() { + SymmetricEngineHolder holder = (SymmetricEngineHolder) context + .getAttribute(WebConstants.ATTR_ENGINE_HOLDER); + if (holder == null) { + throw new NotFoundException(); + } + return holder; + } + + protected ISymmetricEngine getSymmetricEngine(String engineName) { + SymmetricEngineHolder holder = getSymmetricEngineHolder(); + ISymmetricEngine engine = holder.getEngines().get(engineName); + if (engine == null) { + throw new NotFoundException(); + } else { + return engine; + } + } + +} diff --git a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService2.java b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService2.java deleted file mode 100644 index a3b1fa9946..0000000000 --- a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestService2.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.jumpmind.symmetric.web.rest; - -import java.lang.annotation.Annotation; -import java.util.Set; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -import org.jumpmind.symmetric.ISymmetricEngine; -import org.jumpmind.symmetric.web.SymmetricEngineHolder; -import org.jumpmind.symmetric.web.WebConstants; -import org.jumpmind.symmetric.web.rest.model.ChannelStatus; -import org.jumpmind.symmetric.web.rest.model.Engine; -import org.jumpmind.symmetric.web.rest.model.Identity; -import org.jumpmind.symmetric.web.rest.model.NodeStatus; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.multipart.MultipartFile; - -@Controller -public class RestService2 { - - @Autowired - ServletContext context; - - /** - * Returns the list of engine names that are configured on the node. - * @return Set<{@link Engine> of engine names configured on the node - */ - @RequestMapping(value = "/engine", method = RequestMethod.GET) - @ResponseBody - public final Set engine() { - //TODO:implement - //return getSymmetricEngineHolder().getEngines().keySet(); - return null; - } - - /** - * Returns the identity for the single engine on the node. - * If more than one engine exists on the node, service will - * return an HTTP Status Code 405 (Method Not Allowed) - * @return Identity the identity of the engine - */ - @RequestMapping(value = "/identity", method = RequestMethod.GET) - @ResponseBody - public final Identity identity(@RequestParam("engine") String engineName) { - //TODO:implement - //ISymmetricEngine engine = getSymmetricEngine(engineName); - //return engine.getNodeService().findIdentityNodeId(); - return null; - } - - /** - * Loads a profile for the specified engine on the node. - * @param engineName - */ - @RequestMapping(value = "profile", method = RequestMethod.POST) - @ResponseBody - //TODO: figure out how we will pass the file info... - public final void loadProfile(@RequestParam("engine") String engineName, @RequestParam MultipartFile file) { - System.out.println("File '" + file.getOriginalFilename() + "' uploaded successfully"); - } - - /** - * Drops SymmetricDS triggers for the specified engine and table on the node. - * @param engineName - * @param tableName - */ - @RequestMapping(value = "/tables/{table}/trigger", method = RequestMethod.DELETE) - @ResponseBody - public final void dropTrigger(@RequestParam("engine") String engineName, - @PathVariable("table") String tableName) { - //TODO: Implementation - } - - /** - * Drops all SymmetricDS triggers for the specified engine on the node. - * @param engineName - */ - @RequestMapping(value = "/trigger", method = RequestMethod.DELETE) - @ResponseBody - public final void dropTrigger(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Creates SymmetricDS triggers for the specified engine and table on the node. - * @param engineName - * @param tableName - */ - @RequestMapping(value = "/tables/{table}/trigger", method = RequestMethod.POST) - @ResponseBody - public final void syncTrigger(@RequestParam("engine") String engineName, - @PathVariable("table") String tableName) { - //TODO: Implementation - } - - /** - * Creates SymmetricDS triggers for all configured tables on the specified engine on the node. - * @param engineName - */ - @RequestMapping(value = "/trigger", method = RequestMethod.POST) - @ResponseBody - public final void syncTrigger(@RequestParam("engine") String engineName) { - //TODO: Implementation - } - - /** - * Reinitializes the specified engine on the node. This includes: - *
    - *
  • Uninstalling all SymmetricDS objects from the database
  • - *
  • Reregistering the node
  • - *
  • Initial load (if configured)
  • - *
  • Reverse initial load (if configured)
  • - *
- * @param engineName - */ - @RequestMapping(value = "/reinitialize/engines/{engine}", method = RequestMethod.POST) - @ResponseBody - public final void initialize(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Returns an overall status for the specified engine of the node. - * @param engineName - * @return {@link NodeStatus} - */ - @RequestMapping(value = "/engines/{engine}/node/status", method = RequestMethod.GET) - @ResponseBody - public final NodeStatus nodeStatus(@PathVariable("engine") String engineName) { - //TODO: Implementation - return new NodeStatus(); - } - - /** - * Returns status of each channel for the specified engine of the node. - * @param engineName - * @return Set<{@link ChannelStatus}> - */ - @RequestMapping(value = "/engines/{engine}/channel/status", method = RequestMethod.GET) - @ResponseBody - public final Set channelStatus(@PathVariable("engine") String engineName) { - throw new RuntimeException("Test"); - } - - /** - * Uninstalls all SymmetricDS objects from the database for the specified engine of the node. - * @param engineName - */ - @RequestMapping(value = "/engines/{engine}", method = RequestMethod.DELETE) - @ResponseBody - public final void unintstall(@PathVariable("engine") String engineName) { - //TODO: Implementation - } - - /** - * Starts SymmetricDS for the node. - */ - @RequestMapping(value = "/start", method = RequestMethod.POST) - @ResponseBody - public final void start() { - //TODO: Implementation - } - - /** - * Stops SymmetricDS for the node. - */ - @RequestMapping(value = "/stop", method = RequestMethod.POST) - @ResponseBody - public final void stop() { - //TODO: Implementation - } - - /** - * Refreshes the cache for the node. - */ - @RequestMapping(value = "/cache", method = RequestMethod.PUT) - @ResponseBody - public final void refreshCache() { - //TODO: Implementation - } - - //TODO: reloadtable - //TODO: reloadnode - - @ExceptionHandler(Exception.class) - @ResponseBody - public RestError handleError(Exception ex, HttpServletRequest req) { - int httpErrorCode = 500; - Annotation annotation = ex.getClass().getAnnotation(ResponseStatus.class); - if (annotation != null) { - httpErrorCode = ((ResponseStatus)annotation).value().value(); - } - return new RestError(ex, httpErrorCode); - } - - protected SymmetricEngineHolder getSymmetricEngineHolder() { - SymmetricEngineHolder holder = (SymmetricEngineHolder) context - .getAttribute(WebConstants.ATTR_ENGINE_HOLDER); - if (holder == null) { - throw new NotFoundException(); - } - return holder; - } - - protected ISymmetricEngine getSymmetricEngine(String engineName) { - SymmetricEngineHolder holder = getSymmetricEngineHolder(); - ISymmetricEngine engine = holder.getEngines().get(engineName); - if (engine == null) { - throw new NotFoundException(); - } else { - return engine; - } - } - -} diff --git a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/Engine.java b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/Engine.java index cfa9f2e060..7fb469de9f 100644 --- a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/Engine.java +++ b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/Engine.java @@ -5,15 +5,22 @@ @XmlRootElement public class Engine { - private String Name; + private String name; - public String getName() { - return Name; - } + public Engine(String name) { + setName(name); + } + + public Engine() { + + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } - public void setName(String name) { - Name = name; - } - - } diff --git a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/EngineList.java b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/EngineList.java new file mode 100644 index 0000000000..42ec2d5f78 --- /dev/null +++ b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/EngineList.java @@ -0,0 +1,25 @@ +package org.jumpmind.symmetric.web.rest.model; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "enginelist") +public class EngineList { + + Engine[] engines; + + public EngineList(Engine... engines) { + this.engines = engines; + } + + public EngineList() { + + } + + public void setEngines(Engine[] engines) { + this.engines = engines; + } + + public Engine[] getEngines() { + return engines; + } +} diff --git a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestError.java b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/RestError.java similarity index 92% rename from symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestError.java rename to symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/RestError.java index 3f67eec727..5002da75c3 100644 --- a/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/RestError.java +++ b/symmetric-server/src/main/java/org/jumpmind/symmetric/web/rest/model/RestError.java @@ -1,10 +1,10 @@ -package org.jumpmind.symmetric.web.rest; +package org.jumpmind.symmetric.web.rest.model; import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.lang.exception.ExceptionUtils; -@XmlRootElement +@XmlRootElement(name="error") public class RestError { protected String message;