teichmann@5861: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5861: * Software engineering by Intevation GmbH teichmann@5861: * teichmann@5993: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5861: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5993: * documentation coming with Dive4Elements River for details. teichmann@5861: */ teichmann@5861: teichmann@5835: package org.dive4elements.river.client.server; ingo@11: ingo@1367: import org.apache.log4j.Logger; ingo@1367: ingo@11: import com.google.gwt.user.server.rpc.RemoteServiceServlet; ingo@11: teichmann@5835: import org.dive4elements.river.client.shared.exceptions.ServerException; teichmann@5835: import org.dive4elements.river.client.shared.model.Artifact; teichmann@5835: import org.dive4elements.river.client.client.services.ArtifactService; ingo@11: teichmann@5835: import org.dive4elements.river.client.shared.model.Collection; teichmann@5835: import org.dive4elements.river.client.shared.model.Recommendation; ingo@11: ingo@11: /** ingo@11: * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, ingo@11: * ADVANCE and OUT. ingo@11: * ingo@11: * @author Ingo Weinzierl ingo@11: */ ingo@11: public class ArtifactServiceImpl ingo@11: extends RemoteServiceServlet ingo@11: implements ArtifactService ingo@11: { teichmann@8203: /** Private log. */ teichmann@8203: private static final Logger log = ingo@1367: Logger.getLogger(ArtifactServiceImpl.class); ingo@1367: ingo@1367: ingo@905: /** ingo@905: * Creates new Artifacts based on a given Recommendation and factory. ingo@905: * Note, that all the work is done in ArtifactHelper! ingo@905: * ingo@905: * @param locale The locale used for HTTP request. ingo@905: * @param factory The factory that is used to create the new Artifact. felix@2890: * @param recom Recommendation with details of the artifact to create. ingo@905: * ingo@905: * @return a new Artifact. ingo@905: */ ingo@803: public Artifact create( sascha@843: String locale, sascha@843: String factory, ingo@905: Recommendation recom sascha@843: ) ingo@215: throws ServerException ingo@215: { teichmann@8203: log.info("ArtifactServiceImpl.create"); ingo@229: raimund@1425: String url = getServletContext().getInitParameter("server-url"); raimund@1425: raimund@1425: return ArtifactHelper.createArtifact(url, locale, factory, recom); sascha@845: } ingo@11: } ingo@11: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :