|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.icite.blojsom.plugin.LinkListPlugin
LinkListPlugin implements the BlojsomPlugin interface, and uses blojsom's startup and processes to trigger the loading and/or processing of LinkList sources utilizing the specified LinkList datastore (defaults to WTFBase)
Field Summary | |
protected DatastoreBase |
_base
|
protected org.apache.commons.logging.Log |
_logger
|
protected static java.lang.String |
BASE_FIELD
"base" is a property that can be set in linklist.properties for setting the datastore class |
protected static java.lang.String |
CONFIG_FILENAME
"linklist.properties" is the properties file name |
protected java.lang.String |
configFilePath
|
protected static java.lang.String |
DEFAULT_BASE
"net.icite.datastore.WTFBase" is the default datastore base class |
protected static java.lang.String |
DEFAULT_BASEKEY
"LISTINGS" is the default source "key" to assume if no key is indicated in linklist.txt files |
protected static java.lang.String |
DEFAULT_FILENAME
"linklist.txt" is the default linklist source filename |
protected static java.lang.String[] |
DEFAULT_KEYS
These values are the default source "keys" that the plugin should deal with note: this should ultimately be a setable property! note2: this is probably obsolete and needs to be removed |
protected static java.lang.String |
DEFAULT_LISTNAME
"list" is the fallback value for the source name if sources are not specified using SOURCE_FIELD |
protected static java.lang.String |
DEFAULT_PREFIX
"global" is the fallback value for the default prefix for global sources if one is not specified using PREFIX_FIELD |
protected static java.lang.String |
ENCODING_FIELD
"default-encoding" is a property that can be set in linklist.properties for setting the default encoding of linklist files |
protected static java.lang.String |
FALLBACK_FIELD
"fallback" is a property that can be set in linklist.properties for setting the fallback list source |
protected java.util.Map |
FileList
|
protected java.lang.String |
globalConfigFile
|
protected java.lang.String |
globalFallbackSourceFile
|
protected static java.lang.String |
GROUP_FIELD
"list-groups" is a property that can be set in linklist.properties for setting the list of list groups |
protected org.apache.commons.collections.map.HashedMap |
GroupAppends
|
protected java.lang.String[] |
listGroups
|
protected java.util.Properties |
LLPluginGlobalProperties
|
protected static java.lang.String |
PREFIX_FIELD
"global-source-prefix" is a property that can be set in linklist.properties for setting the prefix used on global linklist source names (used when there is a conflict between a user linklist source name and a global source name, e.g., user.mylist and glb.mylist) glb is an example value you'd set this property to |
protected java.lang.String |
prefixNameSeparator
|
protected static java.lang.String |
SEPARATOR
System specific file separator |
protected static java.lang.String |
SOURCE_FIELD
"sources" is a property that can be set in linklist.properties for setting the list of linklist sources |
protected static java.lang.String |
TIMER_FIELD
"filewatch-timer" is a property that can be set in linklist.properties for setting the filewatch timer time |
protected org.apache.commons.collections.map.HashedMap |
UserGroups
|
protected static java.lang.String |
UTF8
UTF-8 is the default character encoding |
Constructor Summary | |
LinkListPlugin()
Default constructor |
Method Summary | |
void |
cleanup()
Perform any cleanup for the plugin. |
void |
destroy()
Called when BlojsomServlet is taken out of service |
private DatastoreBase |
getBase()
|
private java.lang.String |
getEncodingProperty(java.util.Properties prop)
|
void |
init(javax.servlet.ServletConfig servletConfig,
org.blojsom.blog.BlojsomConfiguration blojsomConfiguration)
Initialize this plugin. |
private boolean |
loadProperties(java.util.Properties props,
java.lang.String fullFile)
|
org.blojsom.blog.BlogEntry[] |
process(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
org.blojsom.blog.BlogUser user,
java.util.Map context,
org.blojsom.blog.BlogEntry[] entries)
Process the blog entries |
private void |
setBase(java.lang.String className)
|
private java.lang.Object[] |
sourcePropertyToArray(java.util.Properties prop,
java.lang.String filename,
java.lang.String fileDir,
java.lang.String namePrefix)
|
private void |
watchAndLoadSources(java.lang.Object[] src,
java.lang.String encoding,
java.lang.String sourcePrefix,
java.lang.String defaultFile)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String UTF8
protected static final java.lang.String BASE_FIELD
protected static final java.lang.String ENCODING_FIELD
protected static final java.lang.String TIMER_FIELD
protected static final java.lang.String SOURCE_FIELD
protected static final java.lang.String PREFIX_FIELD
protected static final java.lang.String DEFAULT_PREFIX
PREFIX_FIELD
protected static final java.lang.String DEFAULT_LISTNAME
SOURCE_FIELD
protected static final java.lang.String GROUP_FIELD
protected static final java.lang.String FALLBACK_FIELD
protected static final java.lang.String DEFAULT_BASE
protected static final java.lang.String DEFAULT_FILENAME
protected static final java.lang.String CONFIG_FILENAME
protected static final java.lang.String DEFAULT_BASEKEY
protected static final java.lang.String[] DEFAULT_KEYS
protected static final java.lang.String SEPARATOR
protected org.apache.commons.logging.Log _logger
protected DatastoreBase _base
protected java.lang.String configFilePath
protected java.lang.String globalConfigFile
protected java.lang.String prefixNameSeparator
protected java.lang.String[] listGroups
protected org.apache.commons.collections.map.HashedMap UserGroups
protected org.apache.commons.collections.map.HashedMap GroupAppends
protected java.lang.String globalFallbackSourceFile
protected java.util.Map FileList
protected java.util.Properties LLPluginGlobalProperties
Constructor Detail |
public LinkListPlugin()
Method Detail |
public void init(javax.servlet.ServletConfig servletConfig, org.blojsom.blog.BlojsomConfiguration blojsomConfiguration) throws org.blojsom.plugin.BlojsomPluginException
init
in interface org.blojsom.plugin.BlojsomPlugin
servletConfig
- Servlet config object for the plugin to retrieve any initialization parametersblojsomConfiguration
- BlojsomConfiguration
information
org.blojsom.plugin.BlojsomPluginException
- If there is an error initializing the pluginpublic org.blojsom.blog.BlogEntry[] process(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, org.blojsom.blog.BlogUser user, java.util.Map context, org.blojsom.blog.BlogEntry[] entries) throws org.blojsom.plugin.BlojsomPluginException
process
in interface org.blojsom.plugin.BlojsomPlugin
httpServletRequest
- RequesthttpServletResponse
- Responsecontext
- Contextentries
- Blog entries retrieved for the particular request
org.ignition.blojsom.plugin.BlojsomPluginException
- If there is an error processing the blog entries
org.blojsom.plugin.BlojsomPluginException
private boolean loadProperties(java.util.Properties props, java.lang.String fullFile)
private java.lang.String getEncodingProperty(java.util.Properties prop)
private void setBase(java.lang.String className)
private DatastoreBase getBase()
private void watchAndLoadSources(java.lang.Object[] src, java.lang.String encoding, java.lang.String sourcePrefix, java.lang.String defaultFile)
private java.lang.Object[] sourcePropertyToArray(java.util.Properties prop, java.lang.String filename, java.lang.String fileDir, java.lang.String namePrefix)
public void cleanup() throws org.blojsom.plugin.BlojsomPluginException
process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.blojsom.blog.BlogUser, java.util.Map, org.blojsom.blog.BlogEntry[])
.
cleanup
in interface org.blojsom.plugin.BlojsomPlugin
org.ignition.blojsom.plugin.BlojsomPluginException
- If there is an error performing cleanup for this plugin
org.blojsom.plugin.BlojsomPluginException
public void destroy() throws org.blojsom.plugin.BlojsomPluginException
destroy
in interface org.blojsom.plugin.BlojsomPlugin
org.ignition.blojsom.plugin.BlojsomPluginException
- If there is an error in finalizing this plugin
org.blojsom.plugin.BlojsomPluginException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |