mirror of https://github.com/apache/jclouds.git
@Named annotations in all async api methods for Rackspace.
This commit is contained in:
parent
fe220e5105
commit
11e6eb02ed
|
@ -22,6 +22,7 @@ import java.net.URI;
|
|||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -71,6 +72,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#listCDNContainers
|
||||
*/
|
||||
@Named("cdn:listcontainers")
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "format", values = "json")
|
||||
|
@ -81,6 +83,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#getCDNMetadata
|
||||
*/
|
||||
@Named("cdn:getmetadata")
|
||||
@HEAD
|
||||
@ResponseParser(ParseContainerCDNMetadataFromHeaders.class)
|
||||
@Fallback(NullOnContainerNotFound.class)
|
||||
|
@ -91,6 +94,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#enableCDN(String, long, boolean);
|
||||
*/
|
||||
@Named("cdn:enable")
|
||||
@PUT
|
||||
@Path("/{container}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||
|
@ -103,6 +107,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#enableCDN(String, long);
|
||||
*/
|
||||
@Named("cdn:enable")
|
||||
@PUT
|
||||
@Path("/{container}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||
|
@ -114,6 +119,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#enableCDN(String)
|
||||
*/
|
||||
@Named("cdn:enable")
|
||||
@PUT
|
||||
@Path("/{container}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||
|
@ -124,6 +130,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#updateCDN(long, boolean)
|
||||
*/
|
||||
@Named("cdn:update")
|
||||
@POST
|
||||
@Path("/{container}")
|
||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||
|
@ -135,6 +142,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#updateCDN(boolean)
|
||||
*/
|
||||
@Named("cdn:update")
|
||||
@POST
|
||||
@Path("/{container}")
|
||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||
|
@ -145,6 +153,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#updateCDN(long)
|
||||
*/
|
||||
@Named("cdn:update")
|
||||
@POST
|
||||
@Path("/{container}")
|
||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||
|
@ -155,6 +164,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#disableCDN
|
||||
*/
|
||||
@Named("cdn:disable")
|
||||
@POST
|
||||
@Path("/{container}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "False")
|
||||
|
@ -164,6 +174,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#purgeCDNObject(String, String, Iterable)
|
||||
*/
|
||||
@Named("cdn:purgeobject")
|
||||
@DELETE
|
||||
@Path("/{container}/{object}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_CONTAINER_PURGE_OBJECT_EMAIL, values = "{email}")
|
||||
|
@ -175,6 +186,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#purgeCDNObject(String, String)
|
||||
*/
|
||||
@Named("cdn:purgeobject")
|
||||
@DELETE
|
||||
@Path("/{container}/{object}")
|
||||
@Endpoint(CDNManagement.class)
|
||||
|
@ -184,6 +196,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#setCDNStaticWebsiteIndex
|
||||
*/
|
||||
@Named("cdn:setstaticwebsiteindex")
|
||||
@POST
|
||||
@Path("/{container}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_WEBSITE_INDEX, values = "{index}")
|
||||
|
@ -193,6 +206,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||
/**
|
||||
* @see CloudFilesClient#setCDNStaticWebsiteError
|
||||
*/
|
||||
@Named("cdn:setstaticwebsiteerror")
|
||||
@POST
|
||||
@Path("/{container}")
|
||||
@Headers(keys = CloudFilesHeaders.CDN_WEBSITE_ERROR, values = "{error}")
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudidentity.v2_0;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
|
@ -48,6 +49,7 @@ public interface CloudIdentityAuthenticationAsyncApi extends AuthenticationAsync
|
|||
/**
|
||||
* @see CloudIdentityAuthenticationAsyncApi#authenticateWithTenantNameAndCredentials(String,ApiKeyCredentials)
|
||||
*/
|
||||
@Named("auth:tenantnameandcreds")
|
||||
@POST
|
||||
@SelectJson("access")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -59,6 +61,7 @@ public interface CloudIdentityAuthenticationAsyncApi extends AuthenticationAsync
|
|||
/**
|
||||
* @see CloudIdentityAuthenticationAsyncApi#authenticateWithTenantIdAndCredentials(String,ApiKeyCredentials)
|
||||
*/
|
||||
@Named("auth:tenantidandcreds")
|
||||
@POST
|
||||
@SelectJson("access")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudloadbalancers.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -53,6 +54,7 @@ public interface AccessRuleAsyncApi {
|
|||
/**
|
||||
* @see AccessRuleApi#create(Iterable)
|
||||
*/
|
||||
@Named("accessrule:create")
|
||||
@POST
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Fallback(VoidOnNotFoundOr404.class)
|
||||
|
@ -62,6 +64,7 @@ public interface AccessRuleAsyncApi {
|
|||
/**
|
||||
* @see AccessRuleApi#list()
|
||||
*/
|
||||
@Named("accessrule:list")
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Fallback(EmptyPagedIterableOnNotFoundOr404.class)
|
||||
|
@ -72,6 +75,7 @@ public interface AccessRuleAsyncApi {
|
|||
/**
|
||||
* @see AccessRuleApi#remove(int)
|
||||
*/
|
||||
@Named("accessrule:remove")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Path("/accesslist/{id}")
|
||||
|
@ -81,6 +85,7 @@ public interface AccessRuleAsyncApi {
|
|||
/**
|
||||
* @see AccessRuleApi#remove(Iterable)
|
||||
*/
|
||||
@Named("accessrule:remove")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Path("/accesslist")
|
||||
|
@ -90,6 +95,7 @@ public interface AccessRuleAsyncApi {
|
|||
/**
|
||||
* @see AccessRuleApi#removeAll()
|
||||
*/
|
||||
@Named("accessrule:remove")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Path("/accesslist")
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.jclouds.rackspace.cloudloadbalancers.features;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -73,6 +74,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#create(LoadBalancerRequest)
|
||||
*/
|
||||
@Named("lb:create")
|
||||
@POST
|
||||
@ResponseParser(ParseLoadBalancer.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -83,6 +85,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#update(int, LoadBalancerAttributes)
|
||||
*/
|
||||
@Named("lb:update")
|
||||
@PUT
|
||||
@ResponseParser(ParseLoadBalancer.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -92,6 +95,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#list()
|
||||
*/
|
||||
@Named("lb:list")
|
||||
@GET
|
||||
@ResponseParser(ParseLoadBalancers.class)
|
||||
@Transform(ParseLoadBalancers.ToPagedIterable.class)
|
||||
|
@ -103,6 +107,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#list(PaginationOptions)
|
||||
*/
|
||||
@Named("lb:list")
|
||||
@GET
|
||||
@ResponseParser(ParseLoadBalancers.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -113,6 +118,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#get(int)
|
||||
*/
|
||||
@Named("lb:get")
|
||||
@GET
|
||||
@ResponseParser(ParseLoadBalancer.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -123,6 +129,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#remove(int)
|
||||
*/
|
||||
@Named("lb:remove")
|
||||
@DELETE
|
||||
@Fallback(VoidOnNotFoundOr404.class)
|
||||
@Path("/loadbalancers/{id}")
|
||||
|
@ -132,6 +139,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#createMetadata(int, Iterable)
|
||||
*/
|
||||
@Named("lb:createmetadata")
|
||||
@POST
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ResponseParser(ParseMetadata.class)
|
||||
|
@ -144,6 +152,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#getMetadata(int)
|
||||
*/
|
||||
@Named("lb:getmetadata")
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ResponseParser(ParseMetadata.class)
|
||||
|
@ -154,6 +163,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#updateMetadatum(int, int, String)
|
||||
*/
|
||||
@Named("lb:updatemetadatum")
|
||||
@PUT
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Consumes("*/*")
|
||||
|
@ -167,6 +177,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#removeMetadatum(int, int)
|
||||
*/
|
||||
@Named("lb:removemetadatum")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Consumes("*/*")
|
||||
|
@ -176,6 +187,7 @@ public interface LoadBalancerAsyncApi {
|
|||
/**
|
||||
* @see LoadBalancerApi#removeMetadata(int, Iterable)
|
||||
*/
|
||||
@Named("lb:removemetadata")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Consumes("*/*")
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.jclouds.rackspace.cloudloadbalancers.features;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -76,6 +77,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#add(Set)
|
||||
*/
|
||||
@Named("node:add")
|
||||
@POST
|
||||
@SelectJson("nodes")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -86,6 +88,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#update(int, NodeAttributes)
|
||||
*/
|
||||
@Named("node:update")
|
||||
@PUT
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Path("/nodes/{id}")
|
||||
|
@ -94,6 +97,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#list()
|
||||
*/
|
||||
@Named("node:list")
|
||||
@GET
|
||||
@ResponseParser(ParseNodes.class)
|
||||
@Transform(ParseNodes.ToPagedIterable.class)
|
||||
|
@ -105,6 +109,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#list(PaginationOptions)
|
||||
*/
|
||||
@Named("node:list")
|
||||
@GET
|
||||
@ResponseParser(ParseNodes.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
|
@ -115,6 +120,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#get(int)
|
||||
*/
|
||||
@Named("node:get")
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ResponseParser(ParseNode.class)
|
||||
|
@ -125,6 +131,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#remove(int)
|
||||
*/
|
||||
@Named("node:remove")
|
||||
@DELETE
|
||||
@Path("/nodes/{id}")
|
||||
@Fallback(VoidOnNotFoundOr404.class)
|
||||
|
@ -134,6 +141,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#remove(Set)
|
||||
*/
|
||||
@Named("node:remove")
|
||||
@DELETE
|
||||
@Path("/nodes")
|
||||
@Fallback(VoidOnNotFoundOr404.class)
|
||||
|
@ -143,6 +151,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#createMetadata(int, Iterable)
|
||||
*/
|
||||
@Named("node:createmetadata")
|
||||
@POST
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ResponseParser(ParseMetadata.class)
|
||||
|
@ -155,6 +164,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#getMetadata(int)
|
||||
*/
|
||||
@Named("node:getmetadata")
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ResponseParser(ParseMetadata.class)
|
||||
|
@ -165,6 +175,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#updateMetadatum(int, int, String)
|
||||
*/
|
||||
@Named("node:updatemetadatum")
|
||||
@PUT
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Consumes("*/*")
|
||||
|
@ -178,6 +189,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#removeMetadatum(int, int)
|
||||
*/
|
||||
@Named("node:removemetadatum")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Consumes("*/*")
|
||||
|
@ -187,6 +199,7 @@ public interface NodeAsyncApi {
|
|||
/**
|
||||
* @see NodeApi#removeMetadata(int, Iterable)
|
||||
*/
|
||||
@Named("node:removemetadata")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Consumes("*/*")
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudloadbalancers.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -54,6 +55,7 @@ public interface VirtualIPAsyncApi {
|
|||
/**
|
||||
* @see VirtualIPApi#create(VirtualIP)
|
||||
*/
|
||||
@Named("virtualip:create")
|
||||
@POST
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
|
@ -63,6 +65,7 @@ public interface VirtualIPAsyncApi {
|
|||
/**
|
||||
* @see VirtualIPApi#list()
|
||||
*/
|
||||
@Named("virtualip:list")
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Fallback(EmptyPagedIterableOnNotFoundOr404.class)
|
||||
|
@ -73,6 +76,7 @@ public interface VirtualIPAsyncApi {
|
|||
/**
|
||||
* @see VirtualIPApi#remove(int)
|
||||
*/
|
||||
@Named("virtualip:remove")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Path("/virtualips/{id}")
|
||||
|
@ -82,6 +86,7 @@ public interface VirtualIPAsyncApi {
|
|||
/**
|
||||
* @see VirtualIPApi#remove(Iterable)
|
||||
*/
|
||||
@Named("virtualip:remove")
|
||||
@DELETE
|
||||
@Fallback(FalseOnNotFoundOr404.class)
|
||||
@Path("/virtualips")
|
||||
|
|
Loading…
Reference in New Issue