Class SurveyActionServiceConnector

java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.surveyaction.SurveyActionServiceConnector
All Implemented Interfaces:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension, SurveyActionService
Direct Known Subclasses:
SurveyActionPipelineConnector

public abstract class SurveyActionServiceConnector extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase implements SurveyActionService, org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
SurveyActionServiceConnector describes a specific type of connector that is responsible for analyzing the content of a specific asset. Information about the asset to analyze is passed in the survey context. The returned discovery context also contains the results. Some discovery services manage the invocation of other discovery services. These discovery services are called discovery pipelines.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Free up any resources held since the connector is no longer needed.
    org.odpi.openmetadata.frameworks.auditlog.ComponentDescription
    Return the component description that is used by this connector in the audit log.
    Convert the supplied properties object to a JSON String.
    void
    initializeEmbeddedConnectors(List<org.odpi.openmetadata.frameworks.connectors.Connector> embeddedConnectors)
    Set up the list of survey action services connectors that will be invoked as part of this survey action pipeline.
    void
    logWrongTypeOfConnector(String actualConnectorClass, String expectedConnectorClass, String assetGUID, String methodName)
    Log audit message and throw exception to indicate that the asset's connector is wrong.
    void
    setAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Receive an audit log object that can be used to record audit log messages.
    void
    setSurveyActionServiceName(String surveyActionServiceName)
    Set up the survey action service name.
    void
    Set up details of the asset to analyze and the results of any previous analysis.
    void
    Indicates that the survey action service is completely configured and can begin processing.
    void
    throwWrongTypeOfConnector(String actualConnectorClass, String expectedConnectorClass, String assetGUID, String methodName)
    Log audit message and throw exception to indicate that the asset's connector is wrong.

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

    equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, initializeSecretsStoreConnector, isActive, 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

    • SurveyActionServiceConnector

      public SurveyActionServiceConnector()
  • Method Details

    • setAuditLog

      public void setAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
      Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.
      Specified by:
      setAuditLog in interface org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
      Parameters:
      auditLog - audit log object
    • getConnectorComponentDescription

      public org.odpi.openmetadata.frameworks.auditlog.ComponentDescription getConnectorComponentDescription()
      Return the component description that is used by this connector in the audit log.
      Specified by:
      getConnectorComponentDescription in interface org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
      Returns:
      id, name, description, wiki page URL.
    • initializeEmbeddedConnectors

      public void initializeEmbeddedConnectors(List<org.odpi.openmetadata.frameworks.connectors.Connector> embeddedConnectors)
      Set up the list of survey action services connectors that will be invoked as part of this survey action pipeline. The connectors are initialized waiting to start. After start() is called on the survey action pipeline, it will choreograph the invocation of its embedded survey action services by calling start() to each of them when they are to run. Similar processing is needed for the disconnect() method.
      Specified by:
      initializeEmbeddedConnectors in interface org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
      Parameters:
      embeddedConnectors - list of embedded connectors that are hopefully survey action services
    • getJSONProperties

      public String getJSONProperties(Object properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Convert the supplied properties object to a JSON String.
      Parameters:
      properties - properties object
      Returns:
      properties as a JSON String
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - parsing error
    • setSurveyContext

      public void setSurveyContext(SurveyContext surveyContext)
      Set up details of the asset to analyze and the results of any previous analysis.
      Parameters:
      surveyContext - information about the asset to analyze and the results of analysis of other survey action service request. Partial results from other survey action services run as part of the same survey action service request may also be stored in the newAnnotations list.
    • setSurveyActionServiceName

      public void setSurveyActionServiceName(String surveyActionServiceName)
      Set up the survey action service name. This is used in error messages.
      Parameters:
      surveyActionServiceName - name of the survey action service
    • throwWrongTypeOfConnector

      public void throwWrongTypeOfConnector(String actualConnectorClass, String expectedConnectorClass, String assetGUID, String methodName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Log audit message and throw exception to indicate that the asset's connector is wrong.
      Parameters:
      actualConnectorClass - class name of the supplied connector
      expectedConnectorClass - class name expected for the connector
      assetGUID - unique identifier for the asset
      methodName - calling method
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - requested exception
    • logWrongTypeOfConnector

      public void logWrongTypeOfConnector(String actualConnectorClass, String expectedConnectorClass, String assetGUID, String methodName)
      Log audit message and throw exception to indicate that the asset's connector is wrong.
      Parameters:
      actualConnectorClass - class name of the supplied connector
      expectedConnectorClass - class name expected for the connector
      assetGUID - unique identifier for the asset
      methodName - calling method
    • start

      public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Indicates that the survey action service is completely configured and can begin processing. This is where the function of the survey action service is implemented. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() in your version.
      Overrides:
      start in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the survey action service.
    • disconnect

      public void disconnect() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Free up any resources held since the connector is no longer needed.
      Overrides:
      disconnect in class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the connector.