KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > snapper > presentation > DeletePath


1 /*
2  * snapper
3  *
4  * Enhydra super-servlet presentation object
5  *
6  */

7
8 package org.enhydra.snapper.presentation;
9
10 // Enhydra SuperServlet imports
11
import com.lutris.appserver.server.httpPresentation.ClientPageRedirectException;
12 import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
13
14
15 // Enhydra SuperServlet specification imports
16
import org.enhydra.snapper.Log;
17 import org.enhydra.snapper.spec.*;
18
19 import org.enhydra.snapper.presentation.html.*;
20 import org.enhydra.xml.xmlc.XMLObject;
21
22 // Standard imports
23

24 public class DeletePath extends BasePO {
25
26
27     protected XMLObject getDOM() throws Exception JavaDoc {
28         
29         String JavaDoc pathID = comms.request.getParameter("id");
30
31         PathListHTML htmlPage;
32
33         Path path = null;
34         
35         try {
36             path = (PathFactory.getPath("org.enhydra.snapper.business.PathImpl")).findPathByID(pathID, dbTransaction);
37             path.delete();
38             Log.log("Path successfully deleted");
39                 } catch(Exception JavaDoc ex) {
40                      Log.logException(ex);
41                      throw new HttpPresentationException("Could not delete", ex);
42                 }
43
44         //siteList = (SiteListHTML)comms.xmlcFactory.create(SiteListHTML.class);
45

46         //return siteList;
47

48         throw new ClientPageRedirectException(comms.request.getAppFileURIPath("PathListPresentation.po"));
49
50     }
51 }
52
Popular Tags