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@598: ingo@598: import org.w3c.dom.Document; ingo@598: ingo@1367: import org.apache.log4j.Logger; ingo@1367: teichmann@5835: import org.dive4elements.artifacts.common.utils.ClientProtocolUtils; ingo@598: teichmann@5835: import org.dive4elements.river.client.shared.exceptions.ServerException; teichmann@5835: import org.dive4elements.river.client.shared.model.Collection; teichmann@5835: import org.dive4elements.river.client.client.services.DeleteCollectionService; ingo@598: ingo@598: ingo@598: /** ingo@598: * @author Ingo Weinzierl ingo@598: */ ingo@598: public class DeleteCollectionServiceImpl ingo@599: extends DoCollectionAction ingo@598: implements DeleteCollectionService ingo@598: { teichmann@8203: private static final Logger log = ingo@1367: Logger.getLogger(DeleteCollectionServiceImpl.class); ingo@1367: ingo@1367: ingo@599: public static final String XPATH_RESULT = "/art:result/text()"; ingo@599: public static final String OPERATION_FAILURE = "FAILED"; ingo@599: raimund@1425: public void delete(Collection c) ingo@598: throws ServerException ingo@598: { teichmann@8203: log.info("Delete collection: " + c.identifier()); ingo@599: raimund@1425: String url = getServletContext().getInitParameter("server-url"); raimund@1425: ingo@599: Document del = ClientProtocolUtils.newDeleteCollectionDocument(); ingo@599: ingo@599: doAction(c, del, url); ingo@598: } ingo@598: } ingo@598: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :