java.lang.Object
org.odpi.openmetadata.adapters.connectors.integration.basicfiles.DirectoryToMonitor
All Implemented Interfaces:
FileDirectoryListenerInterface, FileListenerInterface
Direct Known Subclasses:
DataFilesMonitorForTarget, DataFolderMonitorForTarget

public abstract class DirectoryToMonitor extends Object implements FileDirectoryListenerInterface
Directory to monitor caches information about a specific directory that is at the root of the monitoring.
  • Field Details

    • propertyHelper

      protected final PropertyHelper propertyHelper
    • auditLog

      protected final AuditLog auditLog
    • integrationConnector

      protected final BasicFilesMonitorIntegrationConnectorBase integrationConnector
    • connectorName

      protected final String connectorName
    • sourceName

      protected String sourceName
      Where did information about this directory come from?
    • directoryName

      protected String directoryName
      What is the short name for this directory?
    • dataFolderElement

      protected FileFolderElement dataFolderElement
      This is the folder element describing this directory from the open metadata ecosystem.
    • directoryFile

      protected File directoryFile
      This is the Java File object that is accessing the directory.
    • isListening

      protected boolean isListening
      This boolean indicates that the connector is registered to listen for changes in the directory.
    • catalogTargetGUID

      protected String catalogTargetGUID
      This is the unique identifier of the CatalogTarget relationship that this directory matches. Null means the value was supplied in the endpoint.
    • fileTemplateQualifiedName

      protected String fileTemplateQualifiedName
      Template for cataloguing files
    • fileTemplateGUID

      protected String fileTemplateGUID
    • directoryTemplateQualifiedName

      protected String directoryTemplateQualifiedName
      Template for cataloguing directories
    • directoryTemplateGUID

      protected String directoryTemplateGUID
    • toDoTemplateQualifiedName

      protected String toDoTemplateQualifiedName
      Template for creating todos
    • toDoTemplateGUID

      protected String toDoTemplateGUID
    • incidentReportTemplateQualifiedName

      protected String incidentReportTemplateQualifiedName
      Template for creating incident reports
    • incidentReportTemplateGUID

      protected String incidentReportTemplateGUID
    • newFileProcessName

      protected String newFileProcessName
    • allowCatalogDelete

      protected boolean allowCatalogDelete
      Policy for deleting
    • waitForDirectory

      protected boolean waitForDirectory
      Does the physical directory have to exist or will it wait?
    • catalogClassifiedFiles

      protected boolean catalogClassifiedFiles
      Should only file types that are recognized by the classifier be catalogued.
    • configurationProperties

      protected final Map<String,Object> configurationProperties
    • metadataSourceGUID

      protected String metadataSourceGUID
    • metadataSourceName

      protected String metadataSourceName
  • Constructor Details

    • DirectoryToMonitor

      public DirectoryToMonitor(String connectorName, String sourceName, String pathName, String catalogTargetGUID, DeleteMethod deleteMethod, Map<String,String> templates, Map<String,Object> configurationProperties, BasicFilesMonitorIntegrationConnectorBase integrationConnector, FileFolderElement dataFolderElement, AuditLog auditLog)
      Construct the monitor for a specific catalog target.
      Parameters:
      connectorName - name of associated connector
      sourceName - source of the pathname
      pathName - pathname to the directory
      catalogTargetGUID - optional catalog target GUID
      deleteMethod - should the connector use delete or archive?
      templates - names and GUIDs of templates
      configurationProperties - parameters to further modify the behaviour of the connector
      integrationConnector - associated connector
      dataFolderElement - Egeria element for this directory
      auditLog - logging destination
  • Method Details

    • refresh

      public abstract void refresh() throws ConnectorCheckedException
      Requests that the connector does a comparison of the metadata in the third party technology and open metadata repositories. Refresh is called when the integration connector first starts and then at intervals defined in the connector's configuration as well as any external REST API calls to explicitly refresh the connector.
      Throws:
      ConnectorCheckedException - there is a problem with the connector. It is not able to refresh the metadata.