brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [2/3] brooklyn-server git commit: Restore HTTP annotations to deprecated API methods
Date Fri, 28 Jul 2017 13:55:40 GMT
Restore HTTP annotations to deprecated API methods

The missing annotations meant that brooklyn-client was unable to proxy
the affected classes (since Resteasy expects to work with every method).
I think the simplest way to solve this is to expose the deprecated
methods at .../deprecated.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/635b0c27
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/635b0c27
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/635b0c27

Branch: refs/heads/master
Commit: 635b0c276f137005268dc832c6801bf950a87c21
Parents: 6a27203
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Fri Jul 28 12:49:00 2017 +0100
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Fri Jul 28 12:49:00 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/rest/api/ActivityApi.java  | 10 ++++++++--
 .../java/org/apache/brooklyn/rest/api/EntityApi.java    | 12 +++++++++---
 .../java/org/apache/brooklyn/rest/api/LocationApi.java  |  2 +-
 3 files changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/635b0c27/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ActivityApi.java
----------------------------------------------------------------------
diff --git a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ActivityApi.java b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ActivityApi.java
index b6431d9..a306ac3 100644
--- a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ActivityApi.java
+++ b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ActivityApi.java
@@ -72,10 +72,16 @@ public interface ActivityApi {
             @QueryParam("limit") @DefaultValue("200") int limit,
             @ApiParam(value = "Max depth to traverse, or -1 for all (default)", required
= false) 
             @QueryParam("maxDepth") @DefaultValue("-1") int maxDepth);
-    
+
     /** @deprecated since 0.12.0 use {@link #getAllChildrenAsMap(String, int, int)} with
depth -1 */
+    @GET
+    @Path("/{task}/children/recurse/deprecated")
+    @ApiOperation(
+            value = "Fetch all child tasks details as Map<String,TaskSummary> map key
== Task ID",
+            response = Map.class)
     @Deprecated
-    public Map<String,TaskSummary> getAllChildrenAsMap(String taskId);
+    public Map<String,TaskSummary> getAllChildrenAsMap(
+            @ApiParam(value = "Task ID", required = true) @PathParam("task") String taskId);
 
     @GET
     @Path("/{task}/stream/{streamId}")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/635b0c27/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/EntityApi.java
----------------------------------------------------------------------
diff --git a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/EntityApi.java b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/EntityApi.java
index d0788fa..d475b52 100644
--- a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/EntityApi.java
+++ b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/EntityApi.java
@@ -117,11 +117,17 @@ public interface EntityApi {
             @ApiParam(value = "Whether to include subtasks recursively across different entities
(default false)", required = false)
             @QueryParam("recurse") @DefaultValue("false") Boolean recurse);
 
-    /** @deprecated since 0.12.0 use {@link #listTasks(String, String, Integer, Boolean)}
*/
+    /** @deprecated since 0.12.0 use {@link #listTasks(String, String, int, Boolean)} */
+    @GET
+    @Path("/{entity}/activities/deprecated")
+    @ApiOperation(value = "Fetch list of tasks for this entity")
+    @ApiResponses(value = {
+            @ApiResponse(code = 404, message = "Could not find application or entity")
+    })
     @Deprecated
     public List<TaskSummary> listTasks(
-        String applicationId,
-        String entityId);
+            @ApiParam(value = "Application ID or name", required = true) @PathParam("application")
String applicationId,
+            @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity")
String entityId);
         
     @GET
     @Path("/{entity}/activities/{task}")

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/635b0c27/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/LocationApi.java
----------------------------------------------------------------------
diff --git a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/LocationApi.java b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/LocationApi.java
index ea632d5..8950a56 100644
--- a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/LocationApi.java
+++ b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/LocationApi.java
@@ -49,7 +49,7 @@ import io.swagger.annotations.ApiParam;
 public interface LocationApi {
 
     /**
-     * @deprecated since 0.7.0; use {@link CatalogApi#listLocations(String, String)}
+     * @deprecated since 0.7.0; use {@link CatalogApi#listLocations}
      */
     @GET
     @ApiOperation(value = "Fetch the list of location definitions",


Mime
View raw message