KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > blojsom > util > BlojsomConstants


1 /**
2  * Copyright (c) 2003-2006, David A. Czarnecki
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and the
9  * following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
11  * following disclaimer in the documentation and/or other materials provided with the distribution.
12  * Neither the name of "David A. Czarnecki" and "blojsom" nor the names of its contributors may be used to
13  * endorse or promote products derived from this software without specific prior written permission.
14  * Products derived from this software may not be called "blojsom", nor may "blojsom" appear in their name,
15  * without prior written permission of David A. Czarnecki.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21  * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */

31 package org.blojsom.util;
32
33 /**
34  * BlojsomConstants
35  *
36  * @author David Czarnecki
37  * @author Mark Lussier
38  * @since blojsom 3.0
39  * @version $Id: BlojsomConstants.java,v 1.17 2006/09/18 18:30:54 czarneckid Exp $
40  */

41 public interface BlojsomConstants {
42
43     /**
44      * blojsom version
45      */

46     public static final String JavaDoc BLOJSOM_VERSION_NUMBER = "blojsom v3.0";
47
48     /**
49      * Key under which blog information will be placed
50      * (example: on the request for the JSPDispatcher)
51      */

52     public static final String JavaDoc BLOJSOM_BLOG = "BLOJSOM_BLOG";
53
54     /**
55      * Key under which the blog entries will be placed
56      * (example: on the request for the JSPDispatcher)
57      */

58     public static final String JavaDoc BLOJSOM_ENTRIES = "BLOJSOM_ENTRIES";
59
60     /**
61      * Key under which the blog categories will be placed
62      * (example: on the request for the JSPDispatcher)
63      */

64     public static final String JavaDoc BLOJSOM_CATEGORIES = "BLOJSOM_CATEGORIES";
65
66     /**
67      * Key under which all the blog categories will be placed
68      * (example: on the request for the JSPDispatcher)
69      */

70     public static final String JavaDoc BLOJSOM_ALL_CATEGORIES = "BLOJSOM_ALL_CATEGORIES";
71
72     /**
73      * Key under which the date (RFC 822 format) of the blog will be placed
74      * (example: on the request for the JSPDispatcher)
75      */

76     public static final String JavaDoc BLOJSOM_DATE = "BLOJSOM_DATE";
77
78     /**
79      * Key under which the date (ISO 8601 format) of the blog will be placed
80      * (example: on the request for the JSPDispatcher)
81      */

82     public static final String JavaDoc BLOJSOM_DATE_ISO8601 = "BLOJSOM_DATE_ISO8601";
83
84     /**
85      * Key under which the date object of the blog will be placed
86      * (example: on the request for the JSPDispatcher)
87      */

88     public static final String JavaDoc BLOJSOM_DATE_OBJECT = "BLOJSOM_DATE_OBJECT";
89
90     /**
91      * Key under which the date (UTC format) of the blog will be placed
92      * (example: on the request for the JSPDispatcher)
93      */

94     public static final String JavaDoc BLOJSOM_DATE_UTC = "BLOJSOM_DATE_UTC";
95
96     /**
97      * Key under which the blog site will be placed
98      * (example: on the request for the JSPDispatcher)
99      */

100     public static final String JavaDoc BLOJSOM_SITE_URL = "BLOJSOM_SITE_URL";
101
102     /**
103      * Key under which the permalink value will be placed. This is used to allow templates
104      * to generate trackback auto-discovery fragments.
105      * (example: on the request for the JSPDispatcher)
106      */

107     public static final String JavaDoc BLOJSOM_PERMALINK = "BLOJSOM_PERMALINK";
108
109     /**
110      * Key under which the next entry after the permalink value will be placed. This is used to allow templates
111      * to generate linear post navigation links.
112      * (example: on the request for the JSPDispatcher)
113      */

114     public static final String JavaDoc BLOJSOM_PERMALINK_NEXT_ENTRY = "BLOJSOM_PERMALINK_NEXT_ENTRY";
115
116     /**
117      * Key under which the previous entry after the permalink value will be placed. This is used to allow templates
118      * to generate linear post navigation links.
119      * (example: on the request for the JSPDispatcher)
120      */

121     public static final String JavaDoc BLOJSOM_PERMALINK_PREVIOUS_ENTRY = "BLOJSOM_PERMALINK_PREVIOUS_ENTRY";
122
123     /**
124      * Key under which the requested category will be placed
125      * (example: on the request for the JSPDispatcher)
126      */

127     public static final String JavaDoc BLOJSOM_REQUESTED_CATEGORY = "BLOJSOM_REQUESTED_CATEGORY";
128
129     /**
130      * Key under which the lastmodified date of the blog will be placed
131      * (example: on the request for the JSPDispatcher)
132      */

133     public static final String JavaDoc BLOJSOM_LAST_MODIFIED = "BLOJSOM_LAST_MODIFIED";
134
135     /**
136      * Key under which the blog id will be placed
137      * (example: on the request for the JSPDispatcher)
138      */

139     public static final String JavaDoc BLOJSOM_BLOG_ID = "BLOJSOM_BLOG_ID";
140
141     /**
142      * Key under which the blojsom version string will be placed
143      * (example: on the request for the JSP dispatcher)
144      */

145     public static final String JavaDoc BLOJSOM_VERSION = "BLOJSOM_VERSION";
146
147     /**
148      * Key under which the blojsom requested flavor string will be placed
149      * (example: in the context for the Velocity dispatcher)
150      */

151     public static final String JavaDoc BLOJSOM_REQUESTED_FLAVOR = "BLOJSOM_REQUESTED_FLAVOR";
152
153     /**
154      * Key under which the plugins will be placed
155      * (example: in the context for the Velocity dispatcher)
156      */

157     public static final String JavaDoc BLOJSOM_PLUGINS = "BLOJSOM_PLUGINS";
158
159     /**
160      * Key under which the resource manager will be placed
161      * (example: in the context for the Velocity dispatcher)
162      */

163     public static final String JavaDoc RESOURCE_MANAGER_CONTEXT_KEY = "BLOJSOM_RESOURCE_MANAGER";
164
165     public static final String JavaDoc BLOJSOM_APPLICATION_CONTEXT = "BLOJSOM_APPLICATION_CONTEXT";
166     public static final String JavaDoc BLOJSOM_XMLRPC_APPLICATION_CONTEXT = "BLOJSOM_XMLRPC_APPLICATION_CONTEXT";
167     public static final String JavaDoc BLOJSOM_COMMENTAPI_APPLICATION_CONTEXT = "BLOJSOM_COMMENTAPI_APPLICATION_CONTEXT";
168
169     /**
170      * UTF-8 encoding
171      */

172     public static final String JavaDoc UTF8 = "UTF-8";
173
174     /**
175      * Default flavor for blojsom if none is requested or the flavor requested is invalid
176      */

177     public static final String JavaDoc DEFAULT_FLAVOR_HTML = "html";
178
179     /**
180      * Request parameter for the requested "flavor"
181      */

182     public static final String JavaDoc FLAVOR_PARAM = "flavor";
183
184     /**
185      * Request parameter for a "permalink"
186      */

187     public static final String JavaDoc PERMALINK_PARAM = "permalink";
188
189     /**
190      * Request parameter for the "plugins"
191      */

192     public static final String JavaDoc PLUGINS_PARAM = "plugins";
193
194     /**
195      * Request parameter for the "page"
196      */

197     public static final String JavaDoc PAGE_PARAM = "page";
198
199     /**
200      * Request parameter value for the archive page
201      */

202     public static final String JavaDoc PAGE_PARAM_ARCHIVE = "archive";
203
204     /**
205      * Request parameter value for not toggling LastModfied and ETag fromgetting generated
206      */

207     public static final String JavaDoc OVERRIDE_LASTMODIFIED_PARAM = "lastmodified";
208
209     /**
210      * Request parameter for the "category"
211      */

212     public static final String JavaDoc CATEGORY_PARAM = "category";
213
214     /**
215      * Request parameter for the "blog id"
216      */

217     public static final String JavaDoc BLOG_ID_PARAM = "blog_id";
218
219     /**
220      * Value indicating all subdirectories under the blog home should be searched
221      */

222     public static final int INFINITE_BLOG_DEPTH = -1;
223
224     /**
225      * Default language for blog if none supplied (en)
226      */

227     public static final String JavaDoc BLOG_LANGUAGE_DEFAULT = "en";
228
229     /**
230      * Default country for blog if none supplied (US)
231      */

232     public static final String JavaDoc BLOG_COUNTRY_DEFAULT = "US";
233
234     /**
235      * Default time zone (America/New_York)
236      */

237     public static final String JavaDoc BLOG_DEFAULT_TIMEZONE = "America/New_York";
238
239     /**
240      * Default number of blog entries to display
241      */

242     public static final int BLOG_ENTRIES_DISPLAY_DEFAULT = 15;
243
244     /**
245      * HTTP Header Name representing the Last Modified Timstamp of the blog (GMT Based)
246      */

247     public static final String JavaDoc HTTP_LASTMODIFIED = "Last-Modified";
248
249     /**
250      * HTTP Header Name representing the ETag of the blog
251      */

252     public static final String JavaDoc HTTP_ETAG = "ETag";
253
254     /**
255      * RFC 822 style date format
256      */

257     public static final String JavaDoc RFC_822_DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
258
259     /**
260      * ISO 8601 style date format
261      * ISO 8601 [W3CDTF] date format (used in rdf flavor)
262      */

263     public static final String JavaDoc ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssz";
264
265     /**
266      * Short ISO 8601 style date format
267      */

268     public static final String JavaDoc SHORT_ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
269
270     /**
271      * UTC style date format
272      */

273     public static final String JavaDoc UTC_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
274
275     /**
276      * If a entry is longer that this length, then when any content hashing is performed, it is
277      * truncated to this size. NOTE: This only truncates for hash.
278      */

279     public static final int MAX_HASHABLE_LENGTH = 300;
280
281     /**
282      * Line separator for the system
283      */

284     public static final String JavaDoc LINE_SEPARATOR = System.getProperty("line.separator");
285
286     public static final String JavaDoc DEFAULT_DIGEST_ALGORITHM = "MD5";
287
288     public static final String JavaDoc WHITESPACE = " \t\n\f\r";
289
290     public static final String JavaDoc REDIRECT_TO_PARAM = "redirect_to";
291
292     public static final String JavaDoc PAGE_NUMBER_PARAM = "pg_num";
293
294     public static final String JavaDoc BLOJSOM_AJAX_STATUS = "BLOJSOM_AJAX_STATUS";
295     public static final String JavaDoc SUCCESS = "success";
296     public static final String JavaDoc FAILURE = "failure";
297
298     public static final String JavaDoc PERMISSION_SUFFIX = "_permission";
299
300     /**
301      * Various HTTP caching headers
302      */

303     public static final String JavaDoc PRAGMA_HTTP_HEADER = "Pragma";
304     public static final String JavaDoc CACHE_CONTROL_HTTP_HEADER = "Cache-Control";
305     public static final String JavaDoc NO_CACHE_HTTP_HEADER_VALUE = "no-cache";
306
307     // Blojsom properties
308
public static final String JavaDoc DEFAULT_BLOG_IP = "default-blog";
309     public static final String JavaDoc TEMPLATES_DIRECTORY_IP = "templates-directory";
310     public static final String JavaDoc RESOURCES_DIRECTORY_IP = "resources-directory";
311     public static final String JavaDoc DEFAULT_CONFIGURATION_BASE_DIRECTORY = "/WEB-INF/";
312     public static final String JavaDoc BLOGS_DIRECTORY_IP = "blogs-directory";
313     public static final String JavaDoc DEFAULT_BLOGS_DIRECTORY = "/blogs/";
314     public static final String JavaDoc BOOTSTRAP_DIRECTORY_IP = "bootstrap-directory";
315     public static final String JavaDoc DEFAULT_BOOTSTRAP_DIRECTORY = "/bootstrap/";
316     public static final String JavaDoc DEFAULT_TEMPLATES_DIRECTORY = "/templates/";
317     public static final String JavaDoc DEFAULT_RESOURCES_DIRECTORY = "/resources/";
318     public static final String JavaDoc INSTALLED_LOCALES_IP = "installed-locales";
319
320     // Blog properties
321
public static final String JavaDoc BLOG_NAME_IP = "blog-name";
322     public static final String JavaDoc BLOG_DEPTH_IP = "blog-directory-depth";
323     public static final String JavaDoc BLOG_LANGUAGE_IP = "blog-language";
324     public static final String JavaDoc BLOG_COUNTRY_IP = "blog-country";
325     public static final String JavaDoc BLOG_DESCRIPTION_IP = "blog-description";
326     public static final String JavaDoc BLOG_URL_IP = "blog-url";
327     public static final String JavaDoc BLOG_ADMIN_URL_IP = "blog-admin-url";
328     public static final String JavaDoc BLOG_BASE_URL_IP = "blog-base-url";
329     public static final String JavaDoc BLOG_BASE_ADMIN_URL_IP = "blog-base-admin-url";
330     public static final String JavaDoc BLOG_ENTRIES_DISPLAY_IP = "blog-entries-display";
331     public static final String JavaDoc BLOG_AUTHORIZATION_IP = "blog-authorization";
332     public static final String JavaDoc BLOG_OWNER = "blog-owner";
333     public static final String JavaDoc BLOG_OWNER_EMAIL = "blog-owner-email";
334     public static final String JavaDoc BLOG_COMMENTS_ENABLED_IP = "blog-comments-enabled";
335     public static final String JavaDoc BLOG_TRACKBACKS_ENABLED_IP = "blog-trackbacks-enabled";
336     public static final String JavaDoc BLOG_PINGBACKS_ENABLED_IP = "blog-pingbacks-enabled";
337     public static final String JavaDoc BLOG_EMAIL_ENABLED_IP = "blog-email-enabled";
338     public static final String JavaDoc BLOJSOM_PLUGIN_CHAIN = "blojsom-plugin-chain";
339     public static final String JavaDoc BLOG_DEFAULT_FLAVOR_IP = "blog-default-flavor";
340     public static final String JavaDoc LINEAR_NAVIGATION_ENABLED_IP = "linear-navigation-enabled";
341     public static final String JavaDoc XMLRPC_ENABLED_IP = "xmlrpc-enabled";
342     public static final String JavaDoc BLOG_ADMINISTRATION_LOCALE_IP = "blog-administration-locale";
343     public static final String JavaDoc USE_ENCRYPTED_PASSWORDS = "use-encrypted-passwords";
344     public static final String JavaDoc DIGEST_ALGORITHM = "digest-algorithm";
345     public static final String JavaDoc RECURSIVE_CATEGORIES = "recursive-categories";
346     public static final String JavaDoc PREFERRED_SYNDICATION_FLAVOR = "preferred-syndication-flavor";
347     public static final String JavaDoc USE_DYNAMIC_BLOG_URLS = "use-dynamic-blog-urls";
348     public static final String JavaDoc RECENT_COMMENTS_COUNT = "recent-comments-count";
349     public static final int DEFAULT_RECENT_COMMENTS_COUNT = 5;
350     public static final String JavaDoc RECENT_TRACKBACKS_COUNT = "recent-trackbacks-count";
351     public static final int DEFAULT_RECENT_TRACKBACKS_COUNT = 5;
352     public static final String JavaDoc RECENT_PINGBACKS_COUNT = "recent-pingbacks-count";
353     public static final int DEFAULT_RECENT_PINGBACKS_COUNT = 5;
354     public static final String JavaDoc DEFAULT_POST_CATEGORY = "default-post-category";
355
356     // User preferences
357
public static final String JavaDoc USE_RICHTEXT_EDITOR_PREFERENCE = "use-richtext-editor";
358     public static final String JavaDoc DISPLAY_RESPONSE_TEXT_PREFERENCE = "display-response-text";
359 }
360
361
Popular Tags