mirror of https://github.com/apache/jclouds.git
Add deprecation warnings and provide links to new APIs
This commit is contained in:
parent
f3303f03c3
commit
2a8ec6be9b
|
@ -73,13 +73,14 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
import com.google.inject.Provides;
|
||||
|
||||
/**
|
||||
* Common features between OpenStack Swift and CloudFiles
|
||||
* Common features in OpenStack Swift.
|
||||
*
|
||||
* @see CommonSwiftClient
|
||||
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090812.pdf" />
|
||||
*
|
||||
* @author Adrian Cole
|
||||
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CommonSwiftClient.class)} as
|
||||
* {@link CommonSwiftAsyncClient} interface will be removed in jclouds 1.7.
|
||||
*
|
||||
* @deprecated Please use {@code org.jclouds.ContextBuilder#buildApi(CommonSwiftClient.class)} as
|
||||
* {@link CommonSwiftAsyncClient} will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface CommonSwiftAsyncClient extends Closeable {
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.jclouds.openstack.swift;
|
|||
import java.io.Closeable;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jclouds.blobstore.domain.PageSet;
|
||||
import org.jclouds.http.options.GetOptions;
|
||||
import org.jclouds.openstack.swift.domain.AccountMetadata;
|
||||
|
@ -32,12 +33,21 @@ import org.jclouds.openstack.swift.options.ListContainerOptions;
|
|||
import com.google.inject.Provides;
|
||||
|
||||
/**
|
||||
* Common features between OpenStack Swift and CloudFiles
|
||||
* Common features in OpenStack Swift.
|
||||
*
|
||||
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090812.pdf" />
|
||||
* @author Adrian Cole
|
||||
*
|
||||
* @deprecated Please use {@code com.jclouds.openstack.swift.v1.SwiftApi} and related
|
||||
* feature APIs in {@code com.jclouds.openstack.swift.v1.features.*} as noted in
|
||||
* each method. This interface will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface CommonSwiftClient extends Closeable {
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.domain.SwiftObject#builder()}
|
||||
*/
|
||||
@Provides
|
||||
SwiftObject newSwiftObject();
|
||||
|
||||
|
@ -49,6 +59,10 @@ public interface CommonSwiftClient extends Closeable {
|
|||
* storage system is designed to store large amounts of data, care should be taken when
|
||||
* representing the total bytes response as an integer; when possible, convert it to a 64-bit
|
||||
* unsigned integer if your platform supports that primitive flavor.
|
||||
*
|
||||
* @return the {@link AccountMetadata}
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.AccountApi#get()}
|
||||
*/
|
||||
AccountMetadata getAccountStatistics();
|
||||
|
||||
|
@ -79,46 +93,138 @@ public interface CommonSwiftClient extends Closeable {
|
|||
* If the number of container names returned equals the limit given (or 10,000 if no limit is
|
||||
* given), it can be assumed there are more container names to be listed. If the container name
|
||||
* list is exactly divisible by the limit, the last request will simply have no content.
|
||||
*
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#list()} and
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#list(ListContainerOptions)}
|
||||
*/
|
||||
Set<ContainerMetadata> listContainers(ListContainerOptions... options);
|
||||
|
||||
/**
|
||||
* Get the {@link ContainerMetadata} for the specified container.
|
||||
*
|
||||
* @param container
|
||||
* the container to get the metadata from
|
||||
* @return the {@link ContainerMetadata}
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#get()}
|
||||
*/
|
||||
ContainerMetadata getContainerMetadata(String container);
|
||||
|
||||
/**
|
||||
* Set the {@link ContainerMetadata} on the given container.
|
||||
*
|
||||
* @param container
|
||||
* the container to set the metadata on
|
||||
* @param containerMetadata
|
||||
* a {@code Map<String, String>} containing the metadata
|
||||
* @return {@code true}
|
||||
* if the Container Metadata was successfully created or updated, false if not.
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#updateMetadata()}
|
||||
*/
|
||||
boolean setContainerMetadata(String container, Map<String, String> containerMetadata);
|
||||
|
||||
/**
|
||||
* Delete the metadata on the given container.
|
||||
*
|
||||
* @param container
|
||||
* the container to delete the metadata from
|
||||
* @param metadataKeys
|
||||
* the metadata keys
|
||||
* @return {@code true}
|
||||
* if the Container was successfully deleted, false if not.
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#deleteMetadata()}
|
||||
*/
|
||||
boolean deleteContainerMetadata(String container, Iterable<String> metadataKeys);
|
||||
|
||||
/**
|
||||
* Create a container.
|
||||
*
|
||||
* @param container
|
||||
* the name of the container
|
||||
* @return {@code true}
|
||||
* if the Container was successfully created, false if not.
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#createIfAbsent()}
|
||||
*/
|
||||
boolean createContainer(String container);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#createIfAbsent()}
|
||||
*/
|
||||
boolean createContainer(String container, CreateContainerOptions... options);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* (@link com.jclouds.openstack.swift.v1.features.ContainerApi#deleteIfEmpty()}
|
||||
*/
|
||||
boolean deleteContainerIfEmpty(String container);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ContainerApi#head()}
|
||||
*/
|
||||
boolean containerExists(String container);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#list()} and
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#list(ListContainerOptions)}
|
||||
*/
|
||||
PageSet<ObjectInfo> listObjects(String container, ListContainerOptions... options);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#get()}
|
||||
*/
|
||||
SwiftObject getObject(String container, String name, GetOptions... options);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi@updateMetadata()}
|
||||
*/
|
||||
boolean setObjectInfo(String container, String name, Map<String, String> userMetadata);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#head()}
|
||||
*/
|
||||
MutableObjectInfoWithMetadata getObjectInfo(String container, String name);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#replace()}
|
||||
*/
|
||||
String putObject(String container, SwiftObject object);
|
||||
|
||||
/**
|
||||
* @return True If the object was copied
|
||||
* @throws CopyObjectException If the object was not copied
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#copy()}
|
||||
*/
|
||||
boolean copyObject(String sourceContainer, String sourceObject, String destinationContainer, String destinationObject);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#delete()}
|
||||
*/
|
||||
void removeObject(String container, String name);
|
||||
|
||||
/**
|
||||
* @throws ContainerNotFoundException
|
||||
* if the container is not present.
|
||||
* @throws org.jclouds.blobstore.ContainerNotFoundException
|
||||
* if the container is not present
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#head()}
|
||||
*/
|
||||
boolean objectExists(String container, String name);
|
||||
|
||||
/**
|
||||
* @deprecated This method will be replaced by
|
||||
* {@link com.jclouds.openstack.swift.v1.features.ObjectApi#replaceManifest()}
|
||||
*/
|
||||
String putObjectManifest(String container, String name);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata {
|
|||
|
||||
/**
|
||||
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftClient.class)} as
|
||||
* {@link SwiftAsyncClient} interface will be removed in jclouds 1.7.
|
||||
* {@link SwiftAsyncClient} interface will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final TypeToken<org.jclouds.rest.RestContext<? extends SwiftClient, ? extends SwiftAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<? extends SwiftClient, ? extends SwiftAsyncClient>>() {
|
||||
|
|
|
@ -24,12 +24,12 @@ import org.jclouds.rest.annotations.RequestFilters;
|
|||
* Functionality that's in Swift, and not in CloudFiles.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftClient.class)} as
|
||||
* {@link SwiftAsyncClient} interface will be removed in jclouds 1.7.
|
||||
*
|
||||
* @deprecated Please use {@code org.jclouds.ContextBuilder#buildApi(SwiftClient.class)}, as
|
||||
* {@link SwiftAsyncClient} will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequestFilters(AuthenticateRequest.class)
|
||||
@Endpoint(Storage.class)
|
||||
public interface SwiftAsyncClient extends CommonSwiftAsyncClient {
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,11 @@ package org.jclouds.openstack.swift;
|
|||
* Functionality that's in Swift, and not in CloudFiles.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*
|
||||
* @deprecated Please use {@code com.jclouds.openstack.swift.v1.SwiftApi} and related
|
||||
* feature APIs in {@code com.jclouds.openstack.swift.v1.features.*}. This interface
|
||||
* will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface SwiftClient extends CommonSwiftClient {
|
||||
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata {
|
|||
|
||||
/**
|
||||
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftKeystoneClient.class)} as
|
||||
* {@link SwiftKeystoneAsyncClient} interface will be removed in jclouds 1.7.
|
||||
* {@link SwiftKeystoneAsyncClient} interface will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final TypeToken<org.jclouds.rest.RestContext<SwiftKeystoneClient, SwiftKeystoneAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<SwiftKeystoneClient, SwiftKeystoneAsyncClient>>() {
|
||||
|
|
|
@ -24,8 +24,9 @@ import org.jclouds.rest.annotations.RequestFilters;
|
|||
* Functionality that's in Swift, and not in CloudFiles.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftKeystoneClient.class)} as
|
||||
* {@link SwiftKeystoneAsyncClient} interface will be removed in jclouds 1.7.
|
||||
*
|
||||
* @deprecated Please use {@code org.jclouds.ContextBuilder#buildApi(SwiftKeystoneClient.class)}, as
|
||||
* {@link SwiftKeystoneAsyncClient} will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequestFilters(AuthenticateRequest.class)
|
||||
|
|
|
@ -20,7 +20,8 @@ package org.jclouds.openstack.swift;
|
|||
* Functionality that's in Swift, and not in CloudFiles.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
* @deprecated This interface will be removed in jclouds 2.0.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface SwiftKeystoneClient extends SwiftClient {
|
||||
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ import com.google.common.util.concurrent.ListeningExecutorService;
|
|||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
* @deprecated will be removed in jclouds 1.7, as async interfaces are no longer
|
||||
* supported. Please use {@link SwiftBlobStore}
|
||||
* @deprecated This class will be removed in jclouds 2.0, as async interfaces are no longer
|
||||
* supported. Please use {@link SwiftBlobStore}.
|
||||
*/
|
||||
@Deprecated
|
||||
@Singleton
|
||||
|
|
Loading…
Reference in New Issue