Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the content of connector types (#7103) #7106

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

mandy-chessell
Copy link
Contributor

Signed-off-by: Mandy Chessell [email protected]

Description

This PR improves the information captures in a connector provider's connector type:

  • The ConnectorProviderBase creates a connector type if it does not exist and fills it out with essential details. It adds the language, implemented interfaces and the connector framework to any connector type it has that has ommitted these details.
  • The different types of connector now have a marker interface that identifies which service they run under in Egeria.

Here is an example of a connector type from an integration connector:

Connector Type: Data Files Monitor Integration Connector
    qualifiedName: Egeria:IntegrationConnector:Files:DataFilesMonitor
    description: Connector supports cataloguing of files under a specific directory (folder) in the file system.
    connectorProviderClassName: org.odpi.openmetadata.adapters.connectors.integration.basicfiles.DataFilesMonitorIntegrationProvider
    recognizedConfigurationProperties:
        templateQualifiedName
        allowCatalogDelete
    connectorInterfaceLanguage: Java
    connectorFrameworkName: Open Connector Framework (OCF)
    connectorInterfaces:
        org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
        org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
        org.odpi.openmetadata.governanceservers.integrationdaemonservices.connectors.IntegrationConnector
        org.odpi.openmetadata.integrationservices.files.connector.FilesIntegratorOMISConnector

Notice the new marker interface FilesIntegratorOMISConnector.

Here is an example from a governance action service:

Connector Type: Move or Copy File Governance Action Service
    qualifiedName: Egeria:GeneralGovernanceActionService:Provisioning:MoveCopyFile
    description: Provisioning Governance Action Service that moves or copies files on request.
    connectorProviderClassName: org.odpi.openmetadata.adapters.connectors.governanceactions.provisioning.MoveCopyFileGovernanceActionProvider
    recognizedConfigurationProperties:
        targetFileNamePattern
        noLineage
        topLevelProcessQualifiedName
        topLevelProcessTemplateQualifiedName
        destinationFileTemplateQualifiedName
        destinationFolder
        topLevelProcessLineageOnly
        lineageFromSourceFolderOnly
        lineageToDestinationFolderOnly
    connectorInterfaceLanguage: Java
    connectorFrameworkName: Open Connector Framework (OCF)
    connectorInterfaces:
        org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
        org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
        org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionService

Notice marker interface GovernanceActionService.

Finally, I uncovered a bug in the templating - the new entity was unsing the caller type information, not that from the template entity - this meant that it was being created with a more generic type and some of the properties from the template could be invalid.

Related Issue(s)

#7103

Testing

Using the new Governance Server Lab.

Release Notes & Documentation

No more than needed for the original feature

Additional notes

@@ -122,7 +122,7 @@
this.governanceContext = context;
this.governanceActionService = service;

if (governanceActionServiceConnector instanceof GovernanceActionService)
if (governanceActionServiceConnector instanceof GeneralGovernanceActionService)

Check notice

Code scanning / CodeQL

Chain of 'instanceof' tests

This if block performs a chain of 6 type tests - consider alternatives, e.g. polymorphism or the visitor pattern.
@mandy-chessell mandy-chessell merged commit fd77a62 into odpi:main Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant