Permalink
Browse files

possible fix for GH-84

  • Loading branch information...
1 parent 77e051d commit 3b3a39138974f55d6f0f62e261334d6ce430dba4 @buzztroll buzztroll committed Dec 22, 2011
@@ -421,8 +421,14 @@ public String getName() {
@GET
public DescribeImagesResponseType handleGet(
@FormParam("ExecutableBy") String executableBy,
- @FormParam("ImageId") String imageId,
- @FormParam("Owner") String owner) {
+ @FormParam("Owner") String owner,
+ @Context UriInfo uriInfo) {
+
+ final MultivaluedMap<String,String> queryParams =
+ uriInfo.getQueryParameters();
+
+ final List<String> imageNames =
+ getParameterList(uriInfo, "ImageId");
final DescribeImagesType request = new DescribeImagesType();
@@ -436,11 +442,13 @@ public DescribeImagesResponseType handleGet(
request.setExecutableBySet(executableBySet);
}
- if (imageId != null) {
- DescribeImagesInfoType imagesSet =
- new DescribeImagesInfoType(new DescribeImagesItemType[] {
- new DescribeImagesItemType(imageId)
- });
+ if (imageNames != null) {
+ DescribeImagesItemType[] diit = new DescribeImagesItemType[imageNames.size()];
+ for(int i = 0; i < imageNames.size(); i++)
+ {
+ diit[i] = new DescribeImagesItemType(imageNames.get(i));
+ }
+ DescribeImagesInfoType imagesSet = new DescribeImagesInfoType(diit);
request.setImagesSet(imagesSet);
}
@@ -464,9 +472,9 @@ public DescribeImagesResponseType handleGet(
@POST
public DescribeImagesResponseType handlePost(
@FormParam("ExecutableBy") String executableBy,
- @FormParam("ImageId") String imageId,
- @FormParam("Owner") String owner) {
- return handleGet(executableBy, imageId, owner);
+ @FormParam("Owner") String owner,
+ @Context UriInfo uriInfo) {
+ return handleGet(executableBy, owner, uriInfo);
}
}

0 comments on commit 3b3a391

Please sign in to comment.