You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ev...@apache.org on 2014/04/04 00:52:45 UTC

git commit: Add deprecation warnings and provide links to new APIs

Repository: jclouds
Updated Branches:
  refs/heads/master c308bb9bc -> e195a5a2b


Add deprecation warnings and provide links to new APIs


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/e195a5a2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/e195a5a2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/e195a5a2

Branch: refs/heads/master
Commit: e195a5a2bbf150611622050df94131aa8b278c84
Parents: c308bb9
Author: Jeremy Daggett <je...@rackspace.com>
Authored: Mon Dec 16 12:11:37 2013 -0800
Committer: Everett Toews <ev...@rackspace.com>
Committed: Thu Apr 3 17:51:39 2014 -0500

----------------------------------------------------------------------
 .../openstack/swift/CommonSwiftAsyncClient.java |   9 +-
 .../openstack/swift/CommonSwiftClient.java      | 114 ++++++++++++++++++-
 .../openstack/swift/SwiftApiMetadata.java       |   2 +-
 .../openstack/swift/SwiftAsyncClient.java       |   6 +-
 .../jclouds/openstack/swift/SwiftClient.java    |   6 +-
 .../swift/SwiftKeystoneApiMetadata.java         |   2 +-
 .../swift/SwiftKeystoneAsyncClient.java         |   5 +-
 .../openstack/swift/SwiftKeystoneClient.java    |   3 +-
 .../swift/blobstore/SwiftAsyncBlobStore.java    |   4 +-
 9 files changed, 132 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java
index 988b953..d2cfa13 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java
@@ -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 {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java
index b65091b..3dad525 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java
@@ -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);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java
index 256b8e8..f633225 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java
@@ -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>>() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftAsyncClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftAsyncClient.java
index fc7471a..a0d0270 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftAsyncClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftAsyncClient.java
@@ -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 {
-
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java
index f6cf0db..9ff6117 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java
@@ -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 {
-
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java
index 3d42eff..fedeb2f 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java
@@ -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>>() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneAsyncClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneAsyncClient.java
index 399ff4a..0aedf76 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneAsyncClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneAsyncClient.java
@@ -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)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java
index 0db5b5f..e0af226 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java
@@ -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 {
-
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e195a5a2/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java
----------------------------------------------------------------------
diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java
index 702a2e3..38f8f52 100644
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/SwiftAsyncBlobStore.java
@@ -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