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:
20: package de.schlund.pfixcore.workflow;
21:
22: import java.util.Properties;
23:
24: import javax.servlet.http.HttpServletResponse;
25:
26: import de.schlund.pfixxml.PfixServletRequest;
27:
28: /**
29: * The <code>DirectOutputState</code> interface is implemented by classes that wish to produce
30: * the Output for a request directly. This is in contrast to the
31: * {@link State} interface that is implemented by classes that produce a DOM tree as their response.
32: *
33: * @author <a href="mailto:jtl@schlund.de">Jens Lautenbacher</a>
34: */
35: public interface DirectOutputState {
36: /**
37: * <code>isAccessible</code> can be called to check if the DirectOutputState is accessible.
38: *
39: * @param crm a <code>ContextResourceManager</code> that comes from a foreign ContextXMLServlet.
40: * @param props the <code>Properties</code> associated with the current PageRequest.
41: * @param preq the current <code>PfixServletRequest</code>.
42: * @return a <code>boolean</code> value: trueif accessible, false if not.
43: * @exception Exception if an error occurs
44: */
45: boolean isAccessible(ContextResourceManager crm, Properties props,
46: PfixServletRequest preq) throws Exception;
47:
48: /**
49: * Describe <code>handleRequest</code> method here.
50: *
51: * @param crm a <code>ContextResourceManager</code> that comes from a foreign ContextXMLServlet.
52: * @param props the <code>Properties</code> associated with the current PageRequest.
53: * @param preq the current <code>PfixServletRequest</code>.
54: * @param res the curent <code>HttpServletResponse</code>.
55: * @exception Exception if an error occurs
56: */
57: void handleRequest(ContextResourceManager crm, Properties props,
58: PfixServletRequest preq, HttpServletResponse res)
59: throws Exception;
60: }
|