Issue 99: organize binders

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1924 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-09-25 05:33:03 +00:00
parent b541be176a
commit bb50a7364f
27 changed files with 42 additions and 35 deletions

View File

@ -67,7 +67,6 @@ import org.jclouds.rest.EntityParam;
import org.jclouds.rest.ExceptionParser;
import org.jclouds.rest.Headers;
import org.jclouds.rest.HostPrefixParam;
import org.jclouds.rest.HttpRequestOptionsBinder;
import org.jclouds.rest.ParamParser;
import org.jclouds.rest.QueryParams;
import org.jclouds.rest.RequestFilters;
@ -75,6 +74,7 @@ import org.jclouds.rest.ResponseParser;
import org.jclouds.rest.SkipEncoding;
import org.jclouds.rest.VirtualHost;
import org.jclouds.rest.XMLResponseParser;
import org.jclouds.rest.binders.HttpRequestOptionsBinder;
import com.google.inject.internal.Nullable;

View File

@ -37,7 +37,7 @@ import org.jclouds.aws.s3.domain.AccessControlList.Grant;
import org.jclouds.aws.s3.domain.AccessControlList.GroupGrantee;
import org.jclouds.aws.s3.reference.S3Constants;
import org.jclouds.http.HttpRequest;
import org.jclouds.rest.EntityBinder;
import org.jclouds.rest.binders.EntityBinder;
import org.jclouds.util.Utils;
import com.jamesmurty.utils.XMLBuilder;

View File

@ -29,6 +29,8 @@ import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@ -41,9 +43,6 @@ import org.jclouds.aws.s3.domain.ListBucketResponse;
import org.jclouds.blobstore.ContainerNotFoundException;
import org.jclouds.logging.Logger;
import javax.inject.Inject;
import javax.inject.Singleton;
/**
* Shows an example of how to use @{link S3Connection} injected with Guice.
*

View File

@ -26,15 +26,14 @@ package org.jclouds.blobstore.binders;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX;
import javax.inject.Inject;
import javax.inject.Named;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpUtils;
import org.jclouds.rest.EntityBinder;
import javax.inject.Inject;
import javax.inject.Named;
import org.jclouds.rest.binders.EntityBinder;
public class BlobBinder implements EntityBinder {
private final String metadataPrefix;

View File

@ -27,13 +27,14 @@ import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_M
import java.util.Map.Entry;
import org.jclouds.http.HttpRequest;
import org.jclouds.rest.EntityBinder;
import com.google.common.collect.Multimap;
import javax.inject.Inject;
import javax.inject.Named;
import org.jclouds.http.HttpRequest;
import org.jclouds.rest.binders.EntityBinder;
import com.google.common.collect.Multimap;
public class UserMetadataBinder implements EntityBinder {
private final String metadataPrefix;

View File

@ -29,6 +29,9 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import org.jclouds.rest.binders.EntityBinder;
import org.jclouds.rest.binders.ToStringEntityBinder;
/**
* Designates that this parameter will hold the entity for a PUT or POST command.
*

View File

@ -58,6 +58,9 @@ import org.jclouds.http.functions.ReturnTrueIf2xx;
import org.jclouds.http.functions.ParseSax.HandlerWithResult;
import org.jclouds.http.options.HttpRequestOptions;
import org.jclouds.logging.Logger;
import org.jclouds.rest.binders.EntityBinder;
import org.jclouds.rest.binders.HttpRequestOptionsBinder;
import org.jclouds.rest.binders.MapEntityBinder;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;

View File

@ -29,6 +29,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import org.jclouds.rest.binders.MapEntityBinder;
/**
* Designates that this parameter will hold the entity for a PUT or POST command.
*

View File

@ -21,7 +21,7 @@
* under the License.
* ====================================================================
*/
package org.jclouds.rest;
package org.jclouds.rest.binders;
import org.jclouds.http.HttpRequest;

View File

@ -21,7 +21,7 @@
* under the License.
* ====================================================================
*/
package org.jclouds.rest;
package org.jclouds.rest.binders;
import javax.ws.rs.core.HttpHeaders;

View File

@ -21,21 +21,20 @@
* under the License.
* ====================================================================
*/
package org.jclouds.http.binders;
package org.jclouds.rest.binders;
import java.util.Collections;
import static com.google.common.base.Preconditions.checkState;
import java.util.Collections;
import java.util.Map;
import javax.inject.Inject;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import org.jclouds.http.HttpRequest;
import org.jclouds.rest.MapEntityBinder;
import com.google.gson.Gson;
import javax.inject.Inject;
/**
* Binds the object to the request as a json object.

View File

@ -21,7 +21,7 @@
* under the License.
* ====================================================================
*/
package org.jclouds.rest;
package org.jclouds.rest.binders;
import java.util.Map;

View File

@ -21,7 +21,7 @@
* under the License.
* ====================================================================
*/
package org.jclouds.rest;
package org.jclouds.rest.binders;
import javax.ws.rs.core.HttpHeaders;

View File

@ -33,7 +33,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import org.jclouds.http.functions.ParseSax;
import org.jclouds.http.options.HttpRequestOptions;
import org.jclouds.rest.Endpoint;

View File

@ -55,13 +55,14 @@ import org.jclouds.http.HttpException;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpRequestFilter;
import org.jclouds.http.HttpResponse;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.http.functions.ReturnStringIf200;
import org.jclouds.http.functions.ReturnTrueIf2xx;
import org.jclouds.http.options.BaseHttpRequestOptions;
import org.jclouds.http.options.GetOptions;
import org.jclouds.http.options.HttpRequestOptions;
import org.jclouds.rest.binders.JsonBinder;
import org.jclouds.rest.binders.MapEntityBinder;
import org.jclouds.rest.config.JaxrsModule;
import org.jclouds.util.DateService;
import org.jclouds.util.Jsr330;

View File

@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import org.jclouds.rackspace.cloudservers.domain.BackupSchedule;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import org.jclouds.http.HttpRequest;
import org.jclouds.rest.EntityBinder;
import org.jclouds.rest.binders.EntityBinder;
/**
*

View File

@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import org.jclouds.rackspace.cloudservers.domain.RebootType;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import org.jclouds.http.HttpRequest;
import org.jclouds.rest.EntityBinder;
import org.jclouds.rest.binders.EntityBinder;
/**
*

View File

@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;

View File

@ -35,7 +35,7 @@ import java.util.Map.Entry;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpUtils;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import org.jclouds.rackspace.cloudservers.domain.Addresses;
import com.google.common.collect.ImmutableMap;

View File

@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;
import com.google.inject.internal.Nullable;

View File

@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.binders.JsonBinder;
import org.jclouds.rest.binders.JsonBinder;
import com.google.common.collect.ImmutableMap;
import com.google.inject.internal.Maps;