01: /*
02: * This file is part of PFIXCORE.
03: *
04: * PFIXCORE is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU Lesser General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * PFIXCORE is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public License
15: * along with PFIXCORE; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: *
18: */
19: package de.schlund.pfixcore.workflow.app;
20:
21: import de.schlund.pfixcore.generator.IHandler;
22: import de.schlund.pfixcore.workflow.Context;
23: import de.schlund.pfixxml.config.PageRequestConfig;
24:
25: /**
26: * All classes which want to act as a container for classes
27: * which implement the {@link IHandler} interface must
28: * implement this interface. A IHandlerContainer contains
29: * all IHandler belonging to a single page and it is shared
30: * between sessions.
31: */
32: public interface IHandlerContainer {
33:
34: //~ Methods ....................................................................................
35:
36: /**
37: * Initialize all IHandlers in this container.
38: * @param config Configuration for pagerequest
39: */
40: void initIHandlers(PageRequestConfig config);
41:
42: /**
43: * Determine if the requested page is accesible.
44: * @param context the context identifying the current page
45: * @return true if page is accesible, else false
46: * @throws Exception on errors
47: */
48: boolean isPageAccessible(Context context) throws Exception;
49:
50: /**
51: * Determine if the IHandler in this container are active.
52: * @param context the context identifying the current page
53: * @return true if handler are active, else false
54: * @throws Exception on errors
55: *
56: */
57: boolean areHandlerActive(Context context) throws Exception;
58:
59: /**
60: * Determine if any of the IHandler in this container needs data.
61: * @param context the context identifying the current page
62: * @return true if handler need data, else false
63: * @throws Exception on errors
64: */
65: boolean needsData(Context context) throws Exception;
66: }
|