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,org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension,org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
public class BasicFolderConnector
extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase
implements BasicFileStore
BasicFolderConnector works with files to retrieve simple objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClose the fileReturn the creation date for the file.getFile()Return the Java File object that provides access to the file.longReturn 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.voidinitialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionDetails connectionDetails) Initialize the connector.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, start, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
BasicFolderConnector
public BasicFolderConnector()
-
-
Method Details
-
initialize
public void initialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionDetails connectionDetails) Initialize the connector.- Overrides:
initializein classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Parameters:
connectorInstanceId- - unique id for the connector instance - useful for messages etcconnectionDetails- - POJO for the configuration used to create the connector.
-
getFileName
Return the name of the file to read.- Specified by:
getFileNamein interfaceBasicFileStore- Returns:
- file name
- Throws:
FileException- problem accessing the file
-
getFileLength
Return the number of bytes in the file- Specified by:
getFileLengthin interfaceBasicFileStore- Returns:
- number
- Throws:
FileException- unable to locate the file
-
getCreationDate
Return the creation date for the file.- Specified by:
getCreationDatein 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:
getLastUpdateDatein 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:
getLastAccessDatein 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:
getFilein interfaceBasicFileStore- Returns:
- File object
- Throws:
FileException- problem accessing the file
-
disconnect
public void disconnect()Close the file- Overrides:
disconnectin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase
-