Class BasicFileStoreConnector

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFileStoreConnector
All Implemented Interfaces:
BasicFileStore, org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension

public class BasicFileStoreConnector extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase implements BasicFileStore
BasicFileStoreConnector works with files to retrieve simple objects.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the file
    Return the creation date for the file.
    Return the Java File object that provides access to the file.
    long
    Return the number of bytes in the file
    Return 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, 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, toString

    Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector

    clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BasicFileStoreConnector

      public BasicFileStoreConnector()
  • Method Details

    • initialize

      public void initialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionDetails connectionDetails)
      Initialize the connector.
      Overrides:
      initialize in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Parameters:
      connectorInstanceId - - unique id for the connector instance - useful for messages etc
      connectionDetails - - POJO for the configuration used to create the connector.
    • getFileName

      public String getFileName() throws FileException
      Return the name of the file to read.
      Specified by:
      getFileName in interface BasicFileStore
      Returns:
      file name
      Throws:
      FileException - problem accessing the file
    • getFileLength

      public long getFileLength() throws FileException
      Return the number of bytes in the file
      Specified by:
      getFileLength in interface BasicFileStore
      Returns:
      number
      Throws:
      FileException - unable to locate the file
    • getCreationDate

      public Date getCreationDate() throws FileException, FileReadException
      Return the creation date for the file.
      Specified by:
      getCreationDate in interface BasicFileStore
      Returns:
      Date object
      Throws:
      FileException - problem accessing the file
      FileReadException - - the file name is null, the file does not exist, or is a directory or is not readable.
    • getLastUpdateDate

      public Date getLastUpdateDate() throws FileException, FileReadException
      Return the last update date for the file.
      Specified by:
      getLastUpdateDate in interface BasicFileStore
      Returns:
      Date object
      Throws:
      FileException - problem accessing the file
      FileReadException - - the file name is null, the file does not exist, or is a directory or is not readable.
    • getLastAccessDate

      public Date getLastAccessDate() throws FileException, FileReadException
      Return the last accessed date for the file.
      Specified by:
      getLastAccessDate in interface BasicFileStore
      Returns:
      Date object
      Throws:
      FileException - problem accessing the file
      FileReadException - - the file name is null, the file does not exist, or is a directory or is not readable.
    • getFile

      public File getFile() throws FileException
      Return the Java File object that provides access to the file.
      Specified by:
      getFile in interface BasicFileStore
      Returns:
      File object
      Throws:
      FileException - problem accessing the file
    • disconnect

      public void disconnect()
      Close the file
      Overrides:
      disconnect in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase