1 package de.webman.documenttype.eventhandler; 2 3 import com.teamkonzept.web.*; 4 import com.teamkonzept.webman.*; 5 import com.teamkonzept.webman.db.TKWebmanDBManager; 6 import com.teamkonzept.webman.mainint.*; 7 import com.teamkonzept.webman.mainint.db.*; 8 9 10 import com.teamkonzept.webman.mainint.db.queries.*; 11 import com.teamkonzept.webman.mainint.events.*; 12 import com.teamkonzept.lib.*; 13 import com.teamkonzept.field.*; 14 import com.teamkonzept.field.db.*; 15 import com.teamkonzept.db.*; 16 import com.teamkonzept.publishing.markups.*; 17 18 import java.util.*; 19 import java.sql.*; 20 21 27 public class DTDeletePresCompHandler extends DefaultEventHandler implements ParameterTypes, FrameConstants, DatabaseDefaults 28 { 29 private DTDeletePresCompHandler() 30 {} 31 32 private static DTDeletePresCompHandler instance = new DTDeletePresCompHandler(); 33 34 public static DTDeletePresCompHandler getInstance() 35 { 36 return instance; 37 } 38 39 public void handleEvent(TKEvent evt) throws TKException 40 { 41 try 42 { 43 WebManEvent.checkEvent(evt.getRemoteUser(), evt.getName(), ContextConstants.PRESENTATIONS); 44 TKQuery q = TKDBManager.newQuery(TKDBPresCompDelete.class); 45 q.setQueryParams( "PRESENTATION_ID", new Integer ( evt.getParameter( PARAMETER, "PRESENTATION_ID" ) ) ); 46 q.setQueryParams( "PRESENTATION_COMPONENT_IDX", new Integer ( evt.getParameter( PARAMETER, "PRESENTATION_COMPONENT_IDX" ) ) ); 47 q.execute(); 48 q.fetchResultSet(); 49 DTEditHandler.getInstance().handleEvent(evt); 50 } 51 catch (Throwable e) 52 { 53 throw WebmanExceptionHandler.getException(e); 55 } 56 } 57 58 public boolean isHandler(TKEvent evt) 59 { 60 return evt.getName().equalsIgnoreCase("PR_DELETE_PRES_COMP") ; 61 } 62 } 63 | Popular Tags |