From 07c5dabcebfde95de3d53ae5487d825afdf8aefe Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Tue, 20 Mar 2012 19:09:12 +0000 Subject: [PATCH] Issue 830: Add mediaList client query methods --- .../director/v1_5/features/QueryAsyncClient.java | 14 ++++++++++++++ .../vcloud/director/v1_5/features/QueryClient.java | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryAsyncClient.java index a00ddeb542..38ec8eba80 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryAsyncClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryAsyncClient.java @@ -204,4 +204,18 @@ public interface QueryAsyncClient { @JAXBResponseParser @ExceptionParser(ThrowVCloudErrorOn4xx.class) ListenableFuture vmsQuery(@QueryParam("filter") String filter); + + @GET + @Path("/mediaList/query") + @Consumes + @JAXBResponseParser + @ExceptionParser(ThrowVCloudErrorOn4xx.class) + ListenableFuture mediaListQueryAll(); + + @GET + @Path("/mediaList/query") + @Consumes + @JAXBResponseParser + @ExceptionParser(ThrowVCloudErrorOn4xx.class) + ListenableFuture mediaListQuery(@QueryParam("filter") String filter); } diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryClient.java index 5baa4091d5..f003f0ec3f 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryClient.java @@ -172,5 +172,19 @@ public interface QueryClient { /** @see #queryAll() */ QueryResultRecords vmsQuery(String filter); + + /** + * Retrieves a list of {@link Medias by using REST API general QueryHandler. + * + *
+    * GET /mediaList/query
+    * 
+ * + * @see #queryAll(String) + */ + QueryResultRecords mediaListQueryAll(); + + /** @see #queryAll() */ + QueryResultRecords mediaListQuery(String filter); }