Class LivelinkConnector
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
- org.apache.manifoldcf.crawler.connectors.livelink.LivelinkConnector
-
- All Implemented Interfaces:
org.apache.manifoldcf.core.interfaces.IConnector
,org.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
public class LivelinkConnector extends org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
This is the Livelink implementation of the IRepositoryConnectr interface. The original Volant code forced there to be one livelink session per JVM, with lots of buggy synchronization present to try to enforce this. This implementation is multi-session. However, since it is possible that the Volant restriction was indeed needed, I have attempted to structure things to allow me to turn on single-session if needed. For livelink, the document identifiers are the object identifiers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
LivelinkConnector.CategoryPathAccumulator
This class caches the category path strings associated with a given category object identifier.protected class
LivelinkConnector.DocumentReadingThread
This thread performs a LAPI FetchVersion command, streaming the resulting document back through a XThreadInputStream to the invoking thread.protected static class
LivelinkConnector.ExecuteMethodThread
This thread does the actual socket communication with the server.protected class
LivelinkConnector.GetAttributeValueThread
protected class
LivelinkConnector.GetCategoryAttributesThread
protected class
LivelinkConnector.GetCategoryVersionThread
protected class
LivelinkConnector.GetObjectCategoryIDsThread
protected class
LivelinkConnector.GetObjectInfoThread
Thread we can abandon that gets object information for a volume and an id.protected class
LivelinkConnector.GetObjectRightsThread
protected class
LivelinkConnector.GetSessionThread
protected class
LivelinkConnector.GetUserInfoThread
Thread we can abandon that gets user information for a userID.protected class
LivelinkConnector.GetVersionInfoThread
Thread we can abandon that gets version information for a volume and an id and a revision.protected class
LivelinkConnector.ListObjectsThread
protected class
LivelinkConnector.ListUsersThread
Thread we can abandon that lists all users (except admin).protected class
LivelinkConnector.LivelinkContext
Local cache for various kinds of objects that may be useful more than once.protected class
LivelinkConnector.MetadataDescription
Class that manages to find catid's and attribute names that have been specified.protected static class
LivelinkConnector.MetadataItem
Class that describes a metadata catid and attribute set.protected static class
LivelinkConnector.MetadataPathItem
Class that describes a metadata catid and path.protected class
LivelinkConnector.ObjectInformation
This object represents an object information cache.static class
LivelinkConnector.Pair<L,R>
A class to store a pair structure, where none of the properties can behave as a key.protected class
LivelinkConnector.RootValue
Class representing a root value object, plus remainder string.protected class
LivelinkConnector.SystemMetadataDescription
Class that tracks paths associated with nodes, and also keeps track of the name of the metadata attribute to use for the path.protected class
LivelinkConnector.UserInformation
This object represents a cache of user information.protected class
LivelinkConnector.VersionInformation
This object represents a cache of version information.protected static class
LivelinkConnector.VolumeAndId
Class for returning volume id/folder id combination on path lookup.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
protected static java.lang.String
CATEGORY_NAME
protected static java.lang.String
ENTWKSPACE_NAME
protected static java.lang.String
GENERAL_CREATIONDATE_FIELD
protected static java.lang.String
GENERAL_CREATOR
protected static java.lang.String
GENERAL_DESCRIPTION_FIELD
protected static java.lang.String
GENERAL_MODIFIER
protected static java.lang.String
GENERAL_MODIFYDATE_FIELD
protected static java.lang.String
GENERAL_NAME_FIELD
protected static java.lang.String
GENERAL_OWNER
protected static java.lang.String
GENERAL_PARENTID
-
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 LivelinkConnector()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 int
assessRetry(int sanityRetryCount, org.apache.manifoldcf.core.interfaces.ManifoldCFException e)
Do a retry, or throw an exception if the retry count has been exhaustedjava.lang.String
check()
Check status of connection.protected static boolean
checkInclude(java.lang.String filename, org.apache.manifoldcf.core.interfaces.Specification documentSpecification)
Check if a file or directory should be included, given a document specification.protected boolean
checkIngest(LivelinkConnector.LivelinkContext llc, int objID, org.apache.manifoldcf.core.interfaces.Specification documentSpecification)
Check if a file should be ingested, given a document specification.protected static boolean
checkMatch(java.lang.String sourceMatch, int sourceIndex, java.lang.String match)
Check a match between two strings with wildcards.void
connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Connect.protected java.lang.String
convertToIngestURI(java.lang.String documentIdentifier)
Convert a document identifier to a relative URI to read data from.protected java.lang.String
convertToViewURI(java.lang.String documentIdentifier)
Convert a document identifier to a URI to view.protected java.lang.String
createLivelinkLoginURI()
Create the login URI.void
disconnect()
Close the connection.protected static int
executeMethodViaThread(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpRequestBase executeMethod)
protected static void
fillInDocumentAccessTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Fill in Document Access tabprotected static void
fillInDocumentViewTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Fill in Document View tabprotected static void
fillInFiltersTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in filters tabprotected static void
fillInMetadataTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in Metadata tabprotected static void
fillInPathsTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in paths tabprotected static void
fillInSecurityTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in security tabprotected static void
fillInServerTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Fill in Server tabprotected void
fillInTransientMetadataInfo(java.util.Map<java.lang.String,java.lang.Object> velocityContext, int connectionSequenceNumber)
Fill in the transient portion of the Metadata tabprotected void
fillInTransientPathsInfo(java.util.Map<java.lang.String,java.lang.Object> velocityContext, int connectionSequenceNumber)
Fill in the transient portion of the Paths tabjava.lang.String[]
getActivitiesList()
List the activities we might report on.protected java.lang.String[]
getAttributeValue(com.opentext.api.LLValue categoryVersion, java.lang.String attributeName)
Get an attribute value from a category version.java.lang.String[]
getBinNames(java.lang.String documentIdentifier)
Get the bin name string for a document identifier.protected java.lang.String[]
getCategoryAttributes(int catObjectID)
Given a category path, get a list of legal attribute names.java.lang.String[]
getCategoryAttributes(java.lang.String pathString)
Given a category path, get a list of legal attribute names.protected java.lang.String[]
getCategoryAttributes(LivelinkConnector.LivelinkContext llc, java.lang.String pathString)
protected int
getCategoryId(LivelinkConnector.RootValue rv)
Rootvalue version of getCategoryId.protected com.opentext.api.LLValue
getCatVersion(int objID, int catID)
Get a category version for document.protected java.lang.String[]
getChildCategories(LivelinkConnector.LivelinkContext llc, java.lang.String pathString)
Given a path string, get a list of categories under that node.java.lang.String[]
getChildCategoryNames(java.lang.String pathString)
Given a path string, get a list of categories under that node.java.lang.String[]
getChildFolderNames(java.lang.String pathString)
Given a path string, get a list of folders and projects under that node.protected java.lang.String[]
getChildFolders(LivelinkConnector.LivelinkContext llc, java.lang.String pathString)
Given a path string, get a list of folders and projects under that node.int
getConnectorModel()
Tell the world what model this connector uses for getDocumentIdentifiers().protected org.apache.http.HttpHost
getHost()
protected org.apache.http.client.HttpClient
getInitializedClient(java.lang.String contextMsg)
Initialize a livelink client connectionint
getMaxDocumentRequest()
Get the maximum number of documents to amalgamate together into one batch, for this connector.protected int[]
getObjectCategoryIDs(int vol, int id)
Get category IDs associated with an object.protected int[]
getObjectRights(int vol, int objID)
Get an object's rights.protected LivelinkConnector.VolumeAndId
getPathId(LivelinkConnector.RootValue rv)
RootValue version of getPathId.protected void
getSession()
protected void
getSessionParameters()
java.lang.String[]
getWorkspaceNames()
Get the allowed workspace names.protected static void
handleHttpException(java.lang.String contextMsg, org.apache.http.HttpException e)
protected static void
handleIOException(java.lang.String contextMsg, java.io.IOException e)
protected int
handleLivelinkRuntimeException(java.lang.RuntimeException e, int sanityRetryCount, boolean failIfTimeout)
Interpret runtimeexception to search for livelink API errors.protected void
ingestFromLiveLink(LivelinkConnector.LivelinkContext llc, java.lang.String documentIdentifier, java.lang.String version, java.lang.String[] actualAcls, java.lang.String[] denyAcls, java.lang.String[] categoryPaths, org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities, LivelinkConnector.MetadataDescription desc, LivelinkConnector.SystemMetadataDescription sDesc)
Connects to the specified Livelink document using HTTP protocolboolean
isConnected()
This method is called to assess whether to count this connector instance should actually be counted as being connected.protected java.lang.String[]
lookupTokens(int[] rights, LivelinkConnector.ObjectInformation objInfo)
Build a set of actual acls given a set of rightsvoid
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.protected static java.lang.String
packCategoryAttribute(java.lang.String category, java.lang.String attribute)
Pack category and attributevoid
poll()
This method is periodically called for all connectors that are connected but not in active use.protected static boolean
processCheck(boolean caseSensitive, java.lang.String sourceMatch, int sourceIndex, java.lang.String match, int matchIndex)
Recursive worker method for checkMatch.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.boolean
requestInfo(org.apache.manifoldcf.core.interfaces.Configuration output, java.lang.String command)
Request arbitrary connector information.protected static void
unpackCategoryAttribute(java.lang.StringBuilder category, java.lang.StringBuilder attribute, java.lang.String value)
Unpack category and attributevoid
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
-
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
-
GENERAL_NAME_FIELD
protected static final java.lang.String GENERAL_NAME_FIELD
- See Also:
- Constant Field Values
-
GENERAL_DESCRIPTION_FIELD
protected static final java.lang.String GENERAL_DESCRIPTION_FIELD
- See Also:
- Constant Field Values
-
GENERAL_CREATIONDATE_FIELD
protected static final java.lang.String GENERAL_CREATIONDATE_FIELD
- See Also:
- Constant Field Values
-
GENERAL_MODIFYDATE_FIELD
protected static final java.lang.String GENERAL_MODIFYDATE_FIELD
- See Also:
- Constant Field Values
-
GENERAL_OWNER
protected static final java.lang.String GENERAL_OWNER
- See Also:
- Constant Field Values
-
GENERAL_CREATOR
protected static final java.lang.String GENERAL_CREATOR
- See Also:
- Constant Field Values
-
GENERAL_MODIFIER
protected static final java.lang.String GENERAL_MODIFIER
- See Also:
- Constant Field Values
-
GENERAL_PARENTID
protected static final java.lang.String GENERAL_PARENTID
- See Also:
- Constant Field Values
-
CATEGORY_NAME
protected static final java.lang.String CATEGORY_NAME
- See Also:
- Constant Field Values
-
ENTWKSPACE_NAME
protected static final java.lang.String ENTWKSPACE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConnectorModel
public int getConnectorModel()
Tell the world what model this connector uses for getDocumentIdentifiers(). This must return a model value as specified above.- Specified by:
getConnectorModel
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
getConnectorModel
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
- Returns:
- the model type value.
-
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.
-
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.
-
getHost
protected org.apache.http.HttpHost getHost()
-
getSessionParameters
protected void getSessionParameters() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getSession
protected void getSession() 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
-
executeMethodViaThread
protected static int executeMethodViaThread(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpRequestBase executeMethod) throws java.lang.InterruptedException, org.apache.http.HttpException, java.io.IOException
- Throws:
java.lang.InterruptedException
org.apache.http.HttpException
java.io.IOException
-
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
-
poll
public void poll() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
This method is periodically called for all connectors that are connected but not in active use.- Specified by:
poll
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
poll
in 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:
isConnected
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
isConnected
in 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.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
-
getActivitiesList
public java.lang.String[] getActivitiesList()
List the activities we might report on.- Specified by:
getActivitiesList
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
getActivitiesList
in classorg.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector
-
convertToIngestURI
protected java.lang.String convertToIngestURI(java.lang.String documentIdentifier) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Convert a document identifier to a relative URI to read data from. This is not the search URI; that's constructed by a different method.- Parameters:
documentIdentifier
- is the document identifier.- Returns:
- the relative document uri.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
convertToViewURI
protected java.lang.String convertToViewURI(java.lang.String documentIdentifier) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Convert a document identifier to a URI to view. 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. It must therefore be a unique way of describing the document.- Parameters:
documentIdentifier
- is the document identifier.- Returns:
- the document uri.
- 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.ManifoldCFException
Request 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:
requestInfo
in interfaceorg.apache.manifoldcf.crawler.interfaces.IRepositoryConnector
- Overrides:
requestInfo
in 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
-
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
-
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".
-
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
-
fillInServerTab
protected static void fillInServerTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Fill in Server tab
-
fillInDocumentAccessTab
protected static void fillInDocumentAccessTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Fill in Document Access tab
-
fillInDocumentViewTab
protected static void fillInDocumentViewTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Fill in Document View tab
-
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
-
fillInPathsTab
protected static void fillInPathsTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in paths tab
-
fillInTransientPathsInfo
protected void fillInTransientPathsInfo(java.util.Map<java.lang.String,java.lang.Object> velocityContext, int connectionSequenceNumber)
Fill in the transient portion of the Paths tab
-
fillInFiltersTab
protected static void fillInFiltersTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in filters tab
-
fillInSecurityTab
protected static void fillInSecurityTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in security tab
-
fillInMetadataTab
protected static void fillInMetadataTab(java.util.Map<java.lang.String,java.lang.Object> velocityContext, org.apache.manifoldcf.core.interfaces.IHTTPOutput out, org.apache.manifoldcf.core.interfaces.Specification ds)
Fill in Metadata tab
-
fillInTransientMetadataInfo
protected void fillInTransientMetadataInfo(java.util.Map<java.lang.String,java.lang.Object> velocityContext, int connectionSequenceNumber)
Fill in the transient portion of the Metadata tab
-
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
-
getWorkspaceNames
public java.lang.String[] getWorkspaceNames() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get the allowed workspace names.- Returns:
- a list of workspace names.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getChildFolderNames
public java.lang.String[] getChildFolderNames(java.lang.String pathString) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Given a path string, get a list of folders and projects under that node.- Parameters:
pathString
- is the current path (folder names and project names, separated by dots (.)).- Returns:
- a list of folder and project names, in sorted order, or null if the path was invalid.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getChildCategoryNames
public java.lang.String[] getChildCategoryNames(java.lang.String pathString) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Given a path string, get a list of categories under that node.- Parameters:
pathString
- is the current path (folder names and project names, separated by dots (.)).- Returns:
- a list of category names, in sorted order, or null if the path was invalid.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getCategoryAttributes
public java.lang.String[] getCategoryAttributes(java.lang.String pathString) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Given a category path, get a list of legal attribute names.- Parameters:
pathString
- is the current path of a category (with path components separated by dots).- Returns:
- a list of attribute names, in sorted order, or null of the path was invalid.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getCategoryAttributes
protected java.lang.String[] getCategoryAttributes(LivelinkConnector.LivelinkContext llc, java.lang.String pathString) 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
-
createLivelinkLoginURI
protected java.lang.String createLivelinkLoginURI() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Create the login URI. This must be a relative URI.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
ingestFromLiveLink
protected void ingestFromLiveLink(LivelinkConnector.LivelinkContext llc, java.lang.String documentIdentifier, java.lang.String version, java.lang.String[] actualAcls, java.lang.String[] denyAcls, java.lang.String[] categoryPaths, org.apache.manifoldcf.crawler.interfaces.IProcessActivity activities, LivelinkConnector.MetadataDescription desc, LivelinkConnector.SystemMetadataDescription sDesc) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Connects to the specified Livelink document using HTTP protocol- Parameters:
documentIdentifier
- is the document identifier (as far as the crawler knows).activities
- is the process activity structure, so we can ingest- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
handleHttpException
protected static void handleHttpException(java.lang.String contextMsg, org.apache.http.HttpException 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
-
handleIOException
protected static void handleIOException(java.lang.String contextMsg, 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
-
getInitializedClient
protected org.apache.http.client.HttpClient getInitializedClient(java.lang.String contextMsg) throws org.apache.manifoldcf.agents.interfaces.ServiceInterruption, org.apache.manifoldcf.core.interfaces.ManifoldCFException
Initialize a livelink client connection- Throws:
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
packCategoryAttribute
protected static java.lang.String packCategoryAttribute(java.lang.String category, java.lang.String attribute)
Pack category and attribute
-
unpackCategoryAttribute
protected static void unpackCategoryAttribute(java.lang.StringBuilder category, java.lang.StringBuilder attribute, java.lang.String value)
Unpack category and attribute
-
getChildFolders
protected java.lang.String[] getChildFolders(LivelinkConnector.LivelinkContext llc, java.lang.String pathString) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Given a path string, get a list of folders and projects under that node.- Parameters:
pathString
- is the current path (folder names and project names, separated by dots (.)).- Returns:
- a list of folder and project names, in sorted order, or null if the path was invalid.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getChildCategories
protected java.lang.String[] getChildCategories(LivelinkConnector.LivelinkContext llc, java.lang.String pathString) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Given a path string, get a list of categories under that node.- Parameters:
pathString
- is the current path (folder names and project names, separated by dots (.)).- Returns:
- a list of category names, in sorted order, or null if the path was invalid.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getCategoryAttributes
protected java.lang.String[] getCategoryAttributes(int catObjectID) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Given a category path, get a list of legal attribute names.- Parameters:
catObjectID
- is the object id of the category.- Returns:
- a list of attribute names, in sorted order, or null of the path was invalid.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getCatVersion
protected com.opentext.api.LLValue getCatVersion(int objID, int catID) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get a category version for document.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getAttributeValue
protected java.lang.String[] getAttributeValue(com.opentext.api.LLValue categoryVersion, java.lang.String attributeName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get an attribute value from a category version.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getObjectRights
protected int[] getObjectRights(int vol, int objID) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get an object's rights. This will be an array of right id's, including the special ones defined by Livelink, or null will be returned (if the object is not found).- Parameters:
vol
- is the volume idobjID
- is the object id- Returns:
- the array.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
lookupTokens
protected java.lang.String[] lookupTokens(int[] rights, LivelinkConnector.ObjectInformation objInfo) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Build a set of actual acls given a set of rights- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getObjectCategoryIDs
protected int[] getObjectCategoryIDs(int vol, int id) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Get category IDs associated with an object.- Parameters:
vol
- is the volume IDid
- the object ID- Returns:
- an array of integers containing category identifiers, or null if the object is not found.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getPathId
protected LivelinkConnector.VolumeAndId getPathId(LivelinkConnector.RootValue rv) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
RootValue version of getPathId.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getCategoryId
protected int getCategoryId(LivelinkConnector.RootValue rv) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Rootvalue version of getCategoryId.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
checkInclude
protected static boolean checkInclude(java.lang.String filename, org.apache.manifoldcf.core.interfaces.Specification documentSpecification) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Check if a file or directory should be included, given a document specification.- Parameters:
filename
- is the name of the "file".documentSpecification
- is the specification.- Returns:
- true if it should be included.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
checkIngest
protected boolean checkIngest(LivelinkConnector.LivelinkContext llc, int objID, org.apache.manifoldcf.core.interfaces.Specification documentSpecification) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Check if a file should be ingested, given a document specification. It is presumed that documents that pass checkInclude() will be checked with this method.- Parameters:
objID
- is the file ID.documentSpecification
- is the specification.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
checkMatch
protected static boolean checkMatch(java.lang.String sourceMatch, int sourceIndex, java.lang.String match)
Check a match between two strings with wildcards.- Parameters:
sourceMatch
- is the expanded string (no wildcards)sourceIndex
- is the starting point in the expanded string.match
- is the wildcard-based string.- Returns:
- true if there is a match.
-
processCheck
protected static boolean processCheck(boolean caseSensitive, java.lang.String sourceMatch, int sourceIndex, java.lang.String match, int matchIndex)
Recursive worker method for checkMatch. Returns 'true' if there is a path that consumes both strings in their entirety in a matched way.- Parameters:
caseSensitive
- is true if file names are case sensitive.sourceMatch
- is the source string (w/o wildcards)sourceIndex
- is the current point in the source string.match
- is the match string (w/wildcards)matchIndex
- is the current point in the match string.- Returns:
- true if there is a match.
-
handleLivelinkRuntimeException
protected int handleLivelinkRuntimeException(java.lang.RuntimeException e, int sanityRetryCount, boolean failIfTimeout) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Interpret runtimeexception to search for livelink API errors. Throws an appropriately reinterpreted exception, or just returns if the exception indicates that a short-cycle retry attempt should be made. (In that case, the appropriate wait has been already performed).- Parameters:
e
- is the RuntimeException caughtfailIfTimeout
- is true if, for transient conditions, we want to signal failure if the timeout condition is acheived.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
assessRetry
protected static int assessRetry(int sanityRetryCount, org.apache.manifoldcf.core.interfaces.ManifoldCFException e) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Do a retry, or throw an exception if the retry count has been exhausted- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
-