From 94447c3713a3ad70a891bd295e68822ccf9f61a1 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Mon, 16 Nov 2009 16:31:24 -0500 Subject: moved new resource to proper location --- .../candlepin/resource/ProductResource.java | 58 ---------------------- .../candlepin/resource/ProductResource.java | 58 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 58 deletions(-) delete mode 100644 proxy/code/src/org/fedoraproject/candlepin/resource/ProductResource.java create mode 100644 proxy/src/main/java/org/fedoraproject/candlepin/resource/ProductResource.java diff --git a/proxy/code/src/org/fedoraproject/candlepin/resource/ProductResource.java b/proxy/code/src/org/fedoraproject/candlepin/resource/ProductResource.java deleted file mode 100644 index 1316230..0000000 --- a/proxy/code/src/org/fedoraproject/candlepin/resource/ProductResource.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2008 Red Hat, Inc. - * - * This software is licensed to you under the GNU General Public License, - * version 2 (GPLv2). There is NO WARRANTY for this software, express or - * implied, including the implied warranties of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 - * along with this software; if not, see - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. - * - * Red Hat trademarks are not licensed under GPLv2. No permission is - * granted to use or replicate Red Hat trademarks that are incorporated - * in this software or its documentation. - */ -package org.fedoraproject.candlepin.resource; - -import org.fedoraproject.candlepin.model.ObjectFactory; -import org.fedoraproject.candlepin.model.Product; - -import java.util.ArrayList; -import java.util.List; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - - -/** - * API Gateway into /product - * @version $Rev$ - */ -@Path("/product") -public class ProductResource extends BaseResource { - - /** - * default ctor - */ - public ProductResource() { - super(Product.class); - } - - - /** - * returns the list of Products available. - * @return the list of available products. - */ - @GET - @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) - public List list() { - List u = ObjectFactory.get().listObjectsByClass(getApiClass()); - List products = new ArrayList(); - for (Object o : u) { - products.add((Product) o); - } - return products; - } -} diff --git a/proxy/src/main/java/org/fedoraproject/candlepin/resource/ProductResource.java b/proxy/src/main/java/org/fedoraproject/candlepin/resource/ProductResource.java new file mode 100644 index 0000000..1316230 --- /dev/null +++ b/proxy/src/main/java/org/fedoraproject/candlepin/resource/ProductResource.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2008 Red Hat, Inc. + * + * This software is licensed to you under the GNU General Public License, + * version 2 (GPLv2). There is NO WARRANTY for this software, express or + * implied, including the implied warranties of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 + * along with this software; if not, see + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * + * Red Hat trademarks are not licensed under GPLv2. No permission is + * granted to use or replicate Red Hat trademarks that are incorporated + * in this software or its documentation. + */ +package org.fedoraproject.candlepin.resource; + +import org.fedoraproject.candlepin.model.ObjectFactory; +import org.fedoraproject.candlepin.model.Product; + +import java.util.ArrayList; +import java.util.List; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + + +/** + * API Gateway into /product + * @version $Rev$ + */ +@Path("/product") +public class ProductResource extends BaseResource { + + /** + * default ctor + */ + public ProductResource() { + super(Product.class); + } + + + /** + * returns the list of Products available. + * @return the list of available products. + */ + @GET + @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) + public List list() { + List u = ObjectFactory.get().listObjectsByClass(getApiClass()); + List products = new ArrayList(); + for (Object o : u) { + products.add((Product) o); + } + return products; + } +} -- cgit