01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.core;
15:
16: import javax.servlet.ServletRequest;
17:
18: /**
19: * Is the ItsNat wrapper of the <code>javax.servlet.ServletRequest</code> object.
20: *
21: * @author Jose Maria Arranz Santamaria
22: */
23: public interface ItsNatServletRequest extends ItsNatUserData {
24: /**
25: * Returns the wrapped <code>javax.servlet.ServletRequest</code> object.
26: *
27: * @return the wrapped servlet request object. Can not be null.
28: */
29: public ServletRequest getServletRequest();
30:
31: /**
32: * Returns the ItsNat servlet associated to this request.
33: *
34: * @return the ItsNat servlet. Can not be null.
35: */
36: public ItsNatServlet getItsNatServlet();
37:
38: /**
39: * Returns the ItsNat session associated to this request.
40: *
41: * @return the ItsNat session. Can not be null.
42: */
43: public ItsNatSession getItsNatSession();
44:
45: /**
46: * Returns the ItsNat document associated to this request.
47: *
48: * @return the ItsNat document. If null no document could be loaded/accessed.
49: */
50: public ItsNatDocument getItsNatDocument();
51:
52: /**
53: * Returns the client document, this object mirrors the user (client) document/page
54: * sending this request.
55: *
56: * @return the client document. Is null if {@link #getItsNatDocument()} is null too.
57: */
58: public ClientDocument getClientDocument();
59:
60: /**
61: * Creates a variable resolver bound to this request.
62: *
63: * @return a variable resolver bound to this request.
64: */
65: public ItsNatVariableResolver createItsNatVariableResolver();
66:
67: /**
68: * Returns the document referrer. This referrer document was the previous page
69: * and the document related to this request is the target using classic
70: * navigation (not an AJAX event).
71: *
72: * <p>The referrer and AJAX features of the source document must be enabled
73: * (see {@link DocumentTemplate#setReferrerEnabled(boolean)} and
74: * {@link DocumentTemplate#setAJAXEnabled(boolean)}) otherwise returns null. </p>
75: *
76: * <p>Document referrer is not available if the target document was requested
77: * using a direct URL (written on the browser URL bar) or, in the Internet Explorer
78: * case, the target document is the result of a reload button click. </p>
79: *
80: * <p>Only the first request (the loading document phase) has access to the
81: * document referrer, subsequent requests (AJAX events) return null.</p>
82: *
83: * <p>The document referrer is still live but is going to be unloaded.</p>
84: *
85: * @return the document referrer. May be null.
86: */
87: public ItsNatDocument getItsNatDocumentReferrer();
88: }
|