001: package com.openedit.page;
002:
003: /**
004: * @author Matthew Avery
005: *
006: * Created on Feb 15, 2004
007: *
008: */
009: public interface PageRequestKeys {
010: /**
011: * The HttpServletRequest
012: *
013: * Use "$request" in the Velocity page.
014: */
015: public static final String REQUEST = "request";
016: /**
017: * The HttpServletResponse
018: *
019: * Use "$response" in the Velocity page.
020: */
021: public static final String RESPONSE = "response";
022: /**
023: * The HttpSession
024: *
025: * Use "$session" in the Velocity page.
026: */
027: public static final String SESSION = "session";
028: /**
029: * The ServletContext
030: *
031: * Use "$application" in the Velocity page.
032: */
033: public static final String SERVLET_CONTEXT = "application";
034: /**
035: * The Servlet output stream
036: *
037: * Use "$out" in the Velocity page.
038: */
039: public static final String OUTPUT_STREAM = "out";
040: /**
041: * A writer that wraps the servlet output stream
042: *
043: * Use "$wout" in the Velocity page.
044: */
045: public static final String OUTPUT_WRITER = "wout";
046: /**
047: * The JPublish URLUtilities object which provides several static methods
048: * for manipulating paths.
049: *
050: * Use "$url_util" in the Velocity page.
051: */
052: public static final String URL_UTILITIES = "url_util";
053: /**
054: * The servlet context path, e.g. if the root of an Open Edit site is at
055: * http://mydomain.org/oesite, the "home" variable will contain the String
056: * "oesite".
057: *
058: * Use "$home" in the Velocity page.
059: */
060: public static final String HOME = "home";
061:
062: /**
063: * This is the full address of the web server. i.e. http://www.abc.com:80
064: */
065: public static final String WEB_SERVER_PATH = "webserverpath";
066: /**
067: * This is a relative chunk of the URL path used to help locate relative resources.
068: * If a resource is located at http://mydomain.org/oesite/foo/index.html, the
069: * urlpath variable will contain the String "oesite/foo" so that we can easily
070: * find, for instance, oesite/foo/navbar.html
071: *
072: * Use "$urlpath" in the Velocity page.
073: */
074: public static final String URL_PATH = "urlpath";
075: /**
076: * This is a relative chunk of the filepath used to help locate relative resources
077: * within a Velocity page. for a url of /content/about/about.html -> /content/about
078: *
079: * Use "$filepath" in the Velocity page.
080: */
081: public static final String FILE_PATH = "filepath";
082:
083: /**
084: * This is a Browser object, created from the request header that provides
085: * some convenience method for dealing with different browser types and OSes
086: * when different behavior is required.
087: *
088: * Use "$browser" in the Velocity page.
089: */
090: public static final String BROWSER = "browser";
091: /**
092: * If a user is logged in to Open Edit, the User object will be available
093: * in Velocity.
094: *
095: * Use "$user" in the Velocity page.
096: */
097: public static final String USER = "user";
098: /**
099: * A DynamicPage object representing the current page. Page properties
100: * can be accessed by the "get" method of this object.
101: *
102: * Use "$page" in the Velocity page.
103: */
104: public static final String PAGE = "page";
105:
106: /**
107: * An alias for the "page" variable
108: *
109: * Use "$content" in the Velocity page.
110: */
111: public static final String CONTENT = "content";
112: /**
113: * This nifty class instantiation tool is something we found on the Velocity
114: * mailing list. It is used for instantiating new classes within a Velocity
115: * page.
116: *
117: * Use "$classtool" in the Velocity page.
118: */
119: public static final String CLASSTOOL = "classtool";
120:
121: /**
122: * A PageStreamer object which allows dynamic pages to make a callback to the
123: * OpenEditEngine in order tor stream in content from other pages.
124: *
125: * Use "$page" in the Velocity page.
126: */
127: public static final String PAGES = "pages";
128:
129: /**
130: * Since not all path actions can be reliably secured we allow all actions to be turned off by
131: * default.
132: */
133: public static final String ALLOWPATHREQUESTACTIONS = "allowpathrequestactions";
134:
135: /**
136: * Allows an action to specify an alternative layout.
137: * NOLAYOUT is a valid value
138: */
139: public static final String LAYOUTOVERRIDE = "layoutoverride";
140:
141: /**
142: * Allows an action to specify an alternative inner layout. This applies to all inner pages
143: * NOLAYOUT is a valid value
144: */
145: public static final String INNERLAYOUTOVERRIDE = "innerlayoutoverride";
146:
147: }
|