View Javadoc

1   /*
2    * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/event/AbstractNavEventFactory.java,v 1.1 2005/11/30 20:31:17 hkollmann Exp $
3    * $Revision: 1.1 $
4    * $Date: 2005/11/30 20:31:17 $
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.event;
25  
26  import org.dbforms.config.DbFormsConfig;
27  import org.dbforms.config.Table;
28  
29  import javax.servlet.http.HttpServletRequest;
30  
31  
32  
33  /***
34   * The NavEventFactory abstract class provides the interface for a  Navigation
35   * Event concrete class (see NavEventFactoryImpl).
36   *
37   * @author Luca Fossato
38   */
39  public abstract class AbstractNavEventFactory extends AbstractEventFactory {
40     /*** classes used as constructor arguments types */
41     static final Class[] actionConstructorArgsTypes = new Class[] {
42                                                                    Table.class,
43                                                                    HttpServletRequest.class,
44                                                                    DbFormsConfig.class
45                                                                 };
46  
47     /*** classes used as constructor arguments types */
48     static final Class[] goToConstructorArgsTypes = new Class[] {
49                                                                  Table.class,
50                                                                  HttpServletRequest.class,
51                                                                  DbFormsConfig.class,
52                                                                  String.class
53                                                               };
54  
55     /*** classes used as constructor arguments types */
56     static final Class[] goToConstructorArgsTypes2 = new Class[] {
57                                                                   Table.class,
58                                                                   HttpServletRequest.class,
59                                                                   DbFormsConfig.class,
60                                                                   String.class,
61                                                                   String.class
62                                                                };
63  
64     /***
65      * Create and return a new navigation event.
66      *
67      * @param action the action string that identifies the web event
68      * @param request the HttpServletRequest object
69      * @param config the DbForms config object
70      * @param table to use
71      *
72      * @return a new navigation event
73      */
74     public abstract AbstractNavigationEvent createEvent(String             action,
75                                                 HttpServletRequest request,
76                                                 DbFormsConfig      config,
77                                                 Table              table);
78  
79  
80     /***
81      * Create and return a new navGoto event.
82      *
83      * @param table the Table object
84      * @param request the request object
85      * @param config the configuration object
86      * @param positionString the position string object
87      *
88      * @return a new navGoto event
89      */
90     public abstract AbstractNavigationEvent createGotoEvent(Table              table,
91                                                     HttpServletRequest request,
92                                                     DbFormsConfig      config,
93                                                     String             positionString);
94  
95  
96     /***
97      * Create and return a new navGoto event.
98      *
99      * @param table the Table object
100     * @param request the request object
101     * @param config the configuration object
102     * @param whereClause the SQL where clause
103     * @param tableList the list of tables involved into the event procession
104     *
105     * @return a new navGoto event
106     */
107    public abstract AbstractNavigationEvent createGotoEvent(Table              table,
108                                                    HttpServletRequest request,
109                                                    DbFormsConfig      config,
110                                                    String             whereClause,
111                                                    String             tableList);
112 }