KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > blojsom > blog > Blog


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.blog;
32
33 import java.util.Map JavaDoc;
34 import java.util.Locale JavaDoc;
35
36 /**
37  * Blog
38  *
39  * @author David Czarnecki
40  * @since blojsom 3.0
41  * @version $Id: Blog.java,v 1.5 2006/09/26 02:55:21 czarneckid Exp $
42  */

43 public interface Blog {
44
45     /**
46      * Retrieve the unique id
47      *
48      * @return Unique ID
49      */

50     public Integer JavaDoc getId();
51
52     /**
53      * Set the id
54      *
55      * @param id Unique ID
56      */

57     public void setId(Integer JavaDoc id);
58
59     /**
60      * Retrieve the blog ID
61      *
62      * @return Blog ID
63      */

64     public String JavaDoc getBlogId();
65
66     /**
67      * Set the blog ID
68      *
69      * @param blogID Blog ID
70      */

71     public void setBlogId(String JavaDoc blogID);
72
73     /**
74      * Get a map of the templates
75      *
76      * @return Map of the templates
77      */

78     public Map JavaDoc getTemplates();
79
80     /**
81      * Set the templates
82      *
83      * @param templates Map of the templates
84      */

85     public void setTemplates(Map JavaDoc templates);
86
87     /**
88      * Get a map of the plugins
89      *
90      * @return Map of the plugins
91      */

92     public Map JavaDoc getPlugins();
93
94     /**
95      * Set the plugins
96      *
97      * @param plugins Plugins
98      */

99     public void setPlugins(Map JavaDoc plugins);
100
101     /**
102      * Get the properties for the blog
103      *
104      * @return Properties for the blog
105      */

106     public Map JavaDoc getProperties();
107
108     /**
109      * Set the properties for the blog
110      *
111      * @param properties Blog properties
112      */

113     public void setProperties(Map JavaDoc properties);
114
115     /**
116      * Name of the blog
117      *
118      * @return Blog name
119      */

120     String JavaDoc getBlogName();
121
122     /**
123      * Returns the HTML escaped name of the blog
124      *
125      * @return Name of the blog that has been escaped
126      */

127     String JavaDoc getEscapedBlogName();
128
129     /**
130      * Description of the blog
131      *
132      * @return Blog description
133      */

134     String JavaDoc getBlogDescription();
135
136     /**
137      * Returns the HTML escaped description of the blog
138      *
139      * @return Description of the blog that has been escaped
140      */

141     String JavaDoc getEscapedBlogDescription();
142
143     /**
144      * URL for the blog
145      *
146      * @return Blog URL
147      */

148     String JavaDoc getBlogURL();
149
150     /**
151      * Admin URL for the blog
152      *
153      * @return Blog admin URL
154      */

155     String JavaDoc getBlogAdminURL();
156
157     /**
158      * Base admin URL for the blog
159      *
160      * @return Blog base admin URL
161      */

162     String JavaDoc getBlogBaseAdminURL();
163
164     /**
165      * Base URL for the blog
166      *
167      * @return Blog base URL
168      */

169     String JavaDoc getBlogBaseURL();
170
171     /**
172      * Language of the blog
173      *
174      * @return Blog language
175      */

176     String JavaDoc getBlogLanguage();
177
178     /**
179      * Country of the blog
180      *
181      * @return Country for the blog
182      */

183     String JavaDoc getBlogCountry();
184
185     /**
186      * Return the number of blog entries to retrieve from the individual categories
187      *
188      * @return Blog entries to retrieve from the individual categories
189      */

190     int getBlogDisplayEntries();
191
192     /**
193      * Return the blog owner's e-mail address
194      *
195      * @return Blog owner's e-mail
196      */

197     String JavaDoc getBlogOwnerEmail();
198
199     /**
200      * Return the blog owner's name
201      *
202      * @return Blog owner's name
203      */

204     String JavaDoc getBlogOwner();
205
206     /**
207      * Return whether or not comments are enabled
208      *
209      * @return Whether or not comments are enabled
210      */

211     Boolean JavaDoc getBlogCommentsEnabled();
212
213     /**
214      * Return whether or not trackbacks are enabled
215      *
216      * @return <code>true</code> if trackbacks are enabled, <code>false</code> otherwise
217      */

218     Boolean JavaDoc getBlogTrackbacksEnabled();
219
220     /**
221      * Return whether or not pingbacks are enabled
222      *
223      * @return <code>true</code> if pingbacks are enabled, <code>false</code> otherwise
224      */

225     Boolean JavaDoc getBlogPingbacksEnabled();
226
227     /**
228      * Get whether or not email is enabled
229      *
230      * @return Whether or not email is enabled
231      */

232     Boolean JavaDoc getBlogEmailEnabled();
233
234     /**
235      * Get the default flavor for this blog
236      *
237      * @return Default blog flavor
238      */

239     String JavaDoc getBlogDefaultFlavor();
240
241     /**
242      * Is linear navigation enabled?
243      *
244      * @return <code>true</code> if linear navigation is enabled, <code>false</code> otherwise
245      */

246     Boolean JavaDoc getLinearNavigationEnabled();
247
248     /**
249      * Is XML-RPC enabled for this blog?
250      *
251      * @return <code>true</code> if XML-RPC is enabled, <code>false</code> otherwise
252      */

253     Boolean JavaDoc getXmlrpcEnabled();
254
255     /**
256      * Retrieve the blog administration locale as a String
257      *
258      * @return String of blog administration locale
259      */

260     String JavaDoc getBlogAdministrationLocaleAsString();
261
262     /**
263      * Retrieve the blog administration locale as a {@link java.util.Locale} object
264      *
265      * @return {@link java.util.Locale} object for blog administration locale
266      */

267     Locale JavaDoc getBlogAdministrationLocale();
268
269     /**
270      * Retrive a {@link java.util.Locale} object from the blog's language and country settings
271      *
272      * @return {@link java.util.Locale} object from the blog's language and country settings
273      */

274     Locale JavaDoc getBlogLocale();
275
276     /**
277      * Retrieve whether or not MD5 encrypted passwords are used
278      *
279      * @return <code>true</code> if encrypted passwords are used, <code>false</code> otherwise
280      */

281     Boolean JavaDoc getUseEncryptedPasswords();
282
283     /**
284      * Retrieve the in-use password digest algorithm
285      *
286      * @return Password digest algorithm
287      */

288     String JavaDoc getDigestAlgorithm();
289
290     /**
291      * Get a named property from the blog
292      *
293      * @param property Name
294      * @return Value of the property
295      */

296     String JavaDoc getProperty(String JavaDoc property);
297
298     /**
299      * Get a named property from the blog
300      *
301      * @param property Name
302      * @param fallback Fallback value
303      * @param allowNullBlank Use the fallback property if <code>allowNullBlank</code> is <code>false</code>
304      * @return Value of the property
305      */

306     String JavaDoc getProperty(String JavaDoc property, String JavaDoc fallback, boolean allowNullBlank);
307
308     /**
309      * Set the new name for the blog
310      *
311      * @param blogName Blog name
312      */

313     void setBlogName(String JavaDoc blogName);
314
315     /**
316      * Set the new description for the blog
317      *
318      * @param blogDescription Blog description
319      */

320     void setBlogDescription(String JavaDoc blogDescription);
321
322     /**
323      * Set the new URL for the blog
324      *
325      * @param blogURL Blog URL
326      */

327     void setBlogURL(String JavaDoc blogURL);
328
329     /**
330      * Set the new admin URL for the blog
331      *
332      * @param blogAdminURL Blog admin URL
333      */

334     void setAdminBlogURL(String JavaDoc blogAdminURL);
335
336     /**
337      * Set the new base URL for the blog
338      *
339      * @param blogBaseURL Blog base URL
340      */

341     void setBlogBaseURL(String JavaDoc blogBaseURL);
342
343     /**
344      * Set the new 2 letter country code for the blog
345      *
346      * @param blogCountry Blog country code
347      */

348     void setBlogCountry(String JavaDoc blogCountry);
349
350     /**
351      * Set the new 2 letter language code for the blog
352      *
353      * @param blogLanguage Blog language code
354      */

355     void setBlogLanguage(String JavaDoc blogLanguage);
356
357     /**
358      * Set the number of entries to display at one time, where -1 indicates to display all entries
359      *
360      * @param blogDisplayEntries Blog display entries
361      */

362     void setBlogDisplayEntries(int blogDisplayEntries);
363
364     /**
365      * Set the new blog owner name
366      *
367      * @param blogOwner Blog owner
368      */

369     void setBlogOwner(String JavaDoc blogOwner);
370
371     /**
372      * Set the new blog owner e-mail address
373      *
374      * @param blogOwnerEmail Blog owner e-mail
375      */

376     void setBlogOwnerEmail(String JavaDoc blogOwnerEmail);
377
378     /**
379      * Set whether blog comments are enabled
380      *
381      * @param blogCommentsEnabled <code>true</code> if comments are enabled, <code>false</code> otherwise
382      */

383     void setBlogCommentsEnabled(Boolean JavaDoc blogCommentsEnabled);
384
385     /**
386      * Set whether emails are sent on blog comments and trackbacks
387      *
388      * @param blogEmailEnabled <code>true</code> if email of comments and trackbacks is enabled, <code>false</code> otherwise
389      */

390     void setBlogEmailEnabled(Boolean JavaDoc blogEmailEnabled);
391
392     /**
393      * Set whether blog trackbacks are enabled
394      *
395      * @param blogTrackbacksEnabled <code>true</code> if trackbacks are enabled, <code>false</code> otherwise
396      */

397     void setBlogTrackbacksEnabled(Boolean JavaDoc blogTrackbacksEnabled);
398
399     /**
400      * Set whether blog pingbacks are enabled
401      *
402      * @param blogPingbacksEnabled <code>true</code> if pingbacks are enabled, <code>false</code> otherwise
403      */

404     void setBlogPingbacksEnabled(Boolean JavaDoc blogPingbacksEnabled);
405
406     /**
407      * Set the new default flavor for this blog
408      *
409      * @param blogDefaultFlavor New default blog flavor
410      */

411     void setBlogDefaultFlavor(String JavaDoc blogDefaultFlavor);
412
413     /**
414      * Set whether or not linear navigation should be enabled
415      *
416      * @param linearNavigationEnabled <code>true</code> if linear navigation is enabled, <code>false</code> otherwise
417      */

418     void setLinearNavigationEnabled(Boolean JavaDoc linearNavigationEnabled);
419
420     /**
421      * Set whether or not XML-RPC is enabled
422      *
423      * @param xmlrpcEnabled <code>true</code> if XML-RPC is enabled, <code>false</code> otherwise
424      */

425     void setXmlrpcEnabled(Boolean JavaDoc xmlrpcEnabled);
426
427     /**
428      * Set the locale used in the administration console
429      *
430      * @param blogAdministrationLocale Locale string of form <code>language_country_variant</code>
431      */

432     void setBlogAdministrationLocale(String JavaDoc blogAdministrationLocale);
433
434     /**
435      * Set whether or not MD5 encrypted passwords are used
436      *
437      * @param useEncryptedPasswords <code>true</code> if MD5 passwords are used, <code>false</code> otherwise
438      */

439     void setUseEncryptedPasswords(Boolean JavaDoc useEncryptedPasswords);
440
441     /**
442      * Set the new admin URL for the blog
443      *
444      * @param blogAdminURL Blog admin URL
445      */

446     void setBlogAdminURL(String JavaDoc blogAdminURL);
447
448     /**
449      * Set the new base admin URL for the blog
450      *
451      * @param blogBaseAdminURL Blog base admin URL
452      */

453     void setBlogBaseAdminURL(String JavaDoc blogBaseAdminURL);
454
455     /**
456      * Set the in-use password digest algorithm
457      *
458      * @param digestAlgorithm Digest algorithm
459      */

460     void setDigestAlgorithm(String JavaDoc digestAlgorithm);
461
462     /**
463      * Set a property for the blog
464      *
465      * @param name Property name
466      * @param value Property value
467      */

468     void setProperty(String JavaDoc name, String JavaDoc value);
469 }
470
Popular Tags