Class BasicFilesMonitorIntegrationConnectorBase
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorBase
org.odpi.openmetadata.integrationservices.files.connector.FilesIntegratorConnector
org.odpi.openmetadata.adapters.connectors.integration.basicfiles.BasicFilesMonitorIntegrationConnectorBase
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,IntegrationConnector
,FilesIntegratorOMISConnector
- Direct Known Subclasses:
DataFilesMonitorIntegrationConnector
,DataFolderMonitorIntegrationConnector
BasicFilesMonitorIntegrationConnectorBase provides common methods for the connectors in this module.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorBase
auditLog, catalogTargetsManager, connectorName, integrationContext, propertyHelper
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
archiveFileInCatalog
(File file, DataFileElement retrievedElement, boolean allowCatalogDelete, String methodName) The file no longer exists so this method updates the metadata catalog.protected abstract DirectoryToMonitor
createDirectoryToMonitor
(String sourceName, String pathName, String catalogTargetGUID, DeleteMethod deleteMethod, Map<String, String> templates, Map<String, Object> configurationProperties) Creates a monitor for the target.void
Shutdown file monitoringvoid
start()
Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.integrationservices.files.connector.FilesIntegratorConnector
getContext, setContext
Methods inherited from class org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorBase
engage, getConnectorComponentDescription, getNetworkAddress, refreshCatalogTargets, registerCatalogTargetChangeListener, setAuditLog, setConnectorName, setContext
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector
refresh
Methods inherited from interface org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
initializeEmbeddedConnectors
-
Constructor Details
-
BasicFilesMonitorIntegrationConnectorBase
public BasicFilesMonitorIntegrationConnectorBase()
-
-
Method Details
-
start
Indicates that the connector is completely configured and can begin processing. It extracts all the useful configuration from the connection object.- Specified by:
start
in interfaceIntegrationConnector
- Overrides:
start
in classIntegrationConnectorBase
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-
createDirectoryToMonitor
protected abstract DirectoryToMonitor createDirectoryToMonitor(String sourceName, String pathName, String catalogTargetGUID, DeleteMethod deleteMethod, Map<String, String> templates, Map<String, throws ConnectorCheckedExceptionObject> configurationProperties) Creates a monitor for the target.- Parameters:
sourceName
- source of the pathnamepathName
- pathname to the directorycatalogTargetGUID
- optional catalog target GUIDdeleteMethod
- should the connector use delete or archive?templates
- names and GUIDs of templatesconfigurationProperties
- parameters to further modify the behaviour of the connector.- Returns:
- directory to monitor structure
- Throws:
ConnectorCheckedException
- connector problem
-
archiveFileInCatalog
public void archiveFileInCatalog(File file, DataFileElement retrievedElement, boolean allowCatalogDelete, String methodName) The file no longer exists so this method updates the metadata catalog. This may be a call to delete() or an archive action depending on the setting of the allowCatalogDelete configuration property.- Parameters:
file
- Java file access objectretrievedElement
- catalogued elementmethodName
- calling method
-
disconnect
Shutdown file monitoring- Specified by:
disconnect
in interfaceIntegrationConnector
- Overrides:
disconnect
in classIntegrationConnectorBase
- Throws:
ConnectorCheckedException
- something failed in the super class
-