Class BasicFolderConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFolderConnector
- All Implemented Interfaces:
BasicFileStore
,SecureConnectorExtension
,VirtualConnectorExtension
- Direct Known Subclasses:
DataFolderConnector
BasicFolderConnector works with files to retrieve simple objects.
-
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.connectors.ConnectorBase
auditLog, connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the fileReturn the creation date for the file.getFile()
Return the Java File object that provides access to the file.protected File
Return the Java File object that provides access to the file.long
Return the number of bytes in the fileReturn the name of the file to read.Return the last accessed date for the file.Return the last update date for the file.void
initialize
(String connectorInstanceId, ConnectionProperties connectionProperties) Initialize the connector.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, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, start, 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
-
Field Details
-
folderName
-
-
Constructor Details
-
BasicFolderConnector
public BasicFolderConnector()
-
-
Method Details
-
initialize
Initialize the connector.- Overrides:
initialize
in classConnectorBase
- Parameters:
connectorInstanceId
- - unique id for the connector instance - useful for messages etcconnectionProperties
- - POJO for the configuration used to create the connector.
-
getFileName
Return the name of the file to read.- Specified by:
getFileName
in interfaceBasicFileStore
- Returns:
- file name
- Throws:
FileException
- problem accessing the file
-
getFileLength
Return the number of bytes in the file- Specified by:
getFileLength
in interfaceBasicFileStore
- Returns:
- number
- Throws:
FileException
- unable to locate the file
-
getCreationDate
Return the creation date for the file.- Specified by:
getCreationDate
in interfaceBasicFileStore
- Returns:
- Date object
- Throws:
FileException
- problem accessing the fileFileReadException
- - the file name is null, the file does not exist, or is a directory or is not readable.
-
getLastUpdateDate
Return the last update date for the file.- Specified by:
getLastUpdateDate
in interfaceBasicFileStore
- Returns:
- Date object
- Throws:
FileException
- problem accessing the fileFileReadException
- - the file name is null, the file does not exist, or is a directory or is not readable.
-
getLastAccessDate
Return the last accessed date for the file.- Specified by:
getLastAccessDate
in interfaceBasicFileStore
- Returns:
- Date object
- Throws:
FileException
- problem accessing the fileFileReadException
- - the file name is null, the file does not exist, or is a directory or is not readable.
-
getFile
Return the Java File object that provides access to the file.- Specified by:
getFile
in interfaceBasicFileStore
- Returns:
- File object
- Throws:
FileException
- problem accessing the file
-
getFile
Return the Java File object that provides access to the file.- Parameters:
methodName
- , calling method- Returns:
- File object
- Throws:
FileException
- problem accessing the file
-
disconnect
public void disconnect()Close the file- Overrides:
disconnect
in classConnectorBase
-