|
||||||||||
| 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(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(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(Properties prop)
This method creates a new instance of a lucene IndexWriter. |
void |
init(org.imixs.workflow.WorkflowContext actx)
|
static Properties |
loadProperties()
loads a imixs-search.property file |
static boolean |
matchConditions(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 List<org.imixs.workflow.ItemCollection> |
search(String sSearchTerm,
WorkflowService workflowService)
Returns a ItemCollection List matching the provided search term. |
| Methods inherited from class org.imixs.workflow.plugins.AbstractPlugin |
|---|
formatItemValues, replaceDynamicValues |
| 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 Exception
init in interface org.imixs.workflow.Plugininit in class AbstractPluginException
public int run(org.imixs.workflow.ItemCollection documentContext,
org.imixs.workflow.ItemCollection activity)
throws Exception
Exception
public void close(int status)
throws Exception
Exception
public static boolean addWorkitem(org.imixs.workflow.ItemCollection documentContext)
throws Exception
documentContext -
Exceptionpublic static boolean addWorklist(Collection<org.imixs.workflow.ItemCollection> worklist) throws Exception
worklist -
Exceptionpublic static boolean matchConditions(Properties prop, org.imixs.workflow.ItemCollection aworktiem)
aworktiem -
public static List<org.imixs.workflow.ItemCollection> search(String sSearchTerm, WorkflowService workflowService) throws Exception
sSearchTerm - workflowService -
Exceptionpublic static org.apache.lucene.document.Document createDocument(Properties prop, org.imixs.workflow.ItemCollection aworkitem)
aworkitem -
public static org.apache.lucene.index.IndexWriter createIndexWriter(Properties prop) throws Exception
Exception
public static org.apache.lucene.search.IndexSearcher createIndexSearcher()
throws Exception
Exceptionpublic static Properties loadProperties() throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||