|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.manifoldcf.core.connector.BaseConnector
org.apache.manifoldcf.agents.output.BaseOutputConnector
org.apache.manifoldcf.agents.output.solr.SolrConnector
public class SolrConnector
This is the output connector for SOLR. Currently, no frills.
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
protected java.lang.String |
allowAttributeName
The allow attribute name |
protected java.lang.String |
denyAttributeName
The deny attribute name |
protected boolean |
doCommits
Whether or not to commit |
static java.lang.String |
INGEST_ACTIVITY
Ingestion activity |
protected HttpPoster |
poster
Local data |
static java.lang.String |
REMOVE_ACTIVITY
Document removal activity |
| Fields inherited from class org.apache.manifoldcf.core.connector.BaseConnector |
|---|
currentContext, params |
| Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputConnector |
|---|
DOCUMENTSTATUS_ACCEPTED, DOCUMENTSTATUS_REJECTED |
| Constructor Summary | |
|---|---|
SolrConnector()
Constructor. |
|
| Method Summary | |
|---|---|
int |
addOrReplaceDocument(java.lang.String documentURI,
java.lang.String outputDescription,
org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
Add (or replace) a document in the output data store using the connector. |
java.lang.String |
check()
Test the connection. |
void |
connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParameters)
Connect. |
void |
disconnect()
Close the connection. |
java.lang.String[] |
getActivitiesList()
Return the list of activities that this connector supports (i.e. |
java.lang.String |
getJSPFolder()
Return the path for the UI interface JSP elements. |
java.lang.String |
getOutputDescription(org.apache.manifoldcf.agents.interfaces.OutputSpecification spec)
Get an output version string, given an output specification. |
protected void |
getSession()
Set up a session |
void |
noteJobComplete(org.apache.manifoldcf.agents.interfaces.IOutputNotifyActivity activities)
Notify the connector of a completed job. |
void |
outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.lang.String tabName)
Output the configuration body section. |
void |
outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.util.ArrayList tabsArray)
Output the configuration header section. |
void |
outputSpecificationBody(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os,
java.lang.String tabName)
Output the specification body section. |
void |
outputSpecificationHeader(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os,
java.util.ArrayList tabsArray)
Output the specification header section. |
protected static void |
pack(java.lang.StringBuffer output,
java.lang.String value,
char delimiter)
Stuffer for packing a single string with an end delimiter |
protected static void |
packFixedList(java.lang.StringBuffer output,
java.lang.String[] values,
char delimiter)
Stuffer for packing lists of fixed length |
protected static void |
packList(java.lang.StringBuffer output,
java.util.ArrayList values,
char delimiter)
Stuffer for packing lists of variable length |
protected static void |
packList(java.lang.StringBuffer output,
java.lang.String[] values,
char delimiter)
Another stuffer for packing lists of variable length |
java.lang.String |
processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Process a configuration post. |
java.lang.String |
processSpecificationPost(org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os)
Process a specification post. |
void |
removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity activities)
Remove a document using the connector. |
protected static int |
unpack(java.lang.StringBuffer sb,
java.lang.String value,
int startPosition,
char delimiter)
Unstuffer for the above. |
protected static int |
unpackFixedList(java.lang.String[] output,
java.lang.String value,
int startPosition,
char delimiter)
Unstuffer for unpacking lists of fixed length |
protected static int |
unpackList(java.util.ArrayList output,
java.lang.String value,
int startPosition,
char delimiter)
Unstuffer for unpacking lists of variable length. |
void |
viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
View configuration. |
void |
viewSpecification(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os)
View specification. |
| Methods inherited from class org.apache.manifoldcf.agents.output.BaseOutputConnector |
|---|
checkDocumentIndexable, checkMimeTypeIndexable, requestInfo |
| Methods inherited from class org.apache.manifoldcf.core.connector.BaseConnector |
|---|
clearThreadContext, deinstall, getConfiguration, install, poll, setThreadContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.manifoldcf.core.interfaces.IConnector |
|---|
clearThreadContext, deinstall, getConfiguration, install, poll, setThreadContext |
| Field Detail |
|---|
public static final java.lang.String _rcsid
public static final java.lang.String INGEST_ACTIVITY
public static final java.lang.String REMOVE_ACTIVITY
protected HttpPoster poster
protected java.lang.String allowAttributeName
protected java.lang.String denyAttributeName
protected boolean doCommits
| Constructor Detail |
|---|
public SolrConnector()
| Method Detail |
|---|
public java.lang.String[] getActivitiesList()
getActivitiesList in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectorgetActivitiesList in class org.apache.manifoldcf.agents.output.BaseOutputConnectorpublic java.lang.String getJSPFolder()
public void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParameters)
connect in interface org.apache.manifoldcf.core.interfaces.IConnectorconnect in class org.apache.manifoldcf.core.connector.BaseConnectorconfigParameters - is the set of configuration parameters, which
in this case describe the target appliance, basic auth configuration, etc. (This formerly came
out of the ini file.)
public void disconnect()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
disconnect in interface org.apache.manifoldcf.core.interfaces.IConnectordisconnect in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFException
protected void getSession()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public java.lang.String check()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
check in interface org.apache.manifoldcf.core.interfaces.IConnectorcheck in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFException
public java.lang.String getOutputDescription(org.apache.manifoldcf.agents.interfaces.OutputSpecification spec)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
spec - is the current output specification for the job that is doing the crawling.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public int addOrReplaceDocument(java.lang.String documentURI,
java.lang.String outputDescription,
org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
documentURI - is the URI of the document. The URI is presumed to be the unique identifier which the output data store will use to process
and serve the document. This URI is constructed by the repository connector which fetches the document, and is thus universal across all output connectors.outputDescription - is the description string that was constructed for this document by the getOutputDescription() method.document - is the document data to be processed (handed to the output data store).authorityNameString - is the name of the authority responsible for authorizing any access tokens passed in with the repository document. May be null.activities - is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
public void removeDocument(java.lang.String documentURI,
java.lang.String outputDescription,
org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
documentURI - is the URI of the document. The URI is presumed to be the unique identifier which the output data store will use to process
and serve the document. This URI is constructed by the repository connector which fetches the document, and is thus universal across all output connectors.outputDescription - is the last description string that was constructed for this document by the getOutputDescription() method above.activities - is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
public void noteJobComplete(org.apache.manifoldcf.agents.interfaces.IOutputNotifyActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
noteJobComplete in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectornoteJobComplete in class org.apache.manifoldcf.agents.output.BaseOutputConnectoractivities - is the handle to an object that the implementer of an output connector may use to perform operations, such as logging processing activity.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
public void outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.util.ArrayList tabsArray)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputConfigurationHeader in interface org.apache.manifoldcf.core.interfaces.IConnectoroutputConfigurationHeader in class org.apache.manifoldcf.core.connector.BaseConnectorthreadContext - is the local thread context.out - is the output to which any HTML should be sent.parameters - are the configuration parameters, as they currently exist, for this connection being configured.tabsArray - is an array of tab names. Add to this array any tab names that are specific to the connector.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
public void outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.lang.String tabName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
public java.lang.String processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
processConfigurationPost in interface org.apache.manifoldcf.core.interfaces.IConnectorprocessConfigurationPost in class org.apache.manifoldcf.core.connector.BaseConnectorthreadContext - is the local thread context.variableContext - is the set of variables available from the post, including binary file post information.parameters - are the configuration parameters, as they currently exist, for this connection being configured.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public void viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
viewConfiguration in interface org.apache.manifoldcf.core.interfaces.IConnectorviewConfiguration in class org.apache.manifoldcf.core.connector.BaseConnectorthreadContext - is the local thread context.out - is the output to which any HTML should be sent.parameters - are the configuration parameters, as they currently exist, for this connection being configured.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
public void outputSpecificationHeader(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os,
java.util.ArrayList tabsArray)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputSpecificationHeader in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectoroutputSpecificationHeader in class org.apache.manifoldcf.agents.output.BaseOutputConnectorout - is the output to which any HTML should be sent.os - is the current output specification for this job.tabsArray - is an array of tab names. Add to this array any tab names that are specific to the connector.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
public void outputSpecificationBody(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os,
java.lang.String tabName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
public java.lang.String processSpecificationPost(org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
processSpecificationPost in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectorprocessSpecificationPost in class org.apache.manifoldcf.agents.output.BaseOutputConnectorvariableContext - contains the post data, including binary file-upload information.os - is the current output specification for this job.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public void viewSpecification(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
org.apache.manifoldcf.agents.interfaces.OutputSpecification os)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
viewSpecification in interface org.apache.manifoldcf.agents.interfaces.IOutputConnectorviewSpecification in class org.apache.manifoldcf.agents.output.BaseOutputConnectorout - is the output to which any HTML should be sent.os - is the current output specification for this job.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
protected static void pack(java.lang.StringBuffer output,
java.lang.String value,
char delimiter)
protected static int unpack(java.lang.StringBuffer sb,
java.lang.String value,
int startPosition,
char delimiter)
protected static void packFixedList(java.lang.StringBuffer output,
java.lang.String[] values,
char delimiter)
protected static int unpackFixedList(java.lang.String[] output,
java.lang.String value,
int startPosition,
char delimiter)
protected static void packList(java.lang.StringBuffer output,
java.util.ArrayList values,
char delimiter)
protected static void packList(java.lang.StringBuffer output,
java.lang.String[] values,
char delimiter)
protected static int unpackList(java.util.ArrayList output,
java.lang.String value,
int startPosition,
char delimiter)
output - is the output array to put the unpacked values into.value - is the value to unpack.startPosition - is the place to start the unpack.delimiter - is the character to use between values.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||