org.blojsom.blog
Class BlojsomConfiguration

java.lang.Object
  extended byorg.blojsom.blog.BlojsomConfiguration
All Implemented Interfaces:
BlojsomConstants

public class BlojsomConfiguration
extends java.lang.Object
implements BlojsomConstants

BlojsomConfiguration

Since:
blojsom 2.0
Version:
$Id: BlojsomConfiguration.java,v 1.41 2006/01/04 16:59:53 czarneckid Exp $
Author:
David Czarnecki

Field Summary
 
Fields inherited from interface org.blojsom.util.BlojsomConstants
ADMINISTRATORS_IP, BLOG_ADMIN_URL_IP, BLOG_ADMINISTRATION_LOCALE_IP, BLOG_AUTHORIZATION_IP, BLOG_BASE_URL_IP, BLOG_BLACKLIST_FILE_IP, BLOG_COMMENTS_DIRECTORY_IP, BLOG_COMMENTS_ENABLED_IP, BLOG_COUNTRY_DEFAULT, BLOG_COUNTRY_IP, BLOG_DEFAULT_CATEGORY_EXCLUSION_MAPPING_IP, BLOG_DEFAULT_CATEGORY_MAPPING_IP, BLOG_DEFAULT_FETCHER, BLOG_DEFAULT_FILE_EXTENSION_IP, BLOG_DEFAULT_FLAVOR_IP, BLOG_DEFAULT_PROPERTIES, BLOG_DEPTH_IP, BLOG_DESCRIPTION_IP, BLOG_DIRECTORY_FILTER_IP, BLOG_EMAIL_ENABLED_IP, BLOG_ENTRIES_DISPLAY_DEFAULT, BLOG_ENTRIES_DISPLAY_IP, BLOG_ENTRY_META_DATA_EXTENSION_IP, BLOG_FILE_ENCODING_IP, BLOG_FILE_EXTENSIONS_IP, BLOG_HOME_IP, BLOG_LANGUAGE_DEFAULT, BLOG_LANGUAGE_IP, BLOG_NAME_IP, BLOG_OWNER, BLOG_OWNER_EMAIL, BLOG_PERMISSIONS_IP, BLOG_PINGBACKS_DIRECTORY_IP, BLOG_PINGBACKS_ENABLED_IP, BLOG_PROPERTIES_EXTENSIONS_IP, BLOG_TRACKBACK_DIRECTORY_IP, BLOG_TRACKBACKS_ENABLED_IP, BLOG_URL_IP, BLOJSOM_ALL_CATEGORIES, BLOJSOM_AUTHORIZATION_PROVIDER_IP, BLOJSOM_BLOG, BLOJSOM_BLOG_HOME_IP, BLOJSOM_BROADCASTER_IP, BLOJSOM_CATEGORIES, BLOJSOM_COMMENTS_ENABLED, BLOJSOM_CONFIGURATION_BASE_DIRECTORY_IP, BLOJSOM_CONFIGURATION_IP, BLOJSOM_DATE, BLOJSOM_DATE_ISO8601, BLOJSOM_DATE_OBJECT, BLOJSOM_DATE_UTC, BLOJSOM_DEFAULT_BROADCASTER, BLOJSOM_DEFAULT_CONFIGURATION_BASE_DIRECTORY, BLOJSOM_DEFAULT_RESOURCE_DIRECTORY, BLOJSOM_DEFAULT_RESOURCE_MANAGER, BLOJSOM_DEFAULT_TEMPLATES_DIRECTORY, BLOJSOM_DEFAULT_USER_IP, BLOJSOM_EMAIL_ENABLED, BLOJSOM_ENTRIES, BLOJSOM_FETCHER_IP, BLOJSOM_FLAVOR_CONFIGURATION_IP, BLOJSOM_INSTALLATION_DIRECTORY_IP, BLOJSOM_INSTALLED_LOCALES_IP, BLOJSOM_LAST_MODIFIED, BLOJSOM_LISTENER_CONFIGURATION_IP, BLOJSOM_PERMALINK, BLOJSOM_PERMALINK_NEXT_ENTRY, BLOJSOM_PERMALINK_PREVIOUS_ENTRY, BLOJSOM_PLUGIN_CHAIN, BLOJSOM_PLUGIN_CONFIGURATION_IP, BLOJSOM_PLUGINS, BLOJSOM_REQUESTED_CATEGORY, BLOJSOM_REQUESTED_FLAVOR, BLOJSOM_RESOURCE_DIRECTORY_IP, BLOJSOM_RESOURCE_MANAGER_BUNDLES_IP, BLOJSOM_RESOURCE_MANAGER_CONTEXT_KEY, BLOJSOM_RESOURCE_MANAGER_IP, BLOJSOM_SITE_URL, BLOJSOM_TEMPLATES_DIRECTORY_IP, BLOJSOM_USER, BLOJSOM_USERS_IP, BLOJSOM_VERSION, BLOJSOM_VERSION_NUMBER, CACHE_CONTROL_HTTP_HEADER, CATEGORY_PARAM, COMMENT_EXTENSION, DEFAULT_AUTHORIZATION_PROVIDER, DEFAULT_COMMENTS_DIRECTORY, DEFAULT_DIGEST_ALGORITHM, DEFAULT_DISPATCHER_CONFIGURATION_FILE, DEFAULT_ENTRY_EXTENSION, DEFAULT_FLAVOR_CONFIGURATION_FILE, DEFAULT_FLAVOR_HTML, DEFAULT_METADATA_EXTENSION, DEFAULT_PERMISSIONS_CONFIGURATION_FILE, DEFAULT_PINGBACKS_DIRECTORY, DEFAULT_PLUGIN_CONFIGURATION_FILE, DEFAULT_PROPERTIES_EXTENSIONS, DEFAULT_TRACKBACK_DIRECTORY, DESCRIPTION_KEY, DIGEST_ALGORITHM, FLAVOR_PARAM, HTTP_ETAG, HTTP_LASTMODIFIED, INFINITE_BLOG_DEPTH, ISO_8601_DATE_FORMAT, LINE_SEPARATOR, LINEAR_NAVIGATION_ENABLED_IP, MAX_HASHABLE_LENGTH, NAME_KEY, NO_CACHE_HTTP_HEADER_VALUE, OVERRIDE_LASTMODIFIED_PARAM, PAGE_PARAM, PAGE_PARAM_ARCHIVE, PERMALINK_PARAM, PINGBACK_EXTENSION, PLUGINS_PARAM, PRAGMA_HTTP_HEADER, PREFERRED_SYNDICATION_FLAVOR, RECURSIVE_CATEGORIES, REDIRECT_TO_PARAM, RFC_822_DATE_FORMAT, SHORT_ISO_8601_DATE_FORMAT, TRACKBACK_EXTENSION, USE_ENCRYPTED_PASSWORDS, UTC_DATE_FORMAT, UTF8, WHITESPACE, XMLRPC_ENABLED_IP
 
Constructor Summary
BlojsomConfiguration(javax.servlet.ServletConfig servletConfig, java.util.Map blojsomConfiguration)
          Initialize the BlojsomConfiguration object
 
Method Summary
 void addBlogID(java.lang.String blogID)
          Add a blog ID to the known blog IDs
 boolean checkBlogIDExists(java.lang.String blogID)
          Check to see if a blog ID exists in the known blog IDs
 java.lang.String getAuthorizationProvider()
          Get the name of the authorization provider class
 java.lang.String getBaseConfigurationDirectory()
          Get the base directory for obtaining configuration information
 java.util.Map getBlogIDs()
          Retrieve a Map of the known blog IDs
 java.util.Map getBlogUsers()
          Deprecated.  
 java.util.Map getBlojsomConfiguration()
          Returns an unmodifiable map of the blojsom configuration properties
 java.lang.Object getBlojsomProperty(java.lang.String propertyKey)
          Return a blojsom configuration property
 java.util.List getBlojsomPropertyAsList(java.lang.String propertyKey)
          Retrieve a property from blojsom.properties as a List
 java.lang.String getBlojsomPropertyAsString(java.lang.String propertyKey)
          Retrieve a blojsom property as a string
 java.lang.String[] getBlojsomUsers()
          Get the list of users for this blojsom instance returned as a String[]
 java.lang.String getDefaultUser()
          Get the default user for this blojsom instance
 BlojsomEventBroadcaster getEventBroadcaster()
          Get the BlojsomEventBroadcaster in use to broadcast events
 java.lang.String getFetcherClass()
          Get the classname of the fetcher used for this blojsom instance
 java.lang.String getGlobalBlogHome()
          Get the name of the global blog home directory
 java.lang.String getInstallationDirectory()
          Get the installation directory for blojsom.
 java.util.Locale[] getInstalledLocales()
          Get the installed locales as Locale objects
 java.lang.String[] getInstalledLocalesAsStrings()
          Get the installed locales for this blojsom installation
 java.lang.String getQualifiedResourceDirectory()
          Get the fully qualified directory where resources will be located off the installed directory.
 java.lang.String getResourceDirectory()
          Get the directory where resources will be located off the installed directory.
 java.lang.String getResourceManager()
          Get the name of the resource manager class
 java.lang.String getTemplatesDirectory()
          Get the directory where templates will be located off the user's directory.
 BlogUser loadBlog(java.lang.String blogID)
          Load a BlogUser for a given blog ID
 void removeBlogID(java.lang.String blogID)
          Remove a blog ID from the known blog IDs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlojsomConfiguration

public BlojsomConfiguration(javax.servlet.ServletConfig servletConfig,
                            java.util.Map blojsomConfiguration)
                     throws BlojsomConfigurationException
Initialize the BlojsomConfiguration object

Parameters:
servletConfig - Servlet configuration information
blojsomConfiguration - Map of loaded blojsom properties
Method Detail

getBlojsomConfiguration

public java.util.Map getBlojsomConfiguration()
Returns an unmodifiable map of the blojsom configuration properties

Returns:
Unmodifiable map of the blojsom configuration properties

getBlojsomPropertyAsString

public java.lang.String getBlojsomPropertyAsString(java.lang.String propertyKey)
Retrieve a blojsom property as a string

Parameters:
propertyKey - Property key
Returns:
Value of blojsom property as a string or null if no property key is found

getBlojsomPropertyAsList

public java.util.List getBlojsomPropertyAsList(java.lang.String propertyKey)
Retrieve a property from blojsom.properties as a List

Parameters:
propertyKey - Key
Returns:
List for property or null if property does not exist

getBlojsomProperty

public java.lang.Object getBlojsomProperty(java.lang.String propertyKey)
Return a blojsom configuration property

Parameters:
propertyKey - Property key
Returns:
Value of blojsom property

getDefaultUser

public java.lang.String getDefaultUser()
Get the default user for this blojsom instance

Returns:
Default user

getBaseConfigurationDirectory

public java.lang.String getBaseConfigurationDirectory()
Get the base directory for obtaining configuration information

Returns:
Configuration base directory (e.g. /WEB-INF)

getFetcherClass

public java.lang.String getFetcherClass()
Get the classname of the fetcher used for this blojsom instance

Returns:
Fetcher classname

getInstallationDirectory

public java.lang.String getInstallationDirectory()
Get the installation directory for blojsom. This is the directory where the blojsom WAR file will be unpacked.

Returns:
Installation directory
Since:
blojsom 2.01

getTemplatesDirectory

public java.lang.String getTemplatesDirectory()
Get the directory where templates will be located off the user's directory.

Returns:
Templates directory
Since:
blojsom 2.04

getResourceDirectory

public java.lang.String getResourceDirectory()
Get the directory where resources will be located off the installed directory.

Returns:
Resources directory
Since:
blojsom 2.14

getQualifiedResourceDirectory

public java.lang.String getQualifiedResourceDirectory()
Get the fully qualified directory where resources will be located off the installed directory.

Returns:
Resources directory
Since:
blojsom 2.14

getBlojsomUsers

public java.lang.String[] getBlojsomUsers()
Get the list of users for this blojsom instance returned as a String[]

Returns:
List of users as a String[]

getBlogUsers

public java.util.Map getBlogUsers()
Deprecated.  

Get a map of the BlogUser objects

Returns:
Map of BlogUser objects
See Also:
{@link #getBlojsomUsers()}

getResourceManager

public java.lang.String getResourceManager()
Get the name of the resource manager class

Returns:
Classname of the resource manager
Since:
blojsom 2.13

getAuthorizationProvider

public java.lang.String getAuthorizationProvider()
Get the name of the authorization provider class

Returns:
Classname of the authorization provider
Since:
blojsom 2.16

getGlobalBlogHome

public java.lang.String getGlobalBlogHome()
Get the name of the global blog home directory

Returns:
Global blog home directory
Since:
blojsom 2.18

getEventBroadcaster

public BlojsomEventBroadcaster getEventBroadcaster()
Get the BlojsomEventBroadcaster in use to broadcast events

Returns:
BlojsomEventBroadcaster
Since:
blojsom 2.18

getInstalledLocalesAsStrings

public java.lang.String[] getInstalledLocalesAsStrings()
Get the installed locales for this blojsom installation

Returns:
Array of locale strings installed for this blojsom installation
Since:
blojsom 2.21

getInstalledLocales

public java.util.Locale[] getInstalledLocales()
Get the installed locales as Locale objects

Returns:
Array of Locale objects
Since:
blojsom 2.21

checkBlogIDExists

public boolean checkBlogIDExists(java.lang.String blogID)
Check to see if a blog ID exists in the known blog IDs

Parameters:
blogID - Blog ID
Returns:
true if the blog ID exists, false otherwise
Since:
blojsom 2.24

loadBlog

public BlogUser loadBlog(java.lang.String blogID)
                  throws BlojsomException
Load a BlogUser for a given blog ID

Parameters:
blogID - Blog ID
Returns:
BlogUser object
Throws:
BlojsomException - If there is an exception loading the object
Since:
blojsom 2.24

getBlogIDs

public java.util.Map getBlogIDs()
Retrieve a Map of the known blog IDs

Returns:
Map of the known blog IDs
Since:
blojsom 2.24

addBlogID

public void addBlogID(java.lang.String blogID)
Add a blog ID to the known blog IDs

Parameters:
blogID - Blog ID
Since:
blojsom 2.24

removeBlogID

public void removeBlogID(java.lang.String blogID)
Remove a blog ID from the known blog IDs

Parameters:
blogID - Blog ID
Since:
blojsom 2.24