issue 1184 add named for Atmos commands

This commit is contained in:
adriancole 2013-02-02 18:12:49 -08:00
parent 267069755e
commit 8c327f036b
1 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@ package org.jclouds.atmos;
import java.net.URI; import java.net.URI;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -83,6 +84,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#listDirectories * @see AtmosClient#listDirectories
*/ */
@Named("ListDirectory")
@GET @GET
@ResponseParser(ParseDirectoryListFromContentAndHeaders.class) @ResponseParser(ParseDirectoryListFromContentAndHeaders.class)
@Consumes(MediaType.TEXT_XML) @Consumes(MediaType.TEXT_XML)
@ -91,6 +93,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#listDirectory * @see AtmosClient#listDirectory
*/ */
@Named("ListDirectory")
@GET @GET
@Path("/{directoryName}/") @Path("/{directoryName}/")
@ResponseParser(ParseDirectoryListFromContentAndHeaders.class) @ResponseParser(ParseDirectoryListFromContentAndHeaders.class)
@ -102,6 +105,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#createDirectory * @see AtmosClient#createDirectory
*/ */
@Named("CreateDirectory")
@POST @POST
@Path("/{directoryName}/") @Path("/{directoryName}/")
@Fallback(EndpointIfAlreadyExists.class) @Fallback(EndpointIfAlreadyExists.class)
@ -112,6 +116,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#createFile * @see AtmosClient#createFile
*/ */
@Named("CreateObject")
@POST @POST
@Path("/{parent}/{name}") @Path("/{parent}/{name}")
@Consumes(MediaType.WILDCARD) @Consumes(MediaType.WILDCARD)
@ -123,6 +128,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#updateFile * @see AtmosClient#updateFile
*/ */
@Named("UpdateObject")
@PUT @PUT
@Path("/{parent}/{name}") @Path("/{parent}/{name}")
@Fallback(ThrowKeyNotFoundOn404.class) @Fallback(ThrowKeyNotFoundOn404.class)
@ -135,6 +141,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#readFile * @see AtmosClient#readFile
*/ */
@Named("ReadObject")
@GET @GET
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
@Fallback(NullOnNotFoundOr404.class) @Fallback(NullOnNotFoundOr404.class)
@ -145,6 +152,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#headFile * @see AtmosClient#headFile
*/ */
@Named("GetObjectMetadata")
@HEAD @HEAD
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
@Fallback(NullOnNotFoundOr404.class) @Fallback(NullOnNotFoundOr404.class)
@ -155,6 +163,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#getSystemMetadata * @see AtmosClient#getSystemMetadata
*/ */
@Named("GetSystemMetadata")
@HEAD @HEAD
@ResponseParser(ParseSystemMetadataFromHeaders.class) @ResponseParser(ParseSystemMetadataFromHeaders.class)
@Fallback(NullOnNotFoundOr404.class) @Fallback(NullOnNotFoundOr404.class)
@ -166,6 +175,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#getUserMetadata * @see AtmosClient#getUserMetadata
*/ */
@Named("GetUserMetadata")
@HEAD @HEAD
@ResponseParser(ParseUserMetadataFromHeaders.class) @ResponseParser(ParseUserMetadataFromHeaders.class)
@Fallback(NullOnNotFoundOr404.class) @Fallback(NullOnNotFoundOr404.class)
@ -177,6 +187,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#deletePath * @see AtmosClient#deletePath
*/ */
@Named("DeleteObject")
@DELETE @DELETE
@Fallback(VoidOnNotFoundOr404.class) @Fallback(VoidOnNotFoundOr404.class)
@Path("/{path}") @Path("/{path}")
@ -186,6 +197,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#pathExists * @see AtmosClient#pathExists
*/ */
@Named("GetObjectMetadata")
@HEAD @HEAD
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)
@Path("/{path}") @Path("/{path}")
@ -195,6 +207,7 @@ public interface AtmosAsyncClient {
/** /**
* @see AtmosClient#isPublic * @see AtmosClient#isPublic
*/ */
@Named("GetObjectMetadata")
@HEAD @HEAD
@ResponseParser(ReturnTrueIfGroupACLIsOtherRead.class) @ResponseParser(ReturnTrueIfGroupACLIsOtherRead.class)
@Path("/{path}") @Path("/{path}")