KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > duplication > eventhandler > DUStartDBHandler


1 package de.webman.duplication.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.sql.*;
19 import java.io.*;
20
21
22
23
24 /************************************************************************
25 /**
26 * Anzeigen der Maske zum Neuordnen des Contenttree
27 *
28 *
29 * @param
30 */

31 public class DUStartDBHandler extends DefaultEventHandler implements ParameterTypes, FrameConstants, DatabaseDefaults
32 {
33     private DUStartDBHandler()
34     {}
35     
36     private static DUStartDBHandler instance = new DUStartDBHandler();
37     
38     public static DUStartDBHandler getInstance()
39     {
40         return instance;
41     }
42     
43     public void handleEvent(TKEvent evt) throws TKException
44     {
45         try
46         {
47
48             TKParams params = evt.getParams();
49
50             TKHTMLTemplate t = evt.getPrepHTMLTemplate( "du_intro.tmpl" );
51             if(params.getClass("PAR") != null){
52                 t.set(params.getClass("PAR"));
53             }
54             t.set( "DB_NEW_NAME", "1" );
55 /* t.doTagSubstitution();
56             t.printTemplate( out );*/

57             evt.finishTemplate(t);
58
59
60
61         }
62         catch (Throwable JavaDoc e)
63         {
64             // TO DO : Analyze Exception !
65
throw WebmanExceptionHandler.getException(e);
66         }
67     }
68     
69     public boolean isHandler(TKEvent evt)
70     {
71         return evt.getName().equalsIgnoreCase("DU_START_DB");
72     }
73         
74 }
75
Popular Tags