Class DirectoryToMonitor
java.lang.Object
org.odpi.openmetadata.adapters.connectors.integration.basicfiles.DirectoryToMonitor
- All Implemented Interfaces:
FileDirectoryListenerInterface,FileListenerInterface
- Direct Known Subclasses:
DataFilesMonitorForTarget,DataFolderMonitorForTarget
Directory to monitor caches information about a specific directory that is at the root of the monitoring.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanPolicy for deletingprotected final AuditLogprotected Stringprotected booleanShould only file types that are recognized by the classifier be catalogued.protected final StringThis is the unique identifier of the CatalogTarget relationship that this directory matches.protected final Stringprotected Stringprotected FileThis is the Java File object that is accessing the directory.protected StringWhat is the short name for this directory?protected StringDefault values for the file system name and mount point.protected final FileSystemPropertiesprotected Stringprotected StringTemplate for creating incident reportsprotected final BasicFilesMonitorIntegrationConnectorBaseprotected booleanThis boolean indicates that the connector is registered to listen for changes in the directory.protected Stringprotected Stringprotected Stringprotected Stringprotected final PropertyHelperprotected StringWhere did information about this directory come from?Templates for cataloguing files and foldersprotected Stringprotected StringTemplate for creating todosprotected booleanDoes the physical directory have to exist or will it wait? -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryToMonitor(String connectorName, String sourceName, String pathName, String catalogTargetGUID, String dataFolderGUID, DeleteMethod deleteMethod, Map<String, String> templates, FileSystemProperties fileSystemProperties, Map<String, Object> configurationProperties, BasicFilesMonitorIntegrationConnectorBase integrationConnector, AuditLog auditLog) Construct the monitor for a specific catalog target. -
Method Summary
Modifier and TypeMethodDescriptionprotected OpenMetadataRootElementReturn the data folder element for this directory.abstract voidrefresh()Requests that the connector does a comparison of the metadata in the third party technology and open metadata repositories.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.odpi.openmetadata.frameworks.openmetadata.filelistener.FileDirectoryListenerInterface
onDirectoryChange, onDirectoryCreate, onDirectoryDeleteMethods inherited from interface org.odpi.openmetadata.frameworks.openmetadata.filelistener.FileListenerInterface
onFileChange, onFileCreate, onFileDelete
-
Field Details
-
propertyHelper
-
auditLog
-
integrationConnector
-
connectorName
-
sourceName
Where did information about this directory come from? -
directoryName
What is the short name for this directory? -
fileSystemName
Default values for the file system name and mount point. -
localMountPoint
-
canonicalMountPoint
-
directoryFile
This is the Java File object that is accessing the directory. -
isListening
protected boolean isListeningThis boolean indicates that the connector is registered to listen for changes in the directory. -
catalogTargetGUID
This is the unique identifier of the CatalogTarget relationship that this directory matches. Null means the value was supplied in the endpoint. -
dataFolderGUID
-
fileSystemProperties
-
configurationProperties
-
templates
Templates for cataloguing files and folders -
toDoTemplateQualifiedName
Template for creating todos -
toDoTemplateGUID
-
incidentReportTemplateQualifiedName
Template for creating incident reports -
incidentReportTemplateGUID
-
newFileProcessName
-
allowCatalogDelete
protected boolean allowCatalogDeletePolicy for deleting -
waitForDirectory
protected boolean waitForDirectoryDoes the physical directory have to exist or will it wait? -
catalogClassifiedFiles
protected boolean catalogClassifiedFilesShould only file types that are recognized by the classifier be catalogued. -
metadataSourceGUID
-
metadataSourceName
-
-
Constructor Details
-
DirectoryToMonitor
public DirectoryToMonitor(String connectorName, String sourceName, String pathName, String catalogTargetGUID, String dataFolderGUID, DeleteMethod deleteMethod, Map<String, String> templates, FileSystemProperties fileSystemProperties, Map<String, Object> configurationProperties, BasicFilesMonitorIntegrationConnectorBase integrationConnector, AuditLog auditLog) Construct the monitor for a specific catalog target.- Parameters:
connectorName- name of associated connectorsourceName- source of the pathnamepathName- pathname to the directorycatalogTargetGUID- optional catalog target GUIDdataFolderGUID- optional GUID of the data folder elementdeleteMethod- should the connector use delete or archive?templates- names and GUIDs of templatesfileSystemProperties- properties of the file systemconfigurationProperties- parameters to further modify the behaviour of the connectorintegrationConnector- associated connectorauditLog- logging destination
-
-
Method Details
-
getDataFolderElement
Return the data folder element for this directory.- Returns:
- root element for the data folder
- Throws:
ConnectorCheckedException- problem accessing information
-
refresh
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- a problem with the connector. It is not able to refresh the metadata.
-