1 7 8 package org.enhydra.snapper.presentation; 9 10 import com.lutris.appserver.server.httpPresentation.ClientPageRedirectException; 12 import com.lutris.appserver.server.httpPresentation.HttpPresentationException; 13 14 15 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 24 public class DeletePath extends BasePO { 25 26 27 protected XMLObject getDOM() throws Exception { 28 29 String 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 ex) { 40 Log.logException(ex); 41 throw new HttpPresentationException("Could not delete", ex); 42 } 43 44 46 48 throw new ClientPageRedirectException(comms.request.getAppFileURIPath("PathListPresentation.po")); 49 50 } 51 } 52 | Popular Tags |