Class JDBCConnector
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
- org.apache.manifoldcf.crawler.connectors.jdbc.JDBCConnector
-
- All Implemented Interfaces:
org.apache.manifoldcf.core.interfaces.IConnector
,org.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
public class JDBCConnector extends org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
JDBC repository connector.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
JDBCConnector.TableSpec
This class represents data gleaned from a document specification, in a more usable form.protected static class
JDBCConnector.VariableMap
Variable map.protected static class
JDBCConnector.VariableMapItem
Variable map entry.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected java.lang.String
accessMethod
protected static java.lang.String[]
activitiesList
protected static java.lang.String
ACTIVITY_EXTERNAL_QUERY
protected static java.lang.String
ACTIVITY_FETCH
protected JDBCConnection
connection
protected java.lang.String
databaseName
protected static java.util.HashMap
documentKnownColumns
Special column names, as far as document queries are concernedprotected java.lang.String
host
protected java.lang.String
jdbcProvider
protected java.lang.String
password
protected java.lang.String
rawDriverString
protected java.lang.String
userName
-
Fields inherited from class org.apache.manifoldcf.core.connector.BaseConnector
currentContext, params
-
Fields inherited from interface org.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
GLOBAL_DENY_TOKEN, JOBMODE_CONTINUOUS, JOBMODE_ONCEONLY, MODEL_ADD, MODEL_ADD_CHANGE, MODEL_ADD_CHANGE_DELETE, MODEL_ALL, MODEL_CHAINED_ADD, MODEL_CHAINED_ADD_CHANGE, MODEL_CHAINED_ADD_CHANGE_DELETE, MODEL_PARTIAL
-
-
Constructor Summary
Constructors Constructor Description JDBCConnector()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
addConstant(JDBCConnector.VariableMap map, java.lang.String varName, java.lang.String value)
Add string query constantsprotected static boolean
addIDList(JDBCConnector.VariableMap map, java.lang.String varName, java.lang.String[] documentIdentifiers, java.util.Set<java.lang.String> fetchDocuments)
Build an idlist variable, and add it to the specified variable map.java.lang.String
addSeedDocuments(org.apache.manifoldcf.crawler.interfaces.ISeedingActivity activities, org.apache.manifoldcf.core.interfaces.Specification spec, java.lang.String lastSeedVersion, long seedTime, int jobMode)
Queue "seed" documents.protected static void
addVariable(JDBCConnector.VariableMap map, java.lang.String varName, long variable)
Add starttime and endtime query variablesprotected static void
addVariable(JDBCConnector.VariableMap map, java.lang.String varName, java.lang.String variable)
Add string query variablesprotected void
applyAccessTokens(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, java.util.Set<java.lang.String> accessTokens)
Apply access tokens to a repository document.protected void
applyMetadata(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, org.apache.manifoldcf.core.interfaces.IResultRow row)
Apply metadata to a repository document.protected void
applyMultiAttributeValues(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> values)
Apply multi-valued attribute values to a repository document.java.lang.String
check()
Check status of connection.void
connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Connect.protected static java.lang.String
createQueryString(java.lang.String queryText, java.util.ArrayList paramList)
Create an entity identifier from a querystring and a parameter list.void
disconnect()
Close the connection.java.lang.String[]
getActivitiesList()
Return the list of activities that this connector supports (i.e.java.lang.String[]
getBinNames(java.lang.String documentIdentifier)
Get the bin name string for a document identifier.int
getConnectorModel()
Model.int
getMaxDocumentRequest()
Get the maximum number of documents to amalgamate together into one batch, for this connector.protected void
getSession()
Set up a sessionprotected static void
handleIOException(java.lang.String id, java.io.IOException e)
void
outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, 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, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters, java.util.List<java.lang.String> tabsArray)
Output the configuration header section.void
outputSpecificationBody(org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, 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 ds, int connectionSequenceNumber, java.util.List<java.lang.String> tabsArray)
Output the specification header section.java.lang.String
processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IPostParameters variableContext, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Process a configuration post.void
processDocuments(java.lang.String[] documentIdentifiers, org.apache.manifoldcf.crawler.interfaces.IExistingVersions statuses, org.apache.manifoldcf.core.interfaces.Specification spec, org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities, int jobMode, boolean usesDefaultAuthority)
Process a set of documents.java.lang.String
processSpecificationPost(org.apache.manifoldcf.core.interfaces.IPostParameters variableContext, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, int connectionSequenceNumber)
Process a specification post.protected static java.lang.String
quoteSQLString(java.lang.String input)
Quote a sql string.protected static void
substituteQuery(java.lang.String inputString, JDBCConnector.VariableMap inputMap, java.lang.StringBuilder outputQuery, java.util.ArrayList outputParams)
Given a query, and a parameter map, substitute it.void
viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
View configuration.void
viewSpecification(org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, int connectionSequenceNumber)
View specification.-
Methods inherited from class org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
getFormCheckJavascriptMethodName, getFormPresaveCheckJavascriptMethodName, getRelationshipTypes, requestInfo
-
Methods inherited from class org.apache.manifoldcf.core.connector.BaseConnector
clearThreadContext, deinstall, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
ACTIVITY_EXTERNAL_QUERY
protected static final java.lang.String ACTIVITY_EXTERNAL_QUERY
- See Also:
- Constant Field Values
-
ACTIVITY_FETCH
protected static final java.lang.String ACTIVITY_FETCH
- See Also:
- Constant Field Values
-
activitiesList
protected static final java.lang.String[] activitiesList
-
connection
protected JDBCConnection connection
-
jdbcProvider
protected java.lang.String jdbcProvider
-
accessMethod
protected java.lang.String accessMethod
-
host
protected java.lang.String host
-
databaseName
protected java.lang.String databaseName
-
rawDriverString
protected java.lang.String rawDriverString
-
userName
protected java.lang.String userName
-
password
protected java.lang.String password
-
documentKnownColumns
protected static java.util.HashMap documentKnownColumns
Special column names, as far as document queries are concerned
-
-
Method Detail
-
getSession
protected void getSession() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Set up a session- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getActivitiesList
public java.lang.String[] getActivitiesList()
Return the list of activities that this connector supports (i.e. writes into the log).- Specified by:
getActivitiesList
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
getActivitiesList
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Returns:
- the list.
-
getConnectorModel
public int getConnectorModel()
Model. Depending on what people enter for the seeding query, this could be either ALL or could be less than that. So, I've decided it will be at least the adds and changes, and won't include the deletes.- Specified by:
getConnectorModel
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
getConnectorModel
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
connect
public void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Connect. The configuration parameters are included.- Specified by:
connect
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
connect
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
configParams
- are the configuration parameters for this connection.
-
check
public java.lang.String check() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Check status of connection.- Specified by:
check
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
check
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
disconnect
public void disconnect() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Close the connection. Call this before discarding the repository connector.- Specified by:
disconnect
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
disconnect
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getBinNames
public java.lang.String[] getBinNames(java.lang.String documentIdentifier)
Get the bin name string for a document identifier. The bin name describes the queue to which the document will be assigned for throttling purposes. Throttling controls the rate at which items in a given queue are fetched; it does not say anything about the overall fetch rate, which may operate on multiple queues or bins. For example, if you implement a web crawler, a good choice of bin name would be the server name, since that is likely to correspond to a real resource that will need real throttle protection.- Specified by:
getBinNames
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
getBinNames
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
documentIdentifier
- is the document identifier.- Returns:
- the bin name.
-
addSeedDocuments
public java.lang.String addSeedDocuments(org.apache.manifoldcf.crawler.interfaces.ISeedingActivity activities, org.apache.manifoldcf.core.interfaces.Specification spec, java.lang.String lastSeedVersion, long seedTime, int jobMode) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Queue "seed" documents. Seed documents are the starting places for crawling activity. Documents are seeded when this method calls appropriate methods in the passed in ISeedingActivity object. This method can choose to find repository changes that happen only during the specified time interval. The seeds recorded by this method will be viewed by the framework based on what the getConnectorModel() method returns. It is not a big problem if the connector chooses to create more seeds than are strictly necessary; it is merely a question of overall work required. The end time and seeding version string passed to this method may be interpreted for greatest efficiency. For continuous crawling jobs, this method will be called once, when the job starts, and at various periodic intervals as the job executes. When a job's specification is changed, the framework automatically resets the seeding version string to null. The seeding version string may also be set to null on each job run, depending on the connector model returned by getConnectorModel(). Note that it is always ok to send MORE documents rather than less to this method. The connector will be connected before this method can be called.- Specified by:
addSeedDocuments
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
addSeedDocuments
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
activities
- is the interface this method should use to perform whatever framework actions are desired.spec
- is a document specification (that comes from the job).seedTime
- is the end of the time range of documents to consider, exclusive.lastSeedVersion
- is the last seeding version string for this job, or null if the job has no previous seeding version string.jobMode
- is an integer describing how the job is being run, whether continuous or once-only.- Returns:
- an updated seeding version string, to be stored with the job.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
processDocuments
public void processDocuments(java.lang.String[] documentIdentifiers, org.apache.manifoldcf.crawler.interfaces.IExistingVersions statuses, org.apache.manifoldcf.core.interfaces.Specification spec, org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities, int jobMode, boolean usesDefaultAuthority) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Process a set of documents. This is the method that should cause each document to be fetched, processed, and the results either added to the queue of documents for the current job, and/or entered into the incremental ingestion manager. The document specification allows this class to filter what is done based on the job. The connector will be connected before this method can be called.- Specified by:
processDocuments
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
processDocuments
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
documentIdentifiers
- is the set of document identifiers to process.statuses
- are the currently-stored document versions for each document in the set of document identifiers passed in above.activities
- is the interface this method should use to queue up new document references and ingest documents.jobMode
- is an integer describing how the job is being run, whether continuous or once-only.usesDefaultAuthority
- will be true only if the authority in use for these documents is the default one.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
handleIOException
protected static void handleIOException(java.lang.String id, java.io.IOException e) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
outputConfigurationHeader
public void outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters, java.util.List<java.lang.String> tabsArray) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, java.io.IOException
Output the configuration header section. This method is called in the head section of the connector's configuration page. Its purpose is to add the required tabs to the list, and to output any javascript methods that might be needed by the configuration editing HTML.- Specified by:
outputConfigurationHeader
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
outputConfigurationHeader
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
outputConfigurationBody
public void outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters, java.lang.String tabName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, java.io.IOException
Output the configuration body section. This method is called in the body section of the connector's configuration page. Its purpose is to present the required form elements for editing. The coder can presume that the HTML that is output from this configuration will be within appropriate <html>, <body>, and <form> tags. The name of the form is "editconnection".- Specified by:
outputConfigurationBody
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
outputConfigurationBody
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.tabName
- is the current tab name.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
processConfigurationPost
public java.lang.String processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IPostParameters variableContext, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Process a configuration post. This method is called at the start of the connector's configuration page, whenever there is a possibility that form data for a connection has been posted. Its purpose is to gather form information and modify the configuration parameters accordingly. The name of the posted form is "editconnection".- Specified by:
processConfigurationPost
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
processConfigurationPost
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Returns:
- null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
viewConfiguration
public void viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.ConfigParams parameters) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, java.io.IOException
View configuration. This method is called in the body section of the connector's view configuration page. Its purpose is to present the connection information to the user. The coder can presume that the HTML that is output from this configuration will be within appropriate <html> and <body>tags.- Specified by:
viewConfiguration
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
viewConfiguration
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
outputSpecificationHeader
public void outputSpecificationHeader(org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, int connectionSequenceNumber, java.util.List<java.lang.String> tabsArray) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, java.io.IOException
Output the specification header section. This method is called in the head section of a job page which has selected a repository connection of the current type. Its purpose is to add the required tabs to the list, and to output any javascript methods that might be needed by the job editing HTML. The connector will be connected before this method can be called.- Specified by:
outputSpecificationHeader
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
outputSpecificationHeader
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
out
- is the output to which any HTML should be sent.locale
- is the locale the output is preferred to be in.ds
- is the current document specification for this job.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.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
outputSpecificationBody
public void outputSpecificationBody(org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, int connectionSequenceNumber, int actualSequenceNumber, java.lang.String tabName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, java.io.IOException
Output the specification body section. This method is called in the body section of a job page which has selected a repository connection of the current type. Its purpose is to present the required form elements for editing. The coder can presume that the HTML that is output from this configuration will be within appropriate <html>, <body>, and <form> tags. The name of the form is always "editjob". The connector will be connected before this method can be called.- Specified by:
outputSpecificationBody
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
outputSpecificationBody
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
out
- is the output to which any HTML should be sent.locale
- is the locale the output is preferred to be in.ds
- is the current document 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. (actualSequenceNumber, tabName) form a unique tuple within the job.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
processSpecificationPost
public java.lang.String processSpecificationPost(org.apache.manifoldcf.core.interfaces.IPostParameters variableContext, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, int connectionSequenceNumber) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Process a specification post. This method is called at the start of job's edit or view page, whenever there is a possibility that form data for a connection has been posted. Its purpose is to gather form information and modify the document specification accordingly. The name of the posted form is always "editjob". The connector will be connected before this method can be called.- Specified by:
processSpecificationPost
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
processSpecificationPost
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
variableContext
- contains the post data, including binary file-upload information.locale
- is the locale the output is preferred to be in.ds
- is the current document specification for this job.connectionSequenceNumber
- is the unique number of this connection within the job.- Returns:
- null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
viewSpecification
public void viewSpecification(org.apache.manifoldcf.core.interfaces.IHTTPOutput out, java.util.Locale locale, org.apache.manifoldcf.core.interfaces.Specification ds, int connectionSequenceNumber) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, java.io.IOException
View specification. This method is called in the body section of a job's view page. Its purpose is to present the document specification information to the user. The coder can presume that the HTML that is output from this configuration will be within appropriate <html> and <body>tags. The connector will be connected before this method can be called.- Specified by:
viewSpecification
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
viewSpecification
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Parameters:
out
- is the output to which any HTML should be sent.locale
- is the locale the output is preferred to be in.ds
- is the current document specification for this job.connectionSequenceNumber
- is the unique number of this connection within the job.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
applyMetadata
protected void applyMetadata(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, org.apache.manifoldcf.core.interfaces.IResultRow row) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Apply metadata to a repository document.- Parameters:
rd
- is the repository document to apply the metadata to.row
- is the resultset row to use to get the metadata. All non-special columns from this row will be considered to be metadata.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
applyMultiAttributeValues
protected void applyMultiAttributeValues(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> values) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Apply multi-valued attribute values to a repository document.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
applyAccessTokens
protected void applyAccessTokens(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, java.util.Set<java.lang.String> accessTokens) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Apply access tokens to a repository document.- Parameters:
rd
- is the repository document to apply the access tokens to.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getMaxDocumentRequest
public int getMaxDocumentRequest()
Get the maximum number of documents to amalgamate together into one batch, for this connector.- Specified by:
getMaxDocumentRequest
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
getMaxDocumentRequest
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Returns:
- the maximum number. 0 indicates "unlimited".
-
addVariable
protected static void addVariable(JDBCConnector.VariableMap map, java.lang.String varName, long variable)
Add starttime and endtime query variables
-
addVariable
protected static void addVariable(JDBCConnector.VariableMap map, java.lang.String varName, java.lang.String variable)
Add string query variables
-
addConstant
protected static void addConstant(JDBCConnector.VariableMap map, java.lang.String varName, java.lang.String value)
Add string query constants
-
addIDList
protected static boolean addIDList(JDBCConnector.VariableMap map, java.lang.String varName, java.lang.String[] documentIdentifiers, java.util.Set<java.lang.String> fetchDocuments)
Build an idlist variable, and add it to the specified variable map.
-
substituteQuery
protected static void substituteQuery(java.lang.String inputString, JDBCConnector.VariableMap inputMap, java.lang.StringBuilder outputQuery, java.util.ArrayList outputParams) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Given a query, and a parameter map, substitute it. Each variable substitutes the string, and it also substitutes zero or more query parameters.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
createQueryString
protected static java.lang.String createQueryString(java.lang.String queryText, java.util.ArrayList paramList)
Create an entity identifier from a querystring and a parameter list.
-
quoteSQLString
protected static java.lang.String quoteSQLString(java.lang.String input)
Quote a sql string.
-
-