KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > j2biz > blogunity > IConstants


1 /*
2  * $Id: IConstants.java,v 1.12 2005/01/09 19:01:48 michelson Exp $
3  *
4  * Copyright (c) 2004 j2biz Group, http://www.j2biz.com
5  * Koeln / Duesseldorf , Germany
6  *
7  * @author Max Kalina
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */

25
26 package com.j2biz.blogunity;
27
28 import com.j2biz.blogunity.pojo.Blog;
29 import com.j2biz.blogunity.pojo.CalendarEntry;
30 import com.j2biz.blogunity.pojo.Category;
31 import com.j2biz.blogunity.pojo.Comment;
32 import com.j2biz.blogunity.pojo.Entry;
33 import com.j2biz.blogunity.pojo.Link;
34 import com.j2biz.blogunity.pojo.Referer;
35 import com.j2biz.blogunity.pojo.SystemConfiguration;
36 import com.j2biz.blogunity.pojo.Trackback;
37 import com.j2biz.blogunity.pojo.User;
38 import com.j2biz.blogunity.pojo.Userpic;
39 import com.j2biz.blogunity.pojo.VisitedPage;
40
41 /**
42  * @author michelson
43  * @version $$
44  * @since 0.1
45  *
46  *
47  */

48 public interface IConstants {
49
50     public final String JavaDoc VERSION = "@version@";
51
52     public final String JavaDoc BUILD = "@build@";
53
54     public final String JavaDoc CODENAME = "@codename@";
55
56     public final String JavaDoc BLOG_THEMES_DIRECTORY = "/WEB-INF/themes/";
57
58     public final Class JavaDoc[] PERSISTENT_CLASSES = {Blog.class, Category.class, Comment.class,
59             Entry.class, User.class, SystemConfiguration.class, Link.class, Userpic.class,
60             CalendarEntry.class, Trackback.class, Referer.class, VisitedPage.class};
61
62     public interface PATTERNS {
63
64         /*
65          * Regular-Expressions that describes all supported url-mappings for
66          * blog requests: /blogs/*.
67          *
68          */

69
70         public final String JavaDoc FRONTPAGE_PATTERN = "^/?$";
71
72         public final String JavaDoc YEAR_PATTERN = "^/\\d\\d\\d\\d/?$";
73
74         public final String JavaDoc MONTH_PATTERN = "^/\\d\\d\\d\\d/\\d\\d/?$";
75
76         public final String JavaDoc DAY_PATTERN = "^/\\d\\d\\d\\d/\\d\\d/\\d\\d/?$";
77
78         public final String JavaDoc ENTRY_PATTERN = "^/\\d\\d\\d\\d/\\d\\d/\\d\\d/[a-zA-Z0-9_-]+/?$";
79
80         public final String JavaDoc CATEGORY_PATTERN = "^/category/[0-9]+/?$";
81
82         public final String JavaDoc FEEDS_PATTERN = "^/feeds/?$";
83
84         public final String JavaDoc ATOM_03_PATTERN = "^/feeds/atom_0.3(/?|/[0-9]+)$";
85
86         public final String JavaDoc RSS_20_PATTERN = "^/feeds/rss_2.0(/?|/[0-9]+)$";
87
88         public final String JavaDoc THEME_FILE_PATTERN = "^/theme/.+$";
89
90         public final String JavaDoc IMAGE_FILE_PATTERN = "^/images/.+$";
91
92         public final String JavaDoc ATTACHMENT_FILE_PATTERN = "^/files/.+$";
93
94         public final String JavaDoc GLOBAL_CALENDAR_PATTERN = "(" + YEAR_PATTERN + "|" + MONTH_PATTERN
95                 + "|" + DAY_PATTERN + "|" + ENTRY_PATTERN + ")";
96
97         public final String JavaDoc TRACKBACK_PATTERN = "^/trackback/[0-9]+/?$";
98         
99         public final String JavaDoc SEARCH_PATTERN = "^/search/?$";
100
101         /*
102          * Regular-Expressions that describes all supported url-mappings for
103          * user requests: /users/*.
104          *
105          */

106
107         public final String JavaDoc USERPFORILE_PATTERN = "^(/?|/[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*/?)$";
108         
109         public final String JavaDoc USERPIC_PATTERN = "^/[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*/userpics/.+$";
110
111     }
112
113     public interface ServletCtx {
114         // public final String HIBERNATE_SESSION = "HibernateSession";
115
}
116
117     public interface Session {
118
119         public final String JavaDoc USER = "user";
120
121         // public final String LOCALE = "locale";
122

123         public final String JavaDoc NAVIGATION_STACK = "NaviStack";
124
125         // public final String NAVIGATION_STACK_BEFORE = "NaviStackBefore";
126
}
127
128     public interface Request {
129
130         public final String JavaDoc BLOG_THEME_DIRECTORY = "themeDir";
131
132         // public final String BLOG_NAME = "blogName";
133

134         public final String JavaDoc BLOG_ENTRY_ID = "blogEntryId";
135
136         public final String JavaDoc CURRENT_THEME_FILE = "page";
137
138         public final String JavaDoc PAGE_CONTENT = "content";
139
140         public final String JavaDoc BLOG_ENTRY = "entry";
141
142         public final String JavaDoc LOCALE = "locale";
143
144         /* possible modes that can be requested within blog */
145         //
146
// public final String BLOG_MODE = "blog";
147
//
148
// public final String STATISTIC_MODE = "statistic";
149
//
150
// public final String FEEDS_MODE = "feeds";
151
//
152
// public final String CATEGORY_MODE = "category";
153
}
154 }
Popular Tags