mirror of
https://github.com/apache/jclouds.git
synced 2025-02-17 23:46:13 +00:00
Merge pull request #1295 from jclouds/issue1184-swift
normalize command names for all swift derivatives
This commit is contained in:
commit
d1088cd958
@ -72,7 +72,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#listCDNContainers
|
* @see CloudFilesClient#listCDNContainers
|
||||||
*/
|
*/
|
||||||
@Named("cdn:listcontainers")
|
@Named("ListCDNEnabledContainers")
|
||||||
@GET
|
@GET
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@QueryParams(keys = "format", values = "json")
|
@QueryParams(keys = "format", values = "json")
|
||||||
@ -83,7 +83,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#getCDNMetadata
|
* @see CloudFilesClient#getCDNMetadata
|
||||||
*/
|
*/
|
||||||
@Named("cdn:getmetadata")
|
@Named("ListCDNEnabledContainerMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@ResponseParser(ParseContainerCDNMetadataFromHeaders.class)
|
@ResponseParser(ParseContainerCDNMetadataFromHeaders.class)
|
||||||
@Fallback(NullOnContainerNotFound.class)
|
@Fallback(NullOnContainerNotFound.class)
|
||||||
@ -94,7 +94,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#enableCDN(String, long, boolean);
|
* @see CloudFilesClient#enableCDN(String, long, boolean);
|
||||||
*/
|
*/
|
||||||
@Named("cdn:enable")
|
@Named("CDNEnableContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||||
@ -107,7 +107,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#enableCDN(String, long);
|
* @see CloudFilesClient#enableCDN(String, long);
|
||||||
*/
|
*/
|
||||||
@Named("cdn:enable")
|
@Named("CDNEnableContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||||
@ -119,7 +119,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#enableCDN(String)
|
* @see CloudFilesClient#enableCDN(String)
|
||||||
*/
|
*/
|
||||||
@Named("cdn:enable")
|
@Named("CDNEnableContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||||
@ -130,7 +130,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#updateCDN(long, boolean)
|
* @see CloudFilesClient#updateCDN(long, boolean)
|
||||||
*/
|
*/
|
||||||
@Named("cdn:update")
|
@Named("UpdateCDNEnabledContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||||
@ -142,7 +142,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#updateCDN(boolean)
|
* @see CloudFilesClient#updateCDN(boolean)
|
||||||
*/
|
*/
|
||||||
@Named("cdn:update")
|
@Named("UpdateCDNEnabledContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||||
@ -153,7 +153,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#updateCDN(long)
|
* @see CloudFilesClient#updateCDN(long)
|
||||||
*/
|
*/
|
||||||
@Named("cdn:update")
|
@Named("UpdateCDNEnabledContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||||
@ -164,7 +164,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#disableCDN
|
* @see CloudFilesClient#disableCDN
|
||||||
*/
|
*/
|
||||||
@Named("cdn:disable")
|
@Named("DisableCDNEnabledContainer")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "False")
|
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "False")
|
||||||
@ -174,7 +174,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#purgeCDNObject(String, String, Iterable)
|
* @see CloudFilesClient#purgeCDNObject(String, String, Iterable)
|
||||||
*/
|
*/
|
||||||
@Named("cdn:purgeobject")
|
@Named("PurgeCDNEnabledObject")
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{container}/{object}")
|
@Path("/{container}/{object}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_CONTAINER_PURGE_OBJECT_EMAIL, values = "{email}")
|
@Headers(keys = CloudFilesHeaders.CDN_CONTAINER_PURGE_OBJECT_EMAIL, values = "{email}")
|
||||||
@ -186,7 +186,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#purgeCDNObject(String, String)
|
* @see CloudFilesClient#purgeCDNObject(String, String)
|
||||||
*/
|
*/
|
||||||
@Named("cdn:purgeobject")
|
@Named("PurgeCDNEnabledObject")
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{container}/{object}")
|
@Path("/{container}/{object}")
|
||||||
@Endpoint(CDNManagement.class)
|
@Endpoint(CDNManagement.class)
|
||||||
@ -196,7 +196,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#setCDNStaticWebsiteIndex
|
* @see CloudFilesClient#setCDNStaticWebsiteIndex
|
||||||
*/
|
*/
|
||||||
@Named("cdn:setstaticwebsiteindex")
|
@Named("UpdateCDNEnabledContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_WEBSITE_INDEX, values = "{index}")
|
@Headers(keys = CloudFilesHeaders.CDN_WEBSITE_INDEX, values = "{index}")
|
||||||
@ -206,7 +206,7 @@ public interface CloudFilesAsyncClient extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CloudFilesClient#setCDNStaticWebsiteError
|
* @see CloudFilesClient#setCDNStaticWebsiteError
|
||||||
*/
|
*/
|
||||||
@Named("cdn:setstaticwebsiteerror")
|
@Named("UpdateCDNEnabledContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = CloudFilesHeaders.CDN_WEBSITE_ERROR, values = "{error}")
|
@Headers(keys = CloudFilesHeaders.CDN_WEBSITE_ERROR, values = "{error}")
|
||||||
|
@ -84,7 +84,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#getAccountStatistics
|
* @see CommonSwiftClient#getAccountStatistics
|
||||||
*/
|
*/
|
||||||
@Named("swift:getaccountstats")
|
@Named("GetAccountMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
@ -94,7 +94,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#listContainers
|
* @see CommonSwiftClient#listContainers
|
||||||
*/
|
*/
|
||||||
@Named("swift:listcontainers")
|
@Named("ListContainers")
|
||||||
@GET
|
@GET
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@QueryParams(keys = "format", values = "json")
|
@QueryParams(keys = "format", values = "json")
|
||||||
@ -104,7 +104,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#getContainerMetadata
|
* @see CommonSwiftClient#getContainerMetadata
|
||||||
*/
|
*/
|
||||||
@Named("swift:getcontainermetadata")
|
@Named("GetContainerMetadata")
|
||||||
@Beta
|
@Beta
|
||||||
@HEAD
|
@HEAD
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@ -116,7 +116,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#setContainerMetadata
|
* @see CommonSwiftClient#setContainerMetadata
|
||||||
*/
|
*/
|
||||||
@Named("swift:setcontainermetadata")
|
@Named("UpdateContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Fallback(FalseOnContainerNotFound.class)
|
@Fallback(FalseOnContainerNotFound.class)
|
||||||
@ -126,7 +126,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#deleteContainerMetadata
|
* @see CommonSwiftClient#deleteContainerMetadata
|
||||||
*/
|
*/
|
||||||
@Named("swift:deletecontainermetadata")
|
@Named("UpdateContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Fallback(FalseOnContainerNotFound.class)
|
@Fallback(FalseOnContainerNotFound.class)
|
||||||
@ -136,7 +136,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#createContainer
|
* @see CommonSwiftClient#createContainer
|
||||||
*/
|
*/
|
||||||
@Named("swift:createcontainer")
|
@Named("CreateContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
ListenableFuture<Boolean> createContainer(@PathParam("container") String container,
|
ListenableFuture<Boolean> createContainer(@PathParam("container") String container,
|
||||||
@ -145,7 +145,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#setObjectInfo
|
* @see CommonSwiftClient#setObjectInfo
|
||||||
*/
|
*/
|
||||||
@Named("swift:setobjectinfo")
|
@Named("UpdateObjectMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}/{name}")
|
@Path("/{container}/{name}")
|
||||||
ListenableFuture<Boolean> setObjectInfo(@PathParam("container") String container,
|
ListenableFuture<Boolean> setObjectInfo(@PathParam("container") String container,
|
||||||
@ -155,7 +155,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#createContainer
|
* @see CommonSwiftClient#createContainer
|
||||||
*/
|
*/
|
||||||
@Named("swift:createcontainer")
|
@Named("CreateContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
ListenableFuture<Boolean> createContainer(@PathParam("container") String container);
|
ListenableFuture<Boolean> createContainer(@PathParam("container") String container);
|
||||||
@ -163,7 +163,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#deleteContainerIfEmpty
|
* @see CommonSwiftClient#deleteContainerIfEmpty
|
||||||
*/
|
*/
|
||||||
@Named("swift:deletecontainerifempty")
|
@Named("DeleteContainer")
|
||||||
@DELETE
|
@DELETE
|
||||||
@Fallback(TrueOn404FalseOn409.class)
|
@Fallback(TrueOn404FalseOn409.class)
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@ -172,7 +172,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#listObjects
|
* @see CommonSwiftClient#listObjects
|
||||||
*/
|
*/
|
||||||
@Named("swift:listobjects")
|
@Named("ListObjects")
|
||||||
@GET
|
@GET
|
||||||
@QueryParams(keys = "format", values = "json")
|
@QueryParams(keys = "format", values = "json")
|
||||||
@ResponseParser(ParseObjectInfoListFromJsonResponse.class)
|
@ResponseParser(ParseObjectInfoListFromJsonResponse.class)
|
||||||
@ -183,7 +183,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#containerExists
|
* @see CommonSwiftClient#containerExists
|
||||||
*/
|
*/
|
||||||
@Named("swift:containerexists")
|
@Named("GetContainerMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
@ -193,7 +193,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#putObject
|
* @see CommonSwiftClient#putObject
|
||||||
*/
|
*/
|
||||||
@Named("swift:putobject")
|
@Named("PutObject")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}/{name}")
|
@Path("/{container}/{name}")
|
||||||
@ResponseParser(ParseETagHeader.class)
|
@ResponseParser(ParseETagHeader.class)
|
||||||
@ -203,7 +203,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#copyObject
|
* @see CommonSwiftClient#copyObject
|
||||||
*/
|
*/
|
||||||
@Named("swift:copyobject")
|
@Named("CopyObject")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{destinationContainer}/{destinationObject}")
|
@Path("/{destinationContainer}/{destinationObject}")
|
||||||
@Headers(keys = SwiftHeaders.OBJECT_COPY_FROM, values = "/{sourceContainer}/{sourceObject}")
|
@Headers(keys = SwiftHeaders.OBJECT_COPY_FROM, values = "/{sourceContainer}/{sourceObject}")
|
||||||
@ -216,7 +216,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#getObject
|
* @see CommonSwiftClient#getObject
|
||||||
*/
|
*/
|
||||||
@Named("swift:getobject")
|
@Named("GetObject")
|
||||||
@GET
|
@GET
|
||||||
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
|
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
|
||||||
@Fallback(NullOnKeyNotFound.class)
|
@Fallback(NullOnKeyNotFound.class)
|
||||||
@ -228,7 +228,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#getObjectInfo
|
* @see CommonSwiftClient#getObjectInfo
|
||||||
*/
|
*/
|
||||||
@Named("swift:getobjectinfo")
|
@Named("GetObjectMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@ResponseParser(ParseObjectInfoFromHeaders.class)
|
@ResponseParser(ParseObjectInfoFromHeaders.class)
|
||||||
@Fallback(NullOnKeyNotFound.class)
|
@Fallback(NullOnKeyNotFound.class)
|
||||||
@ -240,7 +240,7 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#objectExists
|
* @see CommonSwiftClient#objectExists
|
||||||
*/
|
*/
|
||||||
@Named("swift:objectexists")
|
@Named("GetObjectMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@Fallback(FalseOnKeyNotFound.class)
|
@Fallback(FalseOnKeyNotFound.class)
|
||||||
@Path("/{container}/{name}")
|
@Path("/{container}/{name}")
|
||||||
@ -251,14 +251,14 @@ public interface CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see CommonSwiftClient#removeObject
|
* @see CommonSwiftClient#removeObject
|
||||||
*/
|
*/
|
||||||
@Named("swift:removeobject")
|
@Named("RemoveObject")
|
||||||
@DELETE
|
@DELETE
|
||||||
@Fallback(VoidOnNotFoundOr404.class)
|
@Fallback(VoidOnNotFoundOr404.class)
|
||||||
@Path("/{container}/{name}")
|
@Path("/{container}/{name}")
|
||||||
ListenableFuture<Void> removeObject(@PathParam("container") String container,
|
ListenableFuture<Void> removeObject(@PathParam("container") String container,
|
||||||
@PathParam("name") String name);
|
@PathParam("name") String name);
|
||||||
|
|
||||||
@Named("swift:putobjectmanifest")
|
@Named("PutObjectManifest")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}/{name}")
|
@Path("/{container}/{name}")
|
||||||
@ResponseParser(ParseETagHeader.class)
|
@ResponseParser(ParseETagHeader.class)
|
||||||
|
@ -38,6 +38,7 @@ import javax.ws.rs.core.MediaType;
|
|||||||
/**
|
/**
|
||||||
* @author Andrei Savu
|
* @author Andrei Savu
|
||||||
* @see TemporaryUrlKeyApi
|
* @see TemporaryUrlKeyApi
|
||||||
|
* @see <a href="http://docs.openstack.org/trunk/openstack-object-storage/admin/content/swift-tempurl.html">docs</a>
|
||||||
*/
|
*/
|
||||||
@RequestFilters(AuthenticateRequest.class)
|
@RequestFilters(AuthenticateRequest.class)
|
||||||
@Endpoint(Storage.class)
|
@Endpoint(Storage.class)
|
||||||
@ -46,7 +47,7 @@ public interface TemporaryUrlKeyAsyncApi {
|
|||||||
/**
|
/**
|
||||||
* @see TemporaryUrlKeyApi#getTemporaryUrlKey
|
* @see TemporaryUrlKeyApi#getTemporaryUrlKey
|
||||||
*/
|
*/
|
||||||
@Named("tempurlkey:get")
|
@Named("GetAccountMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
@ -56,7 +57,7 @@ public interface TemporaryUrlKeyAsyncApi {
|
|||||||
/**
|
/**
|
||||||
* @see TemporaryUrlKeyApi#setTemporaryUrlKey
|
* @see TemporaryUrlKeyApi#setTemporaryUrlKey
|
||||||
*/
|
*/
|
||||||
@Named("tempurlkey:set")
|
@Named("UpdateAccountMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/")
|
@Path("/")
|
||||||
ListenableFuture<Void> setTemporaryUrlKey(@HeaderParam(SwiftHeaders.ACCOUNT_TEMPORARY_URL_KEY) String key);
|
ListenableFuture<Void> setTemporaryUrlKey(@HeaderParam(SwiftHeaders.ACCOUNT_TEMPORARY_URL_KEY) String key);
|
||||||
|
@ -20,6 +20,7 @@ package org.jclouds.hpcloud.objectstorage;
|
|||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
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;
|
||||||
@ -49,13 +50,15 @@ import com.google.inject.Provides;
|
|||||||
* Provides asynchronous access to HP Cloud Object Storage via the REST API.
|
* Provides asynchronous access to HP Cloud Object Storage via the REST API.
|
||||||
*
|
*
|
||||||
* <p/>
|
* <p/>
|
||||||
* All commands return a ListenableFuture of the result. Any exceptions incurred during processing
|
* All commands return a ListenableFuture of the result. Any exceptions incurred
|
||||||
* will be backend in an {@link java.util.concurrent.ExecutionException} as documented in
|
* during processing will be backend in an
|
||||||
|
* {@link java.util.concurrent.ExecutionException} as documented in
|
||||||
* {@link ListenableFuture#get()}.
|
* {@link ListenableFuture#get()}.
|
||||||
*
|
*
|
||||||
* @see HPCloudObjectStorageApi
|
* @see HPCloudObjectStorageApi
|
||||||
* @see <a href="https://manage.hpcloud.com/pages/build/docs/objectstorage-lvs/api">HP Cloud Object
|
* @see <a
|
||||||
* Storage API</a>
|
* href="https://api-docs.hpcloud.com/hpcloud-object-storage/1.0/content/ch_object-storage-dev-overview.html">HP
|
||||||
|
* Cloud Object Storage API</a>
|
||||||
* @author Jeremy Daggett
|
* @author Jeremy Daggett
|
||||||
*/
|
*/
|
||||||
@RequestFilters(AuthenticateRequest.class)
|
@RequestFilters(AuthenticateRequest.class)
|
||||||
@ -72,6 +75,7 @@ public interface HPCloudObjectStorageAsyncApi extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see org.jclouds.openstack.swift.CommonSwiftClient#listContainers
|
* @see org.jclouds.openstack.swift.CommonSwiftClient#listContainers
|
||||||
*/
|
*/
|
||||||
|
@Named("ListContainers")
|
||||||
@GET
|
@GET
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@QueryParams(keys = "format", values = "json")
|
@QueryParams(keys = "format", values = "json")
|
||||||
@ -81,6 +85,7 @@ public interface HPCloudObjectStorageAsyncApi extends CommonSwiftAsyncClient {
|
|||||||
/**
|
/**
|
||||||
* @see org.jclouds.openstack.swift.CommonSwiftClient#deleteContainerIfEmpty
|
* @see org.jclouds.openstack.swift.CommonSwiftClient#deleteContainerIfEmpty
|
||||||
*/
|
*/
|
||||||
|
@Named("DeleteContainer")
|
||||||
@DELETE
|
@DELETE
|
||||||
@Fallback(TrueOn404FalseOn409.class)
|
@Fallback(TrueOn404FalseOn409.class)
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
|
@ -20,6 +20,7 @@ package org.jclouds.hpcloud.objectstorage.extensions;
|
|||||||
|
|
||||||
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.GET;
|
import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.HEAD;
|
import javax.ws.rs.HEAD;
|
||||||
@ -55,13 +56,15 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||||||
* Provides asynchronous access to HP Cloud Object Storage via the REST API.
|
* Provides asynchronous access to HP Cloud Object Storage via the REST API.
|
||||||
*
|
*
|
||||||
* <p/>
|
* <p/>
|
||||||
* All commands return a ListenableFuture of the result. Any exceptions incurred during processing
|
* All commands return a ListenableFuture of the result. Any exceptions incurred
|
||||||
* will be backend in an {@link java.util.concurrent.ExecutionException} as documented in
|
* during processing will be backend in an
|
||||||
|
* {@link java.util.concurrent.ExecutionException} as documented in
|
||||||
* {@link ListenableFuture#get()}.
|
* {@link ListenableFuture#get()}.
|
||||||
*
|
*
|
||||||
* @see HPCloudObjectStorageApi
|
* @see HPCloudObjectStorageApi
|
||||||
* @see <a href="https://manage.hpcloud.com/pages/build/docs/objectstorage-lvs/api">HP Cloud Object
|
* @see <a
|
||||||
* Storage API</a>
|
* href="https://api-docs.hpcloud.com/hpcloud-cdn-storage/1.0/content/ch_cdn-dev-overview.html">HP
|
||||||
|
* Cloud Object Storage API</a>
|
||||||
* @author Jeremy Daggett
|
* @author Jeremy Daggett
|
||||||
*/
|
*/
|
||||||
@RequestFilters(AuthenticateRequest.class)
|
@RequestFilters(AuthenticateRequest.class)
|
||||||
@ -71,6 +74,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#list()
|
* @see HPCloudObjectStorageApi#list()
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("ListCDNEnabledContainers")
|
||||||
@GET
|
@GET
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@QueryParams(keys = "format", values = "json")
|
@QueryParams(keys = "format", values = "json")
|
||||||
@ -82,6 +86,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#list(ListCDNContainerOptions)
|
* @see HPCloudObjectStorageApi#list(ListCDNContainerOptions)
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("ListCDNEnabledContainers")
|
||||||
@GET
|
@GET
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@QueryParams(keys = "format", values = "json")
|
@QueryParams(keys = "format", values = "json")
|
||||||
@ -93,6 +98,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#get(String)
|
* @see HPCloudObjectStorageApi#get(String)
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("ListCDNEnabledContainerMetadata")
|
||||||
@HEAD
|
@HEAD
|
||||||
@ResponseParser(ParseCDNContainerFromHeaders.class)
|
@ResponseParser(ParseCDNContainerFromHeaders.class)
|
||||||
@Fallback(NullOnContainerNotFound.class)
|
@Fallback(NullOnContainerNotFound.class)
|
||||||
@ -103,6 +109,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#enable(String, long)
|
* @see HPCloudObjectStorageApi#enable(String, long)
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("CDNEnableContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = HPCloudObjectStorageHeaders.CDN_ENABLED, values = "True")
|
@Headers(keys = HPCloudObjectStorageHeaders.CDN_ENABLED, values = "True")
|
||||||
@ -114,6 +121,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#enable(String)
|
* @see HPCloudObjectStorageApi#enable(String)
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("CDNEnableContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = HPCloudObjectStorageHeaders.CDN_ENABLED, values = "True")
|
@Headers(keys = HPCloudObjectStorageHeaders.CDN_ENABLED, values = "True")
|
||||||
@ -124,6 +132,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#update(String, long)
|
* @see HPCloudObjectStorageApi#update(String, long)
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("UpdateCDNEnabledContainerMetadata")
|
||||||
@POST
|
@POST
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@ResponseParser(ParseCDNUriFromHeaders.class)
|
@ResponseParser(ParseCDNUriFromHeaders.class)
|
||||||
@ -134,6 +143,7 @@ public interface CDNContainerAsyncApi {
|
|||||||
* @see HPCloudObjectStorageApi#disable(String)
|
* @see HPCloudObjectStorageApi#disable(String)
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
|
@Named("DisableCDNEnabledContainer")
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{container}")
|
@Path("/{container}")
|
||||||
@Headers(keys = HPCloudObjectStorageHeaders.CDN_ENABLED, values = "False")
|
@Headers(keys = HPCloudObjectStorageHeaders.CDN_ENABLED, values = "False")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user