Class FilenetConnector
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
- org.apache.manifoldcf.crawler.connectors.filenet.FilenetConnector
-
- All Implemented Interfaces:
org.apache.manifoldcf.core.interfaces.IConnector,org.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
public class FilenetConnector extends org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classFilenetConnector.CheckConnectionThreadprotected classFilenetConnector.DestroySessionThreadprotected classFilenetConnector.GetChildFoldersThreadprotected classFilenetConnector.GetDocumentClassesInfoThreadprotected classFilenetConnector.GetDocumentClassesMetadataFieldsInfoThreadprotected classFilenetConnector.GetDocumentContentCountThreadprotected classFilenetConnector.GetDocumentContentsThreadprotected classFilenetConnector.GetDocumentInformationThreadprotected classFilenetConnector.GetMatchingObjectIdsThreadprotected classFilenetConnector.GetSessionThreadprotected static classFilenetConnector.SpecInfo
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringACTIVITY_FETCHstatic java.lang.StringCONFIG_PARAM_FILENETDOMAINstatic java.lang.StringCONFIG_PARAM_FILENETDOMAIN_OLDstatic java.lang.StringCONFIG_PARAM_OBJECTSTOREstatic java.lang.StringCONFIG_PARAM_PASSWORDstatic java.lang.StringCONFIG_PARAM_SERVERHOSTNAMEstatic java.lang.StringCONFIG_PARAM_SERVERPORTstatic java.lang.StringCONFIG_PARAM_SERVERPROTOCOLstatic java.lang.StringCONFIG_PARAM_SERVERWSILOCATIONstatic java.lang.StringCONFIG_PARAM_URLHOSTNAMEstatic java.lang.StringCONFIG_PARAM_URLLOCATIONstatic java.lang.StringCONFIG_PARAM_URLPORTstatic java.lang.StringCONFIG_PARAM_URLPROTOCOLstatic java.lang.StringCONFIG_PARAM_USERIDprotected java.lang.StringdocURIPrefixDocument URI protocol, server, port, and locationprotected java.lang.StringdocUrlLocationDocument URI locationprotected java.lang.StringdocUrlPortDocument URI portprotected java.lang.StringdocUrlServerNameDocument URI server nameprotected java.lang.StringdocUrlServerProtocolDocument URI server protocolprotected java.lang.StringfilenetDomainFilenet domainprotected longlastSessionFetchTime last session was createdprotected java.lang.StringobjectStoreObject storeprotected java.lang.StringpasswordPasswordprotected java.lang.StringserverHostnameServer host nameprotected java.lang.StringserverLocationServer locationprotected java.lang.StringserverPortServer portprotected java.lang.StringserverProtocolServer protocolprotected java.lang.StringserverWSIURIURI to get us to the webservices integrationprotected IFilenetsessionFilenet session handle.static java.lang.StringSPEC_ATTRIBUTE_ALLMETADATAstatic java.lang.StringSPEC_ATTRIBUTE_FIELDNAMEstatic java.lang.StringSPEC_ATTRIBUTE_MATCHTYPEstatic java.lang.StringSPEC_ATTRIBUTE_VALUEstatic java.lang.StringSPEC_NODE_DOCUMENTCLASSstatic java.lang.StringSPEC_NODE_FOLDERstatic java.lang.StringSPEC_NODE_MATCHstatic java.lang.StringSPEC_NODE_METADATAFIELDstatic java.lang.StringSPEC_NODE_MIMETYPEprotected static longtimeToReleaseprotected java.lang.StringuserIDUsername-
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 FilenetConnector()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringaddSeedDocuments(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 java.lang.StringbuildTime(java.util.Calendar c, long timeValue)java.lang.Stringcheck()Test the connection.protected voidcheckConnection()Check connection, with appropriate retriesvoidconnect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)Connect to filenet.protected static java.lang.StringconvertToURI(java.lang.String urlBase, java.lang.String documentIdentifier, int elementNumber, java.lang.String documentClass)Convert a document identifier to a URI.voiddisconnect()Disconnect from Filenet.protected java.lang.String[]doGetChildFolders(java.lang.String[] folderPath)Get child folder namesprotected java.lang.IntegerdoGetDocumentContentCount(java.lang.String documentIdentifier)protected voiddoGetDocumentContents(java.lang.String docId, int elementNumber, java.lang.String tempFileName)Get document contentsprotected FileInfodoGetDocumentInformation(java.lang.String docId, java.util.Map<java.lang.String,java.lang.Object> metadataFields)Get document infoprotected java.lang.String[]doGetMatchingObjectIds(java.lang.String sql)Get matching object id's for a given queryjava.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.java.lang.String[]getChildFolders(java.lang.String folderName)Get child folder names, given a starting folder name.intgetConnectorModel()Let the crawler know the completeness of the information we are giving it.DocumentClassDefinition[]getDocumentClassesDetails()Get the set of available document classes, with detailsprotected DocumentClassDefinition[]getDocumentClassesInfo()Get document class details, with appropriate retriesMetadataFieldDefinition[]getDocumentClassMetadataFieldsDetails(java.lang.String documentClassName)Get the set of available metadata fields per document classprotected MetadataFieldDefinition[]getDocumentClassMetadataFieldsInfo(java.lang.String documentClassName)Get document class metadata fields details, with appropriate retriesintgetMaxDocumentRequest()java.lang.String[]getMimeTypes()Get the set of available mime typesprotected voidgetSession()Get a DFC session.protected static voidhandleIOException(java.io.IOException e, java.lang.String documentIdentifier, java.lang.String context)booleanisConnected()This method is called to assess whether to count this connector instance should actually be counted as being connected.protected static booleanlikeMatch(java.lang.String matchDocValue, int matchDocPos, java.lang.String matchValue, int matchPos)Match a portion of a string with SQL wildcards (%)voidoutputConfigurationBody(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.voidoutputConfigurationHeader(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.voidoutputSpecificationBody(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.voidoutputSpecificationHeader(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.protected static booleanperformMatch(java.lang.String matchType, java.lang.String matchDocValue, java.lang.String matchValue)Emulate the query matching for filenet sql expressions.voidpoll()This method is periodically called for all connectors that are connected but not in active use.protected static intprint_digit(java.lang.StringBuilder sb, int value, int divisor)protected static voidprint_int(java.lang.StringBuilder sb, int value, int digits)java.lang.StringprocessConfigurationPost(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.voidprocessDocuments(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.StringprocessSpecificationPost(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.StringquoteSQLString(java.lang.String value)protected voidreleaseCheck()Release the session, if it's time.booleanrequestInfo(org.apache.manifoldcf.core.interfaces.Configuration output, java.lang.String command)Request arbitrary connector information.voidviewConfiguration(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.voidviewSpecification(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
-
Methods inherited from class org.apache.manifoldcf.core.connector.BaseConnector
clearThreadContext, deinstall, getConfiguration, install, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
CONFIG_PARAM_USERID
public static final java.lang.String CONFIG_PARAM_USERID
- See Also:
- Constant Field Values
-
CONFIG_PARAM_PASSWORD
public static final java.lang.String CONFIG_PARAM_PASSWORD
- See Also:
- Constant Field Values
-
CONFIG_PARAM_FILENETDOMAIN_OLD
public static final java.lang.String CONFIG_PARAM_FILENETDOMAIN_OLD
- See Also:
- Constant Field Values
-
CONFIG_PARAM_FILENETDOMAIN
public static final java.lang.String CONFIG_PARAM_FILENETDOMAIN
- See Also:
- Constant Field Values
-
CONFIG_PARAM_OBJECTSTORE
public static final java.lang.String CONFIG_PARAM_OBJECTSTORE
- See Also:
- Constant Field Values
-
CONFIG_PARAM_SERVERPROTOCOL
public static final java.lang.String CONFIG_PARAM_SERVERPROTOCOL
- See Also:
- Constant Field Values
-
CONFIG_PARAM_SERVERHOSTNAME
public static final java.lang.String CONFIG_PARAM_SERVERHOSTNAME
- See Also:
- Constant Field Values
-
CONFIG_PARAM_SERVERPORT
public static final java.lang.String CONFIG_PARAM_SERVERPORT
- See Also:
- Constant Field Values
-
CONFIG_PARAM_SERVERWSILOCATION
public static final java.lang.String CONFIG_PARAM_SERVERWSILOCATION
- See Also:
- Constant Field Values
-
CONFIG_PARAM_URLPROTOCOL
public static final java.lang.String CONFIG_PARAM_URLPROTOCOL
- See Also:
- Constant Field Values
-
CONFIG_PARAM_URLHOSTNAME
public static final java.lang.String CONFIG_PARAM_URLHOSTNAME
- See Also:
- Constant Field Values
-
CONFIG_PARAM_URLPORT
public static final java.lang.String CONFIG_PARAM_URLPORT
- See Also:
- Constant Field Values
-
CONFIG_PARAM_URLLOCATION
public static final java.lang.String CONFIG_PARAM_URLLOCATION
- See Also:
- Constant Field Values
-
SPEC_NODE_FOLDER
public static final java.lang.String SPEC_NODE_FOLDER
- See Also:
- Constant Field Values
-
SPEC_NODE_MIMETYPE
public static final java.lang.String SPEC_NODE_MIMETYPE
- See Also:
- Constant Field Values
-
SPEC_NODE_DOCUMENTCLASS
public static final java.lang.String SPEC_NODE_DOCUMENTCLASS
- See Also:
- Constant Field Values
-
SPEC_NODE_METADATAFIELD
public static final java.lang.String SPEC_NODE_METADATAFIELD
- See Also:
- Constant Field Values
-
SPEC_NODE_MATCH
public static final java.lang.String SPEC_NODE_MATCH
- See Also:
- Constant Field Values
-
SPEC_ATTRIBUTE_VALUE
public static final java.lang.String SPEC_ATTRIBUTE_VALUE
- See Also:
- Constant Field Values
-
SPEC_ATTRIBUTE_ALLMETADATA
public static final java.lang.String SPEC_ATTRIBUTE_ALLMETADATA
- See Also:
- Constant Field Values
-
SPEC_ATTRIBUTE_MATCHTYPE
public static final java.lang.String SPEC_ATTRIBUTE_MATCHTYPE
- See Also:
- Constant Field Values
-
SPEC_ATTRIBUTE_FIELDNAME
public static final java.lang.String SPEC_ATTRIBUTE_FIELDNAME
- See Also:
- Constant Field Values
-
ACTIVITY_FETCH
public static final java.lang.String ACTIVITY_FETCH
- See Also:
- Constant Field Values
-
timeToRelease
protected static final long timeToRelease
- See Also:
- Constant Field Values
-
session
protected IFilenet session
Filenet session handle.
-
lastSessionFetch
protected long lastSessionFetch
Time last session was created
-
userID
protected java.lang.String userID
Username
-
password
protected java.lang.String password
Password
-
filenetDomain
protected java.lang.String filenetDomain
Filenet domain
-
objectStore
protected java.lang.String objectStore
Object store
-
serverProtocol
protected java.lang.String serverProtocol
Server protocol
-
serverHostname
protected java.lang.String serverHostname
Server host name
-
serverPort
protected java.lang.String serverPort
Server port
-
serverLocation
protected java.lang.String serverLocation
Server location
-
serverWSIURI
protected java.lang.String serverWSIURI
URI to get us to the webservices integration
-
docUrlServerProtocol
protected java.lang.String docUrlServerProtocol
Document URI server protocol
-
docUrlServerName
protected java.lang.String docUrlServerName
Document URI server name
-
docUrlPort
protected java.lang.String docUrlPort
Document URI port
-
docUrlLocation
protected java.lang.String docUrlLocation
Document URI location
-
docURIPrefix
protected java.lang.String docURIPrefix
Document URI protocol, server, port, and location
-
-
Method Detail
-
getSession
protected void getSession() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet a DFC session. This will be done every time it is needed.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
releaseCheck
protected void releaseCheck() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionRelease the session, if it's time.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getConnectorModel
public int getConnectorModel()
Let the crawler know the completeness of the information we are giving it.- Specified by:
getConnectorModelin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
getConnectorModelin classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
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:
getBinNamesin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
getBinNamesin classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector- Parameters:
documentIdentifier- is the document identifier.- Returns:
- the bin name.
-
getActivitiesList
public java.lang.String[] getActivitiesList()
Return the list of activities that this connector supports (i.e. writes into the log).- Specified by:
getActivitiesListin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
getActivitiesListin classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector- Returns:
- the list.
-
connect
public void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Connect to filenet.- Specified by:
connectin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
connectin classorg.apache.manifoldcf.core.connector.BaseConnector
-
check
public java.lang.String check() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionTest the connection. Returns a string describing the connection integrity.- Specified by:
checkin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
checkin classorg.apache.manifoldcf.core.connector.BaseConnector- Returns:
- the connection's status as a displayable string.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
poll
public void poll() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionThis method is periodically called for all connectors that are connected but not in active use.- Specified by:
pollin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
pollin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
isConnected
public boolean isConnected()
This method is called to assess whether to count this connector instance should actually be counted as being connected.- Specified by:
isConnectedin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
isConnectedin classorg.apache.manifoldcf.core.connector.BaseConnector- Returns:
- true if the connector instance is actually connected.
-
disconnect
public void disconnect() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionDisconnect from Filenet.- Specified by:
disconnectin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
disconnectin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
requestInfo
public boolean requestInfo(org.apache.manifoldcf.core.interfaces.Configuration output, java.lang.String command) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionRequest arbitrary connector information. This method is called directly from the API in order to allow API users to perform any one of several connector-specific queries.- Specified by:
requestInfoin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
requestInfoin classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector- Parameters:
output- is the response object, to be filled in by this method.command- is the command, which is taken directly from the API request.- Returns:
- true if the resource is found, false if not. In either case, output may be filled in.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getChildFolders
public java.lang.String[] getChildFolders(java.lang.String folderName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet child folder names, given a starting folder name.- Parameters:
folderName- is the starting folder name.- Returns:
- the child folder names.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
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.ServiceInterruptionQueue "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:
addSeedDocumentsin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
addSeedDocumentsin 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.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
quoteSQLString
protected static java.lang.String quoteSQLString(java.lang.String value)
-
buildTime
protected static java.lang.String buildTime(java.util.Calendar c, long timeValue)
-
print_int
protected static void print_int(java.lang.StringBuilder sb, int value, int digits)
-
print_digit
protected static int print_digit(java.lang.StringBuilder sb, int value, int divisor)
-
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.ServiceInterruptionProcess 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:
processDocumentsin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
processDocumentsin 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.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
handleIOException
protected static void handleIOException(java.io.IOException e, java.lang.String documentIdentifier, java.lang.String context) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
performMatch
protected static boolean performMatch(java.lang.String matchType, java.lang.String matchDocValue, java.lang.String matchValue)Emulate the query matching for filenet sql expressions.
-
likeMatch
protected static boolean likeMatch(java.lang.String matchDocValue, int matchDocPos, java.lang.String matchValue, int matchPos)Match a portion of a string with SQL wildcards (%)
-
getMaxDocumentRequest
public int getMaxDocumentRequest()
- Specified by:
getMaxDocumentRequestin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
getMaxDocumentRequestin classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
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.IOExceptionOutput 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:
outputConfigurationHeaderin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
outputConfigurationHeaderin 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.ManifoldCFExceptionjava.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.IOExceptionOutput 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:
outputConfigurationBodyin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
outputConfigurationBodyin 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.ManifoldCFExceptionjava.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.ManifoldCFExceptionProcess 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:
processConfigurationPostin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
processConfigurationPostin 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.IOExceptionView 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:
viewConfigurationin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
viewConfigurationin 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.ManifoldCFExceptionjava.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.IOExceptionOutput 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:
outputSpecificationHeaderin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
outputSpecificationHeaderin 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.ManifoldCFExceptionjava.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.IOExceptionOutput 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:
outputSpecificationBodyin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
outputSpecificationBodyin 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.ManifoldCFExceptionjava.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.ManifoldCFExceptionProcess 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:
processSpecificationPostin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
processSpecificationPostin 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.IOExceptionView 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:
viewSpecificationin interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector- Overrides:
viewSpecificationin 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.ManifoldCFExceptionjava.io.IOException
-
getDocumentClassesDetails
public DocumentClassDefinition[] getDocumentClassesDetails() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get the set of available document classes, with details- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getDocumentClassMetadataFieldsDetails
public MetadataFieldDefinition[] getDocumentClassMetadataFieldsDetails(java.lang.String documentClassName) throws org.apache.manifoldcf.agents.interfaces.ServiceInterruption, org.apache.manifoldcf.core.interfaces.ManifoldCFException
Get the set of available metadata fields per document class- Throws:
org.apache.manifoldcf.agents.interfaces.ServiceInterruptionorg.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getMimeTypes
public java.lang.String[] getMimeTypes() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet the set of available mime types- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
convertToURI
protected static java.lang.String convertToURI(java.lang.String urlBase, java.lang.String documentIdentifier, int elementNumber, java.lang.String documentClass)Convert a document identifier to a URI. The URI is the URI that will be the unique key from the search index, and will be presented to the user as part of the search results.- Parameters:
documentIdentifier- is the document identifier.- Returns:
- the document uri.
-
checkConnection
protected void checkConnection() throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionCheck connection, with appropriate retries- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getDocumentClassesInfo
protected DocumentClassDefinition[] getDocumentClassesInfo() throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get document class details, with appropriate retries- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getDocumentClassMetadataFieldsInfo
protected MetadataFieldDefinition[] getDocumentClassMetadataFieldsInfo(java.lang.String documentClassName) throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get document class metadata fields details, with appropriate retries- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
doGetChildFolders
protected java.lang.String[] doGetChildFolders(java.lang.String[] folderPath) throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet child folder names- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
doGetMatchingObjectIds
protected java.lang.String[] doGetMatchingObjectIds(java.lang.String sql) throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet matching object id's for a given query- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
doGetDocumentContentCount
protected java.lang.Integer doGetDocumentContentCount(java.lang.String documentIdentifier) throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
doGetDocumentInformation
protected FileInfo doGetDocumentInformation(java.lang.String docId, java.util.Map<java.lang.String,java.lang.Object> metadataFields) throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get document info- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
doGetDocumentContents
protected void doGetDocumentContents(java.lang.String docId, int elementNumber, java.lang.String tempFileName) throws FilenetException, org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet document contents- Throws:
FilenetExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
-