public class ForcedMetadataConnector
extends org.apache.manifoldcf.agents.transformation.BaseTransformationConnector
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ForcedMetadataConnector.SpecPacker |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_rcsid |
static java.lang.String |
ATTRIBUTE_PARAMETER |
static java.lang.String |
ATTRIBUTE_SOURCE |
static java.lang.String |
ATTRIBUTE_TARGET |
static java.lang.String |
ATTRIBUTE_VALUE |
static java.lang.String |
NODE_EXPRESSION |
static java.lang.String |
NODE_FIELDMAP |
static java.lang.String |
NODE_FILTEREMPTY |
static java.lang.String |
NODE_KEEPMETADATA |
static java.lang.String |
NODE_PAIR |
| Constructor and Description |
|---|
ForcedMetadataConnector() |
| Modifier and Type | Method and Description |
|---|---|
int |
addOrReplaceDocumentWithException(java.lang.String documentURI,
org.apache.manifoldcf.core.interfaces.VersionContext pipelineDescription,
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.
|
protected static boolean |
allDates(IDataSource[] dataSources) |
protected static boolean |
allReaders(IDataSource[] dataSources) |
protected static IDataSource |
append(IDataSource currentValues,
IDataSource data) |
protected static java.lang.Object[] |
conditionallyRemoveNulls(java.lang.Object[] input,
boolean filterEmpty) |
protected static void |
fillInExpressionsTab(java.util.Map<java.lang.String,java.lang.Object> paramMap,
org.apache.manifoldcf.core.interfaces.Specification os) |
java.lang.String |
getFormCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form check javascript method to call.
|
java.lang.String |
getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
Obtain the name of the form presave check javascript method to call.
|
org.apache.manifoldcf.core.interfaces.VersionContext |
getPipelineDescription(org.apache.manifoldcf.core.interfaces.Specification spec)
Get a pipeline version string, given a pipeline specification object.
|
protected static void |
moveData(org.apache.manifoldcf.agents.interfaces.RepositoryDocument docCopy,
java.lang.String target,
FieldDataFactory document,
java.lang.String field,
boolean filterEmpty) |
protected static java.lang.String |
nonExpressionEscape(java.lang.String input)
This is used to upgrade older constant values to new ones, that won't trigger expression eval.
|
protected static java.lang.String |
nonExpressionUnescape(java.lang.String input)
This is used to unescape text that's been escaped to prevent substitution of ${} expressions.
|
void |
outputSpecificationBody(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber,
int actualSequenceNumber,
java.lang.String tabName)
Output the specification body section.
|
void |
outputSpecificationHeader(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber,
java.util.List<java.lang.String> tabsArray)
Output the specification header section.
|
protected static int |
parseArgument(java.lang.String input,
int start,
java.lang.StringBuilder output) |
protected static int |
parseToEnd(java.lang.String input,
int start) |
static IDataSource |
processExpression(java.lang.String expression,
FieldDataFactory sourceDocument) |
java.lang.String |
processSpecificationPost(org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber)
Process a specification post.
|
protected static java.lang.String[] |
removeEmpties(java.lang.String[] input) |
void |
viewSpecification(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber)
View specification.
|
checkDateIndexable, checkDocumentIndexable, checkLengthIndexable, checkMimeTypeIndexable, checkURLIndexable, getActivitiesList, requestInfocheck, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration, viewConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheck, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfigurationpublic static final java.lang.String _rcsid
public static final java.lang.String NODE_EXPRESSION
public static final java.lang.String NODE_PAIR
public static final java.lang.String ATTRIBUTE_PARAMETER
public static final java.lang.String NODE_FIELDMAP
public static final java.lang.String NODE_KEEPMETADATA
public static final java.lang.String NODE_FILTEREMPTY
public static final java.lang.String ATTRIBUTE_SOURCE
public static final java.lang.String ATTRIBUTE_TARGET
public static final java.lang.String ATTRIBUTE_VALUE
public org.apache.manifoldcf.core.interfaces.VersionContext getPipelineDescription(org.apache.manifoldcf.core.interfaces.Specification spec)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
getPipelineDescription in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectorgetPipelineDescription in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorspec - is the current pipeline specification object for this connection for the job that is doing the crawling.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionpublic int addOrReplaceDocumentWithException(java.lang.String documentURI,
org.apache.manifoldcf.core.interfaces.VersionContext pipelineDescription,
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,
java.io.IOException
addOrReplaceDocumentWithException in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectoraddOrReplaceDocumentWithException in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectordocumentURI - 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.pipelineDescription - 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 a pipeline connector may use to perform operations, such as logging processing activity,
or sending a modified document to the next stage in the pipeline.java.io.IOException - only if there's a stream error reading the document data.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected static boolean allDates(IDataSource[] dataSources) throws java.io.IOException, org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static boolean allReaders(IDataSource[] dataSources) throws java.io.IOException, org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static void moveData(org.apache.manifoldcf.agents.interfaces.RepositoryDocument docCopy,
java.lang.String target,
FieldDataFactory document,
java.lang.String field,
boolean filterEmpty)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionprotected static java.lang.String[] removeEmpties(java.lang.String[] input)
protected static java.lang.Object[] conditionallyRemoveNulls(java.lang.Object[] input,
boolean filterEmpty)
public java.lang.String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
getFormCheckJavascriptMethodName in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectorgetFormCheckJavascriptMethodName in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public java.lang.String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
getFormPresaveCheckJavascriptMethodName in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectorgetFormPresaveCheckJavascriptMethodName in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorconnectionSequenceNumber - is the unique number of this connection within the job.public void outputSpecificationHeader(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber,
java.util.List<java.lang.String> tabsArray)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputSpecificationHeader in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectoroutputSpecificationHeader in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorout - is the output to which any HTML should be sent.locale - is the preferred local of the output.os - is the current pipeline specification for this connection.connectionSequenceNumber - is the unique number of this connection within the 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.ManifoldCFExceptionjava.io.IOExceptionpublic void outputSpecificationBody(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber,
int actualSequenceNumber,
java.lang.String tabName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputSpecificationBody in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectoroutputSpecificationBody in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorout - is the output to which any HTML should be sent.locale - is the preferred local of the output.os - is the current pipeline specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.actualSequenceNumber - is the connection within the job that has currently been selected.tabName - is the current tab name.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionpublic java.lang.String processSpecificationPost(org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
processSpecificationPost in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectorprocessSpecificationPost in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorvariableContext - contains the post data, including binary file-upload information.locale - is the preferred local of the output.os - is the current pipeline specification for this job.connectionSequenceNumber - is the unique number of this connection within the job.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void viewSpecification(org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.Specification os,
int connectionSequenceNumber)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
viewSpecification in interface org.apache.manifoldcf.agents.interfaces.IPipelineConnectorviewSpecification in class org.apache.manifoldcf.agents.transformation.BaseTransformationConnectorout - is the output to which any HTML should be sent.locale - is the preferred local of the output.connectionSequenceNumber - is the unique number of this connection within the job.os - is the current pipeline specification for this job.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionprotected static void fillInExpressionsTab(java.util.Map<java.lang.String,java.lang.Object> paramMap,
org.apache.manifoldcf.core.interfaces.Specification os)
protected static java.lang.String nonExpressionEscape(java.lang.String input)
protected static java.lang.String nonExpressionUnescape(java.lang.String input)
protected static IDataSource append(IDataSource currentValues, IDataSource data) throws java.io.IOException, org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic static IDataSource processExpression(java.lang.String expression, FieldDataFactory sourceDocument) throws java.io.IOException, org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static int parseArgument(java.lang.String input,
int start,
java.lang.StringBuilder output)
protected static int parseToEnd(java.lang.String input,
int start)