KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > context > WebContext


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2005 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.context;
14
15 import info.magnolia.cms.beans.runtime.File;
16 import info.magnolia.cms.beans.runtime.MultipartForm;
17 import info.magnolia.cms.core.Content;
18
19 import java.util.Map JavaDoc;
20
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22
23
24 /**
25  * @author Philipp Bracher
26  * @version $Revision: 7441 $ ($Author: philipp $)
27  */

28 public interface WebContext extends Context {
29
30     /**
31      * Method used to initialize the context
32      */

33     public void init(HttpServletRequest JavaDoc request);
34
35     /**
36      * Get currently active page
37      * @return content object
38      */

39     public Content getActivePage();
40
41     /**
42      * Get aggregated file, its used from image templates to manipulate
43      * @return file object
44      */

45     public File getFile();
46
47     /**
48      * Get form object assembled by <code>MultipartRequestFilter</code>
49      * @return multipart form object
50      */

51     public MultipartForm getPostedForm();
52
53     /**
54      * Get parameter value as string
55      * @param name
56      * @return parameter value
57      */

58     public String JavaDoc getParameter(String JavaDoc name);
59
60     /**
61      * Get parameter value as string
62      * @return parameter values
63      */

64     public Map JavaDoc getParameters();
65
66     /**
67      * Get the current context path
68      * @return
69      */

70     public String JavaDoc getContextPath();
71     
72     /**
73      * Avoid the call to this method where ever possible.
74      * @return Returns the request.
75      */

76     public HttpServletRequest JavaDoc getRequest();
77 }
Popular Tags