1 /*
2 * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/config/Interceptor.java,v 1.9 2004/10/23 13:35:38 hkollmann Exp $
3 * $Revision: 1.9 $
4 * $Date: 2004/10/23 13:35:38 $
5 *
6 * DbForms - a Rapid Application Development Framework
7 * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24 package org.dbforms.config;
25
26 import java.util.HashMap;
27 import java.util.Map;
28
29
30
31 /***
32 * <p>
33 * This class holds XML config data defining interceptors for tables. compare
34 * org.dbforms.event.DbEventInterceptor
35 * </p>
36 *
37 * @author Joachim Peer
38 */
39 public class Interceptor implements java.io.Serializable {
40 // params may contain configuration data for the interceptor
41 private Map params;
42 private String className;
43
44 /***
45 * Creates a new Interceptor object.
46 */
47 public Interceptor() {
48 params = new HashMap();
49 }
50
51 /***
52 * sets the name of the interceptor class to be invoked during runtime
53 *
54 * @param className - name of the Interceptor class
55 */
56 public void setClassName(String className) {
57 this.className = className;
58 }
59
60
61 /***
62 * returns the name of the interceptor class
63 *
64 * @return the name of the interceptor class
65 */
66 public String getClassName() {
67 return className;
68 }
69
70
71 /***
72 * DOCUMENT ME!
73 *
74 * @return DOCUMENT ME!
75 */
76 public Map getParameterMap() {
77 return params;
78 }
79
80
81 /***
82 * DOCUMENT ME!
83 *
84 * @param name DOCUMENT ME!
85 * @param value DOCUMENT ME!
86 */
87 public void addParam(String name,
88 String value) {
89 params.put(name, value);
90 }
91 }