public class XMLConnector extends com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey> implements UniqueIndexGenerator
com.exalead.papi.connectors.filesystem.FilesystemConnector.NullFilter
GenericMultiThreadedConnector.EnumeratesFolderDeletionHelperClient
Connector.ConnectorNameThreadFactory
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.atomic.AtomicLong |
chunkIndex |
protected XMLConnectorConfig |
config |
protected PushAPI |
papi |
protected ProcessorBuilder<XMLFilesystemKey> |
processorBuilder |
protected boolean |
shouldSplitDocuments |
protected java.lang.String |
uuidValue |
defaultEncoding, enableSecurity, filenameFilter, filesystemRootPaths, FORCE_RESCAN_CHECKPOINT_BEGIN, FORCE_RESCAN_CHECKPOINT_END, indexNames, keepLocalSecurityMetas, maxInputSize, mimeConfig, MODE_CONSUME_INTERCONNECTOR, MODE_FORCE_RESCAN, recursive, skipDirectorySymbolicLinks
m_HandleContainer
addDocumentOperationBuilderForFirstAdd, addDocumentOperationBuilderForNotModified, addDocumentOperationBuilderForUpdate, DEFAULT_LAST_UPDATE_CHECKPOINT_BEGIN, DEFAULT_LAST_UPDATE_CHECKPOINT_END, deletedDocumentOperationBuilder, doDelete, enumeratedPipelinesManager, isUpdate, last_update_checkpoint_begin, last_update_checkpoint_end, neverSendDeletes, processingQuota, pushFolder, sourceAdapterManager, sourceEnumerator, startKeys, syncEnumeratedError, synchronizerCallbackContainer, threadFactory
DEFAULT_SCAN_MODE
Constructor and Description |
---|
XMLConnector(XMLConnectorConfig config) |
Modifier and Type | Method and Description |
---|---|
protected EnumerableOperationBuilder<XMLFilesystemKey> |
buildAddDocumentOperationBuilderForFirstSync() |
protected EnumerableOperationBuilder<XMLFilesystemKey> |
buildAddDocumentOperationBuilderForUpdate()
Get AddDocumentOperationBuilder
|
XMLContainerRecursiveProcessor |
buildContainerRecursiveProcessor()
Build the ContainerRecursiveProcessor responsible for handling
containers.
|
FolderDeletionHelper |
buildDeletionHelper(FolderDeletionHelper.FolderDeletionHelperClient client,
java.lang.String rootPathUri)
Returns this connector's deletion helper implementation provided this connector is in update mode
|
XMLFilesystemSourceAdapter |
buildSourceAdapter()
This method return a SourceAdapter implementation
|
XMLFilesystemSourceEnumerator |
buildSourceEnumerator()
This method return a SourceEnumerator implementation
|
protected XMLFilesystemKey |
buildStartKeyFromConf(java.lang.String configKey,
boolean isFolder)
seems to work without this method but i'd prefer not mixing XMLFilesystemKeys and plain FilesystemKeys
|
Document |
fetch(java.lang.String uri)
This method is used to retrieve document from the source when CloudView
product needs it.
|
Document |
fetch(java.lang.String dirtyUri,
java.lang.String[] securityTokens,
boolean checkSecurityTokens)
Fetch function.
|
XMLFilesystemKey |
getKeyFromUri(java.lang.String uri) |
java.lang.String |
getNextChunkIndex() |
ProcessorBuilder<XMLFilesystemKey> |
getProcessorBuilder() |
java.lang.String |
getUuid() |
void |
init()
Initialization method called by connector framework after construction
|
callBeforeDestruction, checkConfig, checkDataSourceAvailability, compileFileExtensionsPattern, consumeInterConnectorEvents, createFileFromRootPath, getConfFromKey, getConnectorConfig, getConnectorMetas, getInterconnectorService, isFSSecurityAvailable, scan, scratch
addRootKeyInPipelineManager
addDocumentOperationToEnumeratedOperationPipeline, addFolderOperationToEnumeratedOperationPipeline, addSynchronizerCallback, buildDeletedDocumentOperationBuilder, buildSpecializedSourceAdapters, getActionToUpdate, getCurrentPAPI, getDefaultThreadFactory, getDocumentSecurityTokens, getNbThreadsPerEnumeratedDocumentOperationPipeline, getNbThreadsPerEnumeratedFolderOperationPipeline, handleRootDeletes, initializePipelinesManager, isdoDelete, isPushFolder, isSynchronizeSourceEnumeratorsError, isUpdate, processActionToUpdate, registerDocInProgress, registerWorkInProgress, removeSynchronizerCallback, setCurrentPAPI, setNbThreadsPerEnumeratedDocumentOperationPipeline, setNbThreadsPerEnumeratedFolderOperationPipeline, setNbThreadsPerEnumeratedOperationPipeline, setSynchronizeSourceEnumeratorsError, terminateThreads
checkAbortingOperation, checkAbortingOperation, checkSecurityTokens, getConnectorName, getEndpointBuilder, getLogger, getLogger, getScanModes, getState, getState, getStatus, getStatus, getStatusException, init, onScanAborted, onScanAborted, onScanResumed, onScanResumed, onScanSuspended, onScanSuspended, selfAbortScan, selfAbortScan, synchronizeDocuments
protected final java.util.concurrent.atomic.AtomicLong chunkIndex
protected final java.lang.String uuidValue
protected XMLConnectorConfig config
protected boolean shouldSplitDocuments
protected ProcessorBuilder<XMLFilesystemKey> processorBuilder
protected PushAPI papi
public XMLConnector(XMLConnectorConfig config) throws java.lang.Exception
java.lang.Exception
public void init() throws java.lang.Exception
Connector
init
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
java.lang.Exception
public XMLFilesystemKey getKeyFromUri(java.lang.String uri) throws java.io.IOException
getKeyFromUri
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
java.io.IOException
protected XMLFilesystemKey buildStartKeyFromConf(java.lang.String configKey, boolean isFolder) throws java.lang.Exception
buildStartKeyFromConf
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
java.lang.Exception
public Document fetch(java.lang.String uri) throws java.lang.Exception
Connector
fetch
in class GenericMultiThreadedConnector<XMLFilesystemKey>
uri
- document identifier to retrievejava.lang.Exception
public Document fetch(java.lang.String dirtyUri, java.lang.String[] securityTokens, boolean checkSecurityTokens) throws java.lang.Exception
GenericContainerMultiThreadedConnector
fetch
in class GenericContainerMultiThreadedConnector<XMLFilesystemKey>
dirtyUri
- document identifier to retrievesecurityTokens
- Security tokens of the user querying the documentcheckSecurityTokens
- If true, then the connector must send
the document according to the security tokens given in parameters. For example the
connector must return null if the user does not have credentials enough to view it,
or only send the partial content the user is allowed to access.java.lang.Exception
- upon error.public XMLFilesystemSourceEnumerator buildSourceEnumerator() throws java.lang.Exception
GenericMultiThreadedConnector
buildSourceEnumerator
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
java.lang.Exception
public XMLFilesystemSourceAdapter buildSourceAdapter() throws java.lang.Exception
GenericMultiThreadedConnector
buildSourceAdapter
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
java.lang.Exception
public FolderDeletionHelper buildDeletionHelper(FolderDeletionHelper.FolderDeletionHelperClient client, java.lang.String rootPathUri) throws PushAPIException
GenericMultiThreadedConnector
buildDeletionHelper
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
client
- handles the actual deletes of the documents.rootPathUri
- the folder root keyGenericMultiThreadedConnector.isUpdate()
nullPushAPIException
protected EnumerableOperationBuilder<XMLFilesystemKey> buildAddDocumentOperationBuilderForUpdate()
GenericContainerMultiThreadedConnector
buildAddDocumentOperationBuilderForUpdate
in class GenericContainerMultiThreadedConnector<XMLFilesystemKey>
protected EnumerableOperationBuilder<XMLFilesystemKey> buildAddDocumentOperationBuilderForFirstSync()
public XMLContainerRecursiveProcessor buildContainerRecursiveProcessor()
GenericContainerMultiThreadedConnector
buildContainerRecursiveProcessor
in class com.exalead.papi.connectors.filesystem.FilesystemConnector<XMLFilesystemKey>
public ProcessorBuilder<XMLFilesystemKey> getProcessorBuilder()
public java.lang.String getUuid()
getUuid
in interface UniqueIndexGenerator
public java.lang.String getNextChunkIndex()
getNextChunkIndex
in interface UniqueIndexGenerator
Copyright © 2013 Dassault Systèmes, All Rights Reserved.