|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.wiki.plugin.tag.TagManagerImpl
public class TagManagerImpl
Implements the TagManager API as a singleton-per-WikiEngine class, handling plugin-based set and get tag methods and listening for WikiPageEvents for the management and querying of user tags.
If the system property PROPERTY_USECACHE is false, will
not use query caching (otherwise yes).
TagManager,
TagManagerFactory| Nested Class Summary | |
|---|---|
class |
TagManagerImpl.HasTagModifier
A substitution for the IS Operator as a component of a query expression. |
| Field Summary | |
|---|---|
static int |
crawlDelay
The delay in milliseconds following instantiation prior to starting the wiki crawler. |
static String |
PROPERTY_USECACHE
The System property name for the property enabling the TagManager's cache. |
static boolean |
requirePageForTag
When true, require all tags to be represented by wiki pages matching the tag name. |
| Fields inherited from interface org.ceryle.wiki.plugin.tag.TagManager |
|---|
LOGICAL_AND, LOGICAL_NOT, LOGICAL_OR, TAG_PROPERTY |
| Constructor Summary | |
|---|---|
protected |
TagManagerImpl(WikiEngine engine)
Create an TagManagerImpl for the provided WikiEngine. |
| Method Summary | |
|---|---|
void |
convertToTerms(List terms,
String pagename)
Provided with a List of Strings and Terms, converts any square-bracketed Strings in the List to Terms. |
Set |
getAllTags()
Returns the alphabetically-sorted Set of all tags, an empty List if no tags exist. |
WikiEngine |
getEngine()
Returns the WikiEngine associated with this AssertionHandler. |
List |
getPagesForTag(String tag)
Returns the List of wiki page names (as Strings) containing the provided tag, an empty List if no matches exist. |
QueryItem |
getQueryForExpression(Expression expression)
Return a QueryItem corresponding to the provided Expression. |
List |
getTagsForPage(String pagename)
Returns the List of tags (as Strings) for the provided Page, an empty List if none have been set. |
boolean |
hasTag(String pagename,
String tag)
Returns true if the wiki page contains the tag, false if it does not contain the tag or the page does not exist. |
boolean |
isListenerEnabled()
Returns the enabled state of this AssertionHandler's WikiEventListener. |
Set |
processQuery(WikiContext context,
Map params)
Processes the parameters as a query, returning the resulting Set of wiki page names. |
void |
setListenerEnabled(boolean enable)
Enables or disables this TagManager's WikiEventListener so that it tracks or no longer tracks changes to the wiki. |
void |
setTagsForPage(String pagename,
List terms)
Sets the List of tags (as Strings) for the provided Page, replacing any previous List. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean requirePageForTag
public static int crawlDelay
public static final String PROPERTY_USECACHE
| Constructor Detail |
|---|
protected TagManagerImpl(WikiEngine engine)
engine - the WikiEngine this TagManager serves.| Method Detail |
|---|
public Set processQuery(WikiContext context,
Map params)
throws QueryException
processQuery in interface TagManagerQueryExceptionpublic QueryItem getQueryForExpression(Expression expression)
getQueryForExpression in interface TagManager
public void convertToTerms(List terms,
String pagename)
throws PluginException
convertToTerms in interface TagManagerterms - the List of Termspagename - the wiki page name of the plugin's origin
PluginExceptionpublic Set getAllTags()
public boolean hasTag(String pagename,
String tag)
hasTag in interface TagManagerpublic List getPagesForTag(String tag)
getPagesForTag in interface TagManagerpublic List getTagsForPage(String pagename)
getTagsForPage in interface TagManager
public void setTagsForPage(String pagename,
List terms)
setTagsForPage in interface TagManagerpublic WikiEngine getEngine()
This is an AssertionHandler API method.
getEngine in interface TagManagerpublic void setListenerEnabled(boolean enable)
The listener is created upon class instantiation, and removed from the WikiEventManager and destroyed when this method is called with a parameter value of false.
setListenerEnabled in interface TagManagerpublic boolean isListenerEnabled()
This is an AssertionHandler API method.
isListenerEnabled in interface TagManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||