ingo@598: package de.intevation.flys.client.server;
ingo@598: 
ingo@598: import org.w3c.dom.Document;
ingo@598: 
ingo@1367: import org.apache.log4j.Logger;
ingo@1367: 
ingo@598: import de.intevation.artifacts.common.utils.ClientProtocolUtils;
ingo@598: 
ingo@598: import de.intevation.flys.client.shared.exceptions.ServerException;
ingo@598: import de.intevation.flys.client.shared.model.Collection;
ingo@598: import de.intevation.flys.client.client.services.DeleteCollectionService;
ingo@598: 
ingo@598: 
ingo@598: /**
ingo@598:  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
ingo@598:  */
ingo@598: public class DeleteCollectionServiceImpl
ingo@599: extends      DoCollectionAction
ingo@598: implements   DeleteCollectionService
ingo@598: {
ingo@1367:     private static final Logger logger =
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:     {
ingo@1367:         logger.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 :