001: /**
002: * Copyright (c) 2003-2007, David A. Czarnecki
003: * All rights reserved.
004: *
005: * Redistribution and use in source and binary forms, with or without
006: * modification, are permitted provided that the following conditions are met:
007: *
008: * Redistributions of source code must retain the above copyright notice, this list of conditions and the
009: * following disclaimer.
010: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
011: * following disclaimer in the documentation and/or other materials provided with the distribution.
012: * Neither the name of "David A. Czarnecki" and "blojsom" nor the names of its contributors may be used to
013: * endorse or promote products derived from this software without specific prior written permission.
014: * Products derived from this software may not be called "blojsom", nor may "blojsom" appear in their name,
015: * without prior written permission of David A. Czarnecki.
016: *
017: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
018: * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
019: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
020: * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
021: * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
022: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
023: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
025: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
026: * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
027: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
028: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
029: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030: */package org.blojsom.blog;
031:
032: import java.util.Map;
033: import java.util.Locale;
034:
035: /**
036: * Blog
037: *
038: * @author David Czarnecki
039: * @since blojsom 3.0
040: * @version $Id: Blog.java,v 1.7 2007/01/17 02:35:16 czarneckid Exp $
041: */
042: public interface Blog {
043:
044: /**
045: * Retrieve the unique id
046: *
047: * @return Unique ID
048: */
049: public Integer getId();
050:
051: /**
052: * Set the id
053: *
054: * @param id Unique ID
055: */
056: public void setId(Integer id);
057:
058: /**
059: * Retrieve the blog ID
060: *
061: * @return Blog ID
062: */
063: public String getBlogId();
064:
065: /**
066: * Set the blog ID
067: *
068: * @param blogID Blog ID
069: */
070: public void setBlogId(String blogID);
071:
072: /**
073: * Get a map of the templates
074: *
075: * @return Map of the templates
076: */
077: public Map getTemplates();
078:
079: /**
080: * Set the templates
081: *
082: * @param templates Map of the templates
083: */
084: public void setTemplates(Map templates);
085:
086: /**
087: * Get a map of the plugins
088: *
089: * @return Map of the plugins
090: */
091: public Map getPlugins();
092:
093: /**
094: * Set the plugins
095: *
096: * @param plugins Plugins
097: */
098: public void setPlugins(Map plugins);
099:
100: /**
101: * Get the properties for the blog
102: *
103: * @return Properties for the blog
104: */
105: public Map getProperties();
106:
107: /**
108: * Set the properties for the blog
109: *
110: * @param properties Blog properties
111: */
112: public void setProperties(Map properties);
113:
114: /**
115: * Name of the blog
116: *
117: * @return Blog name
118: */
119: String getBlogName();
120:
121: /**
122: * Returns the HTML escaped name of the blog
123: *
124: * @return Name of the blog that has been escaped
125: */
126: String getEscapedBlogName();
127:
128: /**
129: * Description of the blog
130: *
131: * @return Blog description
132: */
133: String getBlogDescription();
134:
135: /**
136: * Returns the HTML escaped description of the blog
137: *
138: * @return Description of the blog that has been escaped
139: */
140: String getEscapedBlogDescription();
141:
142: /**
143: * URL for the blog
144: *
145: * @return Blog URL
146: */
147: String getBlogURL();
148:
149: /**
150: * Admin URL for the blog
151: *
152: * @return Blog admin URL
153: */
154: String getBlogAdminURL();
155:
156: /**
157: * Base admin URL for the blog
158: *
159: * @return Blog base admin URL
160: */
161: String getBlogBaseAdminURL();
162:
163: /**
164: * Base URL for the blog
165: *
166: * @return Blog base URL
167: */
168: String getBlogBaseURL();
169:
170: /**
171: * Language of the blog
172: *
173: * @return Blog language
174: */
175: String getBlogLanguage();
176:
177: /**
178: * Country of the blog
179: *
180: * @return Country for the blog
181: */
182: String getBlogCountry();
183:
184: /**
185: * Return the number of blog entries to retrieve from the individual categories
186: *
187: * @return Blog entries to retrieve from the individual categories
188: */
189: int getBlogDisplayEntries();
190:
191: /**
192: * Return the blog owner's e-mail address
193: *
194: * @return Blog owner's e-mail
195: */
196: String getBlogOwnerEmail();
197:
198: /**
199: * Return the blog owner's name
200: *
201: * @return Blog owner's name
202: */
203: String getBlogOwner();
204:
205: /**
206: * Return whether or not comments are enabled
207: *
208: * @return Whether or not comments are enabled
209: */
210: Boolean getBlogCommentsEnabled();
211:
212: /**
213: * Return whether or not trackbacks are enabled
214: *
215: * @return <code>true</code> if trackbacks are enabled, <code>false</code> otherwise
216: */
217: Boolean getBlogTrackbacksEnabled();
218:
219: /**
220: * Return whether or not pingbacks are enabled
221: *
222: * @return <code>true</code> if pingbacks are enabled, <code>false</code> otherwise
223: */
224: Boolean getBlogPingbacksEnabled();
225:
226: /**
227: * Get whether or not email is enabled
228: *
229: * @return Whether or not email is enabled
230: */
231: Boolean getBlogEmailEnabled();
232:
233: /**
234: * Get the default flavor for this blog
235: *
236: * @return Default blog flavor
237: */
238: String getBlogDefaultFlavor();
239:
240: /**
241: * Is linear navigation enabled?
242: *
243: * @return <code>true</code> if linear navigation is enabled, <code>false</code> otherwise
244: */
245: Boolean getLinearNavigationEnabled();
246:
247: /**
248: * Is XML-RPC enabled for this blog?
249: *
250: * @return <code>true</code> if XML-RPC is enabled, <code>false</code> otherwise
251: */
252: Boolean getXmlrpcEnabled();
253:
254: /**
255: * Retrieve the blog administration locale as a String
256: *
257: * @return String of blog administration locale
258: */
259: String getBlogAdministrationLocaleAsString();
260:
261: /**
262: * Retrieve the blog administration locale as a {@link java.util.Locale} object
263: *
264: * @return {@link java.util.Locale} object for blog administration locale
265: */
266: Locale getBlogAdministrationLocale();
267:
268: /**
269: * Retrive a {@link java.util.Locale} object from the blog's language and country settings
270: *
271: * @return {@link java.util.Locale} object from the blog's language and country settings
272: */
273: Locale getBlogLocale();
274:
275: /**
276: * Retrieve whether or not MD5 encrypted passwords are used
277: *
278: * @return <code>true</code> if encrypted passwords are used, <code>false</code> otherwise
279: */
280: Boolean getUseEncryptedPasswords();
281:
282: /**
283: * Retrieve the in-use password digest algorithm
284: *
285: * @return Password digest algorithm
286: */
287: String getDigestAlgorithm();
288:
289: /**
290: * Get a named property from the blog
291: *
292: * @param property Name
293: * @return Value of the property
294: */
295: String getProperty(String property);
296:
297: /**
298: * Get a named property from the blog
299: *
300: * @param property Name
301: * @param fallback Fallback value
302: * @param allowNullBlank Use the fallback property if <code>allowNullBlank</code> is <code>false</code>
303: * @return Value of the property
304: */
305: String getProperty(String property, String fallback,
306: boolean allowNullBlank);
307:
308: /**
309: * Set the new name for the blog
310: *
311: * @param blogName Blog name
312: */
313: void setBlogName(String blogName);
314:
315: /**
316: * Set the new description for the blog
317: *
318: * @param blogDescription Blog description
319: */
320: void setBlogDescription(String blogDescription);
321:
322: /**
323: * Set the new URL for the blog
324: *
325: * @param blogURL Blog URL
326: */
327: void setBlogURL(String blogURL);
328:
329: /**
330: * Set the new admin URL for the blog
331: *
332: * @param blogAdminURL Blog admin URL
333: */
334: void setAdminBlogURL(String blogAdminURL);
335:
336: /**
337: * Set the new base URL for the blog
338: *
339: * @param blogBaseURL Blog base URL
340: */
341: void setBlogBaseURL(String 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 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 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 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 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 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 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 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 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 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 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 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 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 useEncryptedPasswords);
440:
441: /**
442: * Set the new admin URL for the blog
443: *
444: * @param blogAdminURL Blog admin URL
445: */
446: void setBlogAdminURL(String 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 blogBaseAdminURL);
454:
455: /**
456: * Set the in-use password digest algorithm
457: *
458: * @param digestAlgorithm Digest algorithm
459: */
460: void setDigestAlgorithm(String 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 name, String value);
469:
470: /**
471: * Remove a property from the blog
472: *
473: * @param name Property name
474: */
475: void removeProperty(String name);
476: }
|