1 package de.webman.sitetree.eventhandler; 2 3 4 import com.teamkonzept.web.*; 5 import com.teamkonzept.webman.*; 6 import com.teamkonzept.webman.db.TKWebmanDBManager; 7 import com.teamkonzept.webman.mainint.*; 8 import com.teamkonzept.webman.mainint.db.*; 9 10 11 import com.teamkonzept.webman.mainint.db.queries.*; 12 import com.teamkonzept.webman.mainint.events.*; 13 import com.teamkonzept.lib.*; 14 import com.teamkonzept.field.*; 15 import com.teamkonzept.field.db.*; 16 import com.teamkonzept.db.*; 17 import com.teamkonzept.publishing.markups.*; 18 19 import java.sql.*; 20 import java.io.*; 21 import java.util.*; 22 23 30 public class STUpdateComponentHandler extends DefaultEventHandler implements ParameterTypes, FrameConstants, DatabaseDefaults 31 { 32 private STUpdateComponentHandler() 33 {} 34 35 private static STUpdateComponentHandler instance = new STUpdateComponentHandler(); 36 37 public static STUpdateComponentHandler getInstance() 38 { 39 return instance; 40 } 41 42 public void handleEvent(TKEvent evt) throws TKException 43 { 44 try 45 { 46 WebManEvent.checkEvent(evt.getRemoteUser(), evt.getName(), ContextConstants.SITE_TREE); 47 String sel = evt.getParameter( PARAMETER, "ATTACH_SEL" ); 48 if( sel.equals( "GC" ) ) { STRefineSelectionHandler.getInstance().handleEvent(evt); 50 return; 51 } 52 SiteTreeUtils.updateContentComponent( evt, null, "SINGLE_CONTENT_NODE_ID" ); 53 STEditDocumentHandler.getInstance().handleEvent(evt); 54 } 55 catch (Throwable e) 56 { 57 throw WebmanExceptionHandler.getException(e); 59 } 60 } 61 62 public boolean isHandler(TKEvent evt) 63 { 64 return evt.getName().equalsIgnoreCase("ST_UPDATE_COMPONENT"); 65 } 66 } 67 | Popular Tags |