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.adapters.connectors.integration.basicfiles.BasicFilesMonitorIntegrationConnectorBase
- All Implemented Interfaces:
AuditLoggingComponent,SecureConnectorExtension,VirtualConnectorExtension,IntegrationConnector
- 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, propertyHelperFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DirectoryToMonitorcreateDirectoryToMonitor(String sourceName, String pathName, String catalogTargetGUID, DeleteMethod deleteMethod, Map<String, String> templates, Map<String, Object> configurationProperties) Creates a monitor for the target.voiddeleteFileInCatalog(File file, OpenMetadataRootElement retrievedElement, String methodName) The file no longer exists so this method updates the metadata catalog.voidShutdown file monitoringvoidstart()Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorBase
engage, getConnectorComponentDescription, getNetworkAddress, passEventToCatalogTargets, refreshCatalogTargets, registerCatalogTargetChangeListener, setAuditLog, setConnectorName, setContextMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestampMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector
refreshMethods 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:
startin interfaceIntegrationConnector- Overrides:
startin classIntegrationConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.UserNotAuthorizedException- the connector was disconnected before/during start
-
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
-
deleteFileInCatalog
public void deleteFileInCatalog(File file, OpenMetadataRootElement retrievedElement, 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:
disconnectin interfaceIntegrationConnector- Overrides:
disconnectin classIntegrationConnectorBase- Throws:
ConnectorCheckedException- something failed in the super class
-