KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > content > eventhandler > CEEditNodeHandler


1 package de.webman.content.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 import com.teamkonzept.webman.mainint.db.queries.*;
9 import com.teamkonzept.webman.mainint.events.*;
10 import com.teamkonzept.lib.*;
11 import com.teamkonzept.field.*;
12 import com.teamkonzept.field.db.*;
13 import com.teamkonzept.db.*;
14 import com.teamkonzept.publishing.markups.*;
15
16 import java.sql.*;
17 import java.io.*;
18
19 /**
20 * Editieren eines existierenden node (Name)
21 *
22 *
23  * @author $Author: sebastian $
24  * @version $Revision: 1.7 $
25 */

26 public class CEEditNodeHandler extends DefaultEventHandler implements ParameterTypes, FrameConstants, DatabaseDefaults
27 {
28     private CEEditNodeHandler()
29     {}
30     
31     private static CEEditNodeHandler instance = new CEEditNodeHandler();
32     
33     public static CEEditNodeHandler getInstance()
34     {
35         return instance;
36     }
37     
38     /**
39         in boolean keepOpen
40     */

41     public void handleEvent(TKEvent evt) throws TKException
42     {
43         try
44         {
45             CEUtils.checkEvent(evt);
46             TKHTMLTemplate t = evt.getPrepHTMLTemplate( "ce_editNode.tmpl" );
47             
48             t.set( evt.getParams().getClass( PARAMETER ) );
49
50             // if (evt.getName().equalsIgnoreCase("CE_EDIT_NODE")) alex - ist das so richtig ?
51
TreeUtils.keepOpenNodes( evt, t );
52
53             evt.finishTemplate(t);
54         }
55         catch (Throwable JavaDoc e)
56         {
57             // TO DO : Analyze Exception !
58
throw WebmanExceptionHandler.getException(e);
59         }
60     }
61     
62     public boolean isHandler(TKEvent evt)
63     {
64     return (evt.getName().equalsIgnoreCase("CE_EDIT_GROUP_CONTENT")
65             || evt.getName().equalsIgnoreCase("CE_EDIT_NODE")
66             || evt.getName().equalsIgnoreCase("CE_RENAME_SINGLE_NODE")
67             || evt.getName().equalsIgnoreCase("CE_RENAME_GROUP_NODE"));
68     }
69 }
70
Popular Tags