|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.imixs.workflow.plugins.AbstractPlugin
org.imixs.workflow.plugins.jee.extended.LucenePlugin
public class LucenePlugin
This Plugin add workitems to a lucene search index. The Plugin provides a set of static methods which can be used also outside the workflowManager to index single workitems or collections of workitems. With the method addWorkitem() a ItemCollection can be added to a lucene search index. The Plugin reads the property file 'imixs-search.properties' from the current classpath to determine the configuration.
| Field Summary |
|---|
| Fields inherited from class org.imixs.workflow.plugins.AbstractPlugin |
|---|
ctx |
| Fields inherited from interface org.imixs.workflow.Plugin |
|---|
PLUGIN_ERROR, PLUGIN_OK, PLUGIN_WARNING |
| Constructor Summary | |
|---|---|
LucenePlugin()
|
|
| Method Summary | |
|---|---|
static boolean |
addWorkitem(org.imixs.workflow.ItemCollection documentContext)
This method adds a single workitem into the search index. |
static boolean |
addWorklist(java.util.Collection<org.imixs.workflow.ItemCollection> worklist)
This method adds a collection of workitems into the search index. |
void |
close(int status)
|
static org.apache.lucene.document.Document |
createDocument(java.util.Properties prop,
org.imixs.workflow.ItemCollection aworkitem)
This method creates a lucene document based on a ItemCollection. |
static org.apache.lucene.search.IndexSearcher |
createIndexSearcher()
|
static org.apache.lucene.index.IndexWriter |
createIndexWriter(java.util.Properties prop)
This method creates a new instance of a lucene IndexWriter. |
void |
init(org.imixs.workflow.WorkflowContext actx)
|
static java.util.Properties |
loadProperties()
loads a imixs-search.property file |
static boolean |
matchConditions(java.util.Properties prop,
org.imixs.workflow.ItemCollection aworktiem)
test if the workitem matches the conditions to be added into the search index. |
int |
run(org.imixs.workflow.ItemCollection documentContext,
org.imixs.workflow.ItemCollection activity)
This method adds the current workitem to the search index by calling the method addWorkitem. |
static java.util.List<org.imixs.workflow.ItemCollection> |
search(java.lang.String sSearchTerm,
WorkflowService workflowService)
Returns a ItemCollection List matching the provided search term. |
| Methods inherited from class org.imixs.workflow.plugins.AbstractPlugin |
|---|
formatItemValues, mergeMappedFieldValues, mergeVectors, replaceDynamicValues, uniqueList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LucenePlugin()
| Method Detail |
|---|
public void init(org.imixs.workflow.WorkflowContext actx)
throws org.imixs.workflow.exceptions.PluginException
init in interface org.imixs.workflow.Plugininit in class AbstractPluginorg.imixs.workflow.exceptions.PluginException
public int run(org.imixs.workflow.ItemCollection documentContext,
org.imixs.workflow.ItemCollection activity)
throws org.imixs.workflow.exceptions.PluginException
org.imixs.workflow.exceptions.PluginException
public void close(int status)
throws org.imixs.workflow.exceptions.PluginException
org.imixs.workflow.exceptions.PluginException
public static boolean addWorkitem(org.imixs.workflow.ItemCollection documentContext)
throws java.lang.Exception
documentContext -
java.lang.Exception
public static boolean addWorklist(java.util.Collection<org.imixs.workflow.ItemCollection> worklist)
throws java.lang.Exception
worklist -
java.lang.Exception
public static boolean matchConditions(java.util.Properties prop,
org.imixs.workflow.ItemCollection aworktiem)
aworktiem -
public static java.util.List<org.imixs.workflow.ItemCollection> search(java.lang.String sSearchTerm,
WorkflowService workflowService)
throws java.lang.Exception
sSearchTerm - workflowService -
java.lang.Exception
public static org.apache.lucene.document.Document createDocument(java.util.Properties prop,
org.imixs.workflow.ItemCollection aworkitem)
aworkitem -
public static org.apache.lucene.index.IndexWriter createIndexWriter(java.util.Properties prop)
throws java.lang.Exception
java.lang.Exception
public static org.apache.lucene.search.IndexSearcher createIndexSearcher()
throws java.lang.Exception
java.lang.Exception
public static java.util.Properties loadProperties()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||