From 0ef1b2fa8445e0514d37e3de33683ddcc78c0a57 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Thu, 3 Jun 2021 15:16:31 +0100 Subject: [PATCH 01/10] #458 removal of gaian/ranger/derby/virtualization connectors/services Signed-off-by: Nigel Jones --- .azure-pipelines/docker.yml | 65 -- CODEOWNERS | 1 - THIRD_PARTY.md | 2 - build.gradle | 4 - developer-resources/Developer-Guidelines.md | 3 - .../src/main/assemblies/egeria-omag.xml | 4 - .../open-metadata-caller-package/pom.xml | 4 - .../access-services/docs/user/README.md | 1 - .../information-view/README.md | 26 - .../information-view/docs/design/README.md | 16 - .../information-view/docs/scenarios/README.md | 47 -- .../docs/scenarios/ReportDiagramExample.png | Bin 103308 -> 0 bytes .../docs/scenarios/lookup-data-view.md | 13 - .../scenarios/lookup-registration-tool.md | 13 - .../docs/scenarios/register-external-tool.md | 15 - .../docs/scenarios/semantic-assignment.md | 12 - .../docs/scenarios/submit-data-view.md | 16 - .../docs/scenarios/submit-report-metadata.md | 18 - .../information-view/docs/user/README.md | 25 - .../docs/user/java-events/README.md | 33 - .../user/java-events/semantic-assignment.json | 22 - .../user/java-events/table-full-context.json | 144 ---- .../java-events/updated-entity-event.json | 289 -------- .../information-view-api/build.gradle | 17 - .../information-view-api/pom.xml | 50 -- .../informationview/events/BusinessTerm.java | 176 ----- .../informationview/events/DataView.java | 141 ---- .../events/DataViewColumn.java | 97 --- .../events/DataViewColumnSource.java | 61 -- .../events/DataViewElement.java | 99 --- .../informationview/events/DataViewModel.java | 37 - .../events/DataViewRequestBody.java | 68 -- .../events/DataViewSource.java | 58 -- .../events/DatabaseColumnSource.java | 55 -- .../events/DatabaseSource.java | 46 -- .../events/DeployedReport.java | 249 ------- .../informationview/events/DerivedColumn.java | 51 -- .../events/EndpointSource.java | 97 --- .../informationview/events/ForeignKey.java | 65 -- .../events/GlossaryCategory.java | 43 -- .../events/InformationViewHeader.java | 48 -- .../informationview/events/Paging.java | 52 -- .../events/RegistrationRequestBody.java | 39 - .../informationview/events/ReportColumn.java | 66 -- .../events/ReportColumnSource.java | 47 -- .../informationview/events/ReportElement.java | 46 -- .../events/ReportRequestBody.java | 61 -- .../informationview/events/ReportSection.java | 36 - .../events/ReportSectionSource.java | 46 -- .../informationview/events/ReportSource.java | 48 -- .../events/SemanticAssignment.java | 47 -- .../SoftwareServerCapabilitySource.java | 90 --- .../informationview/events/Source.java | 82 --- .../informationview/events/TableColumn.java | 236 ------ .../events/TableContextEvent.java | 62 -- .../informationview/events/TableSource.java | 56 -- .../events/UpdatedEntityEvent.java | 71 -- .../runtime/AddEntityException.java | 15 - .../runtime/AddRelationshipException.java | 15 - .../runtime/ContextLoadException.java | 20 - .../runtime/DataViewCreationException.java | 36 - .../runtime/DeleteEntityException.java | 19 - .../runtime/DeleteRelationshipException.java | 19 - .../runtime/EntityNotFoundException.java | 20 - .../runtime/IllegalUpdateException.java | 14 - .../runtime/IncorrectModelException.java | 20 - .../runtime/IncorrectTypeException.java | 20 - .../runtime/InformationViewExceptionBase.java | 92 --- .../runtime/MultipleEntitiesMatching.java | 19 - .../runtime/NoMatchingEntityException.java | 19 - .../NoRegistrationDetailsProvided.java | 15 - .../runtime/PropertyServerException.java | 26 - .../runtime/RegistrationException.java | 19 - .../ReportElementCreationException.java | 20 - .../runtime/ReportSubmitException.java | 22 - .../runtime/RetrieveEntityException.java | 20 - .../RetrieveRelationshipException.java | 19 - .../runtime/SourceNotFoundException.java | 15 - .../responses/DataViewResponse.java | 25 - .../responses/DatabaseListResponse.java | 27 - .../responses/GuidResponse.java | 23 - .../InformationViewOMASAPIResponse.java | 98 --- .../responses/RegistrationResponse.java | 25 - .../responses/ReportResponse.java | 25 - .../responses/TableColumnsResponse.java | 29 - .../responses/TableContextResponse.java | 27 - .../responses/TableListResponse.java | 29 - .../responses/VoidResponse.java | 31 - .../information-view-client/README.md | 13 - .../information-view-client/build.gradle | 11 - .../information-view-client/pom.xml | 34 - .../information-view-server/README.md | 17 - .../information-view-server/build.gradle | 38 - .../docs/user/lookup-data-view.md | 28 - .../docs/user/lookup-registration.md | 35 - .../docs/user/register-tool.md | 34 - .../docs/user/retrieve-database-tables.md | 37 - .../docs/user/retrieve-databases.md | 100 --- .../docs/user/retrieve-table-columns.md | 94 --- .../docs/user/retrieve-table-context.md | 156 ---- .../docs/user/submit-data-view.md | 85 --- .../docs/user/submit-report.md | 268 ------- .../information-view-server/pom.xml | 120 --- .../admin/InformationViewAdmin.java | 324 -------- .../assets/DatabaseContextHandler.java | 113 --- .../auditlog/InformationViewAuditCode.java | 135 ---- .../contentmanager/OMEntityDao.java | 605 --------------- .../contentmanager/OMEntityWrapper.java | 43 -- .../context/ColumnContextBuilder.java | 694 ------------------ .../context/ContextBuilder.java | 128 ---- .../context/ContextBuilders.java | 66 -- .../context/DataViewContextBuilder.java | 130 ---- .../context/ReportContextBuilder.java | 123 ---- .../eventprocessor/EventPublisher.java | 544 -------------- .../ffdc/ExceptionHandler.java | 175 ----- .../ffdc/InformationViewErrorCode.java | 191 ----- .../InformationViewCheckedExceptionBase.java | 81 -- .../exceptions/InvalidEventException.java | 28 - .../exceptions/PublishEventException.java | 11 - ...mationViewEnterpriseOmrsEventListener.java | 157 ---- .../informationview/lookup/ColumnLookup.java | 76 -- .../lookup/DataViewLookup.java | 45 -- .../lookup/DatabaseLookup.java | 73 -- .../lookup/DatabaseSchemaLookup.java | 58 -- .../lookup/EndpointLookup.java | 61 -- .../informationview/lookup/EntityLookup.java | 148 ---- .../lookup/LookupBasedOnDataView.java | 46 -- .../lookup/LookupBasedOnDatabaseColumn.java | 37 - .../lookup/LookupBasedOnReportColumn.java | 56 -- .../informationview/lookup/LookupHelper.java | 51 -- .../lookup/LookupStrategy.java | 11 - .../informationview/lookup/ReportLookup.java | 52 -- .../SoftwareServerCapabilityLookup.java | 51 -- .../informationview/lookup/TableLookup.java | 75 -- .../registration/RegistrationHandler.java | 123 ---- .../reports/BasicOperation.java | 372 ---------- .../reports/DataViewBasicOperation.java | 145 ---- .../reports/DataViewCreator.java | 60 -- .../reports/DataViewHandler.java | 87 --- .../reports/DataViewUpdater.java | 25 - .../reports/EntityReferenceResolver.java | 85 --- .../reports/ReportBasicOperation.java | 172 ----- .../reports/ReportCreator.java | 61 -- .../reports/ReportHandler.java | 94 --- .../reports/ReportUpdater.java | 324 -------- .../InformationViewInstanceHandler.java | 144 ---- .../InformationViewOMASRegistration.java | 24 - .../server/InformationViewRestServices.java | 291 -------- .../InformationViewServicesInstance.java | 68 -- .../InformationViewServicesInstanceMap.java | 76 -- .../informationview/utils/Constants.java | 95 --- .../utils/EntityPropertiesBuilder.java | 67 -- .../utils/EntityPropertiesUtils.java | 95 --- .../utils/QualifiedNameUtils.java | 51 -- .../ColumnContextBuilderTest.java | 148 ---- .../DatabaseContextHandlerTest.java | 64 -- .../InMemoryRepositoryTest.java | 327 --------- .../informationview/ReportCreationTest.java | 166 ----- .../informationview/TestDataHelper.java | 392 ---------- .../src/test/resources/logback-test.xml | 22 - .../src/test/resources/report1.json | 77 -- .../src/test/resources/test.json | 35 - .../information-view-spring/build.gradle | 22 - .../information-view-spring/pom.xml | 65 -- .../spring/InformationViewOMASResource.java | 211 ------ .../access-services/information-view/pom.xml | 41 -- .../access-services/pom.xml | 1 - .../adapters/authentication-plugins/README.md | 3 - .../gaian-impersonation/README.md | 35 - .../gaian-impersonation/build.gradle | 16 - .../gaian-impersonation/pom.xml | 67 -- .../ProxyUserAuthenticator.java | 92 --- .../adapters/authentication-plugins/pom.xml | 1 - .../governance-engines-plugins/README.md | 3 - .../gaian-ranger-plugin/README.md | 289 -------- .../gaian-ranger-plugin/SQLBehaviour.md | 138 ---- .../gaian-ranger-plugin/build.gradle | 22 - .../gaian-ranger-plugin/pom.xml | 168 ----- .../gaianrangerplugin/ApplyMasking.java | 98 --- .../gaianrangerplugin/Constants.java | 23 - .../GaianAuthorizationException.java | 19 - .../gaianrangerplugin/GaianAuthorizer.java | 14 - .../gaianrangerplugin/GaianResourceType.java | 10 - .../gaianrangerplugin/QueryContext.java | 109 --- .../RangerGaianAuthorizer.java | 234 ------ .../RangerGaianResource.java | 66 -- .../RangerPolicyResultFilter.java | 438 ----------- .../RangerServerProperties.java | 25 - .../gaianrangerplugin/RangerServiceGaian.java | 22 - .../gaianrangerplugin/RangerUser.java | 112 --- .../src/main/resources/conf/log4J.properties | 11 - .../resources/conf/ranger-gaian-audit.xml | 304 -------- .../resources/conf/ranger-gaian-security.xml | 100 --- .../resources/conf/ranger-policymgr-ssl.xml | 35 - .../main/resources/resourcenamemap.properties | 27 - .../service-defs/ranger-servicedef-gaian.json | 209 ------ .../governance-engines-plugins/pom.xml | 1 - .../connector-configuration-factory/pom.xml | 1 - .../data-store-connectors/README.md | 3 - .../gaian-connector/README.md | 19 - .../gaian-connector/build.gradle | 23 - .../gaian-connector/pom.xml | 57 -- .../database/OCFDatabaseConnector.java | 179 ----- .../OCFDatabaseConnectorProviderBase.java | 23 - .../ffdc/OCFDatabaseConnectorErrorCode.java | 175 ----- .../database/gaian/GaianOCFConnector.java | 270 ------- .../gaian/GaianOCFConnectorProvider.java | 32 - .../database/ffdc/ErrorCodeTest.java | 135 ---- .../database/gaian/GaianOCFConnectorTest.java | 42 -- .../data-store-connectors/pom.xml | 1 - .../governance-daemon-connectors/README.md | 7 +- .../governance-daemon-connectors/pom.xml | 2 - .../security-sync-connectors/README.md | 17 - .../security-sync-connectors/pom.xml | 37 - .../ranger-connector/build.gradle | 21 - .../ranger-connector/pom.xml | 65 -- .../RangerSecurityServiceConnector.java | 561 -------------- ...angerSecurityServiceConnectorProvider.java | 32 - .../SecurityServiceConnector.java | 33 - ...ngerSecurityServiceConnectorAuditCode.java | 90 --- .../model/RangerBaseObject.java | 66 -- .../model/RangerDataMaskPolicyItem.java | 16 - .../rangerconnector/model/RangerPolicy.java | 163 ---- .../model/RangerPolicyItem.java | 54 -- .../model/RangerPolicyItemAccess.java | 25 - .../model/RangerPolicyItemCondition.java | 27 - .../model/RangerPolicyItemDataMaskInfo.java | 34 - .../model/RangerPolicyItemRowFilterInfo.java | 16 - .../model/RangerPolicyResource.java | 52 -- .../model/RangerRowFilterPolicyItem.java | 16 - .../model/RangerSecurityServicePolicies.java | 73 -- .../model/RangerServiceDef.java | 72 -- .../model/RangerServiceResource.java | 42 -- .../rangerconnector/model/RangerTag.java | 80 -- .../rangerconnector/model/RangerTagDef.java | 33 - .../model/ResourceTagMapper.java | 53 -- .../rangerconnector/util/Constants.java | 32 - .../view-generator-connectors/README.md | 18 - .../view-generator-connectors/build.gradle | 22 - .../view-generator-connectors/pom.xml | 68 -- .../derby/ViewGeneratorDerbyConnector.java | 445 ----------- .../ViewGeneratorDerbyConnectorProvider.java | 31 - .../auditlog/DerbyViewConnectorAuditCode.java | 127 ---- .../properties/AdminServicesConfigHeader.java | 2 - .../properties/OMAGServerConfig.java | 55 +- .../properties/SecuritySyncConfig.java | 397 ---------- .../properties/VirtualizationConfig.java | 200 ----- .../AccessServiceDescription.java | 6 - .../GovernanceServicesDescription.java | 5 - .../classifier/ServerTypeClassifier.java | 16 - .../user/configuring-the-access-services.md | 6 - .../governance-servers/docs/README.md | 1 - .../governance-servers/pom.xml | 1 - .../security-officer-services/README.md | 16 - .../security-officer-services/pom.xml | 34 - .../build.gradle | 24 - .../security-officer-services-server/pom.xml | 82 --- .../auditlog/SecurityOfficerAuditCode.java | 113 --- .../ffdc/SecurityOfficerErrorCode.java | 108 --- .../SecurityOfficerEventListener.java | 44 -- .../SecurityOfficerEventProcessor.java | 120 --- .../SecurityOfficerOperationalServices.java | 159 ---- .../security-sync-services-server/README.md | 14 - .../build.gradle | 25 - .../security-sync-services-server/pom.xml | 85 --- .../auditlog/SecuritySyncAuditCode.java | 145 ---- .../ffdc/SecuritySyncErrorCode.java | 108 --- .../listener/SecuritySyncEventListener.java | 49 -- .../processor/SecuritySyncEventProcessor.java | 241 ------ .../SecuritySyncOperationalServices.java | 158 ---- .../virtualization-services/README.md | 97 --- .../virtualization-services/pom.xml | 34 - .../virtualization-services-api/build.gradle | 21 - .../virtualization-services-api/pom.xml | 70 -- .../event/VirtualizerTopicListener.java | 227 ------ .../ffdc/VirtualizationErrorCode.java | 108 --- .../ViewGenerationInterface.java | 22 - .../ViewGeneratorConnectorBase.java | 41 -- .../ViewGeneratorConnectorProvider.java | 13 - .../viewgenerator/model/LogicTable.java | 89 --- .../viewgenerator/model/MappedColumn.java | 46 -- .../viewgenerator/utils/ConnectorUtils.java | 82 --- .../build.gradle | 24 - .../virtualization-services-server/pom.xml | 70 -- .../VirtualizationOperationalServices.java | 287 -------- .../auditlog/VirtualizationAuditCode.java | 130 ---- .../server-chassis-spring/build.gradle | 1 - .../server-chassis-spring/pom.xml | 12 - .../website/connector-catalog/README.md | 9 - .../information-view-EMPSALANALYSIS.json | 504 ------------- .../website/open-metadata-glossary.md | 1 - .../docker/apache-atlas/Dockerfile | 39 - .../docker/apache-atlas/README.md | 26 - .../docker/apache-atlas/pom.xml | 98 --- .../docker/apache-ranger-admin/Dockerfile | 38 - .../docker/apache-ranger-admin/pom.xml | 98 --- .../build-images/apache/atlas/Dockerfile | 30 - .../apache/atlas/dist/settings.xml | 26 - .../docker/build-images/apache/atlas/pom.xml | 97 --- .../docker/build-images/apache/pom.xml | 37 - .../build-images/apache/ranger/Dockerfile | 43 -- .../apache/ranger/dist/ranger-admin-start.sh | 25 - .../apache/ranger/dist/settings.xml | 26 - .../docker/build-images/apache/ranger/pom.xml | 98 --- .../docker/build-images/pom.xml | 36 - .../docker/gaian/Dockerfile | 23 - .../docker/gaian/README.md | 30 - .../docker/gaian/pom.xml | 86 --- .../open-metadata-deployment/docker/pom.xml | 8 +- pom.xml | 172 ----- settings.gradle | 30 - 311 files changed, 3 insertions(+), 24873 deletions(-) delete mode 100644 .azure-pipelines/docker.yml delete mode 100644 open-metadata-implementation/access-services/information-view/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/design/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/ReportDiagramExample.png delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-data-view.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-registration-tool.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/register-external-tool.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/semantic-assignment.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/submit-data-view.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/scenarios/submit-report-metadata.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/user/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/user/java-events/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/docs/user/java-events/semantic-assignment.json delete mode 100644 open-metadata-implementation/access-services/information-view/docs/user/java-events/table-full-context.json delete mode 100644 open-metadata-implementation/access-services/information-view/docs/user/java-events/updated-entity-event.json delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/build.gradle delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/pom.xml delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/BusinessTerm.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataView.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumn.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumnSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewElement.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewModel.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewRequestBody.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseColumnSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DeployedReport.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DerivedColumn.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/EndpointSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ForeignKey.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/GlossaryCategory.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/InformationViewHeader.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Paging.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/RegistrationRequestBody.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumn.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumnSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportElement.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportRequestBody.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSection.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSectionSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SemanticAssignment.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SoftwareServerCapabilitySource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Source.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableColumn.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableContextEvent.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableSource.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/UpdatedEntityEvent.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddEntityException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddRelationshipException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ContextLoadException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DataViewCreationException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteEntityException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteRelationshipException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/EntityNotFoundException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IllegalUpdateException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectModelException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectTypeException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/InformationViewExceptionBase.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/MultipleEntitiesMatching.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoMatchingEntityException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoRegistrationDetailsProvided.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/PropertyServerException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RegistrationException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportElementCreationException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportSubmitException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveEntityException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveRelationshipException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/SourceNotFoundException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DataViewResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DatabaseListResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/GuidResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/InformationViewOMASAPIResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/RegistrationResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/ReportResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableColumnsResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableContextResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableListResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/VoidResponse.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-client/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-client/build.gradle delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-client/pom.xml delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/README.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/build.gradle delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-data-view.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-registration.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/register-tool.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-database-tables.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-databases.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-columns.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-context.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-data-view.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-report.md delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/pom.xml delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/admin/InformationViewAdmin.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/assets/DatabaseContextHandler.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/auditlog/InformationViewAuditCode.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityDao.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityWrapper.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ColumnContextBuilder.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilder.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilders.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/DataViewContextBuilder.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ReportContextBuilder.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/eventprocessor/EventPublisher.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/ExceptionHandler.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/InformationViewErrorCode.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InformationViewCheckedExceptionBase.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InvalidEventException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/PublishEventException.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/listeners/InformationViewEnterpriseOmrsEventListener.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ColumnLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DataViewLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseSchemaLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EndpointLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EntityLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDataView.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDatabaseColumn.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnReportColumn.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupHelper.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupStrategy.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ReportLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/SoftwareServerCapabilityLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/TableLookup.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/registration/RegistrationHandler.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/BasicOperation.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewBasicOperation.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewCreator.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewHandler.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewUpdater.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/EntityReferenceResolver.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportBasicOperation.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportCreator.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportHandler.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportUpdater.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewInstanceHandler.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewOMASRegistration.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewRestServices.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstance.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstanceMap.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/Constants.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesBuilder.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesUtils.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/QualifiedNameUtils.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ColumnContextBuilderTest.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/DatabaseContextHandlerTest.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/InMemoryRepositoryTest.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ReportCreationTest.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/TestDataHelper.java delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/logback-test.xml delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/report1.json delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/test.json delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-spring/build.gradle delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-spring/pom.xml delete mode 100644 open-metadata-implementation/access-services/information-view/information-view-spring/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/spring/InformationViewOMASResource.java delete mode 100644 open-metadata-implementation/access-services/information-view/pom.xml delete mode 100644 open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/README.md delete mode 100644 open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/build.gradle delete mode 100644 open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/pom.xml delete mode 100644 open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/src/main/java/org/odpi/openmetadata/adapters/authenticationplugins/gaianimpersonation/ProxyUserAuthenticator.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/README.md delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/SQLBehaviour.md delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/build.gradle delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/pom.xml delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/ApplyMasking.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/Constants.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizationException.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizer.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianResourceType.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/QueryContext.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianAuthorizer.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianResource.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerPolicyResultFilter.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServerProperties.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServiceGaian.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerUser.java delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/log4J.properties delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-audit.xml delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-security.xml delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-policymgr-ssl.xml delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/resourcenamemap.properties delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/service-defs/ranger-servicedef-gaian.json delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/README.md delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/build.gradle delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/pom.xml delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnector.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnectorProviderBase.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/OCFDatabaseConnectorErrorCode.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnector.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorProvider.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/ErrorCodeTest.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorTest.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/README.md delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/pom.xml delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/build.gradle delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/pom.xml delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnector.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnectorProvider.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/SecurityServiceConnector.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/auditlog/RangerSecurityServiceConnectorAuditCode.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerBaseObject.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerDataMaskPolicyItem.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicy.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItem.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemAccess.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemCondition.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemDataMaskInfo.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemRowFilterInfo.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyResource.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerRowFilterPolicyItem.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerSecurityServicePolicies.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceDef.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceResource.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTag.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTagDef.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/ResourceTagMapper.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/util/Constants.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/README.md delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/build.gradle delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/pom.xml delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnector.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnectorProvider.java delete mode 100644 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/auditlog/DerbyViewConnectorAuditCode.java delete mode 100644 open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/SecuritySyncConfig.java delete mode 100644 open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/VirtualizationConfig.java delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/README.md delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/build.gradle delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/auditlog/SecurityOfficerAuditCode.java delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/ffdc/SecurityOfficerErrorCode.java delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/listener/SecurityOfficerEventListener.java delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/processor/SecurityOfficerEventProcessor.java delete mode 100644 open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/registration/SecurityOfficerOperationalServices.java delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/README.md delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/build.gradle delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/auditlog/SecuritySyncAuditCode.java delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/ffdc/SecuritySyncErrorCode.java delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/listener/SecuritySyncEventListener.java delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/processor/SecuritySyncEventProcessor.java delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/registration/SecuritySyncOperationalServices.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/README.md delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/build.gradle delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/event/VirtualizerTopicListener.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/ffdc/VirtualizationErrorCode.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGenerationInterface.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorBase.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorProvider.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/LogicTable.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/MappedColumn.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/utils/ConnectorUtils.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/build.gradle delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/admin/VirtualizationOperationalServices.java delete mode 100644 open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/auditlog/VirtualizationAuditCode.java delete mode 100644 open-metadata-publication/website/java-events/information-view-EMPSALANALYSIS.json delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/apache-atlas/Dockerfile delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/apache-atlas/README.md delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/apache-atlas/pom.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/Dockerfile delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/pom.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/Dockerfile delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/dist/settings.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/pom.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/pom.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/Dockerfile delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/ranger-admin-start.sh delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/settings.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/pom.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/build-images/pom.xml delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/gaian/Dockerfile delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/gaian/README.md delete mode 100644 open-metadata-resources/open-metadata-deployment/docker/gaian/pom.xml diff --git a/.azure-pipelines/docker.yml b/.azure-pipelines/docker.yml deleted file mode 100644 index 866b4fda6d4..00000000000 --- a/.azure-pipelines/docker.yml +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the ODPi Egeria project. ---- -trigger: - paths: - include: - - open-metadata-resources/open-metadata-deployment/docker - branches: - include: - - master -pr: none -schedules: - - cron: "11 0 * * *" - displayName: Daily Docker Build for extended images - always: true - branches: - include: - - master - -variables: - - group: Artifactory - -stages: - - stage: Docker - jobs: - - job: Maven - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - apache-atlas: - POM_FILE: 'open-metadata-resources/open-metadata-deployment/docker/apache-atlas/pom.xml' - egeria-gaian: - POM_FILE: 'open-metadata-resources/open-metadata-deployment/docker/gaian/pom.xml' - egeria-ranger: - POM_FILE: 'open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/pom.xml' - steps: - # TODO: Not sure if this is really needed... - - script: mkdir -p ${HOME}/.docker - - task: DownloadSecureFile@1 - name: dockerConfig - inputs: - secureFile: odpi-docker.json - - script: mv $(dockerConfig.secureFilePath) ${HOME}/.docker/config.json - - task: Docker@2 - displayName: Login to Docker Hub - inputs: - command: login - containerRegistry: odpi-dockerhub - - task: Maven@3 - inputs: - mavenPomFile: $(POM_FILE) - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.8' - jdkArchitectureOption: 'x64' - goals: 'clean install' - options: >- - --batch-mode - -e - -Ddocker - -Ddocker.taglatest - -Ddocker.repo=odpi - -Ddocker.registry=docker.io - -Ddocker.images=ext - -Ddockerfile.googleContainerRegistryEnabled=false diff --git a/CODEOWNERS b/CODEOWNERS index 26a241169f4..bb7f8aaabbd 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -34,7 +34,6 @@ open-metadata-implementation/access-services/asset-lineage/ @DimitriosMaimaris @ open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/ @planetf1 open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-encrypted-file-store-connector/ @cmgrote open-metadata-implementation/adapters/governance-engines-plugins/ @planetf1 -open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/ @planetf1 open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/open-lineage-connectors/ @DimitriosMaimaris open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/open-lineage-connectors/open-lineage-janus-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/openlineageconnectors/janusconnector/maingraph/ @GuyAckermans @lcpopa diff --git a/THIRD_PARTY.md b/THIRD_PARTY.md index f6f147c18f7..51eb206d47c 100644 --- a/THIRD_PARTY.md +++ b/THIRD_PARTY.md @@ -20,7 +20,6 @@ for each one. - [hadoop-common](https://github.com/apache/hadoop-common) licensed under [Apache License 2.0](https://search.maven.org/artifact/org.apache.hadoop/hadoop-common/3.2.1/jar) - [Apache Kafka](https://github.com/apache/kafka) clients licensed under [Apache License 2.0](https://github.com/apache/kafka/blob/trunk/LICENSE) - [Apache Lucene](https://github.com/apache/lucene-solr) licensed under [Apache License 2.0](https://search.maven.org/artifact/org.apache.lucene/lucene-analyzers-common/8.2.0/jar) -- [Apache Ranger](https://github.com/apache/ranger) plugins licensed under [Apache License 2.0](https://github.com/apache/ranger/blob/master/LICENSE.txt) - [Apache Tinkerpop](https://github.com/apache/tinkerpop) gremlin-core, tinkergraph-gremlin licensed under [Apache License 2.0](https://github.com/apache/tinkerpop/blob/master/LICENSE) - [Apache Tomcat](https://github.com/apache/tomcat) tomcat-embed-core licensed under [Apache License 2.0](https://github.com/apache/tomcat/blob/master/LICENSE) - [DataStax Java Driver for Apache Cassandra](https://github.com/datastax/java-driver) licensed under [Apache License 2.0](https://github.com/datastax/java-driver/blob/4.x/LICENSE) @@ -28,7 +27,6 @@ for each one. - [jackson-core](https://github.com/FasterXML/jackson-core) licensed under [Apache License 2.0](https://github.com/FasterXML/jackson-core/blob/master/LICENSE) - [jackson-annotations](https://github.com/FasterXML/jackson-annotations) licensed under [Apache License 2.0](https://github.com/FasterXML/jackson-annotations/blob/master/LICENSE) - [jackson-databind](https://github.com/FasterXML/jackson-databind) licensed under [Apache License 2.0](https://github.com/FasterXML/jackson-databind/blob/master/LICENSE) -- [gaian](https://github.com/gaiandb/gaiandb) licensed under [Eclipse Public License 1.0](https://github.com/gaiandb/gaiandb/blob/master/LICENSE/LICENSE) - [Google Guava](https://github.com/google/guava) licensed under [Apache License 2.0](https://github.com/google/guava/blob/master/COPYING) - [Google Tink](https://github.com/google/tink) licensed under [Apache License 2.0](https://github.com/google/tink/blob/master/LICENSE) - [h2](https://h2database.com) licensed under [Eclipse Public License 1.0](https://h2database.com/html/license.html) diff --git a/build.gradle b/build.gradle index 3fb60457493..f2afba65077 100644 --- a/build.gradle +++ b/build.gradle @@ -95,7 +95,6 @@ allprojects { dependencies { constraints { - //implementation("com.ibm.gaiandb:gaian":"") implementation("ch.qos.logback:logback-classic:${logbackVersion}") implementation("ch.qos.logback:logback-core:${logbackVersion}") implementation("com.datastax.oss:java-driver-core:4.11.1") @@ -135,8 +134,6 @@ allprojects { implementation("org.apache.avro:avro:1.10.2") implementation("org.apache.commons:commons-collections4:4.4") implementation("org.apache.commons:commons-lang3:3.12.0") - implementation("org.apache.derby:derby:10.8.3.1") - implementation("org.apache.hadoop:hadoop-common:2.9.2") implementation("org.apache.httpcomponents:httpclient:4.5.13") implementation("org.apache.httpcomponents:httpcore:4.4.14") implementation("org.apache.jena:jena-core:3.17.0") @@ -146,7 +143,6 @@ allprojects { implementation("org.apache.lucene:lucene-queryparser:${luceneVersion}") implementation("org.apache.lucene:lucene-spatial:8.4.1") implementation("org.apache.lucene:lucene-spatial-extras:${luceneVersion}") - implementation("org.apache.ranger:ranger-plugins-common:1.2.0") implementation("org.apache.tinkerpop:tinkergraph-gremlin:${gremlinVersion}") implementation("org.apache.tinkerpop:gremlin-driver:${gremlinVersion}") implementation("org.apache.tinkerpop:gremlin-core:${gremlinVersion}") diff --git a/developer-resources/Developer-Guidelines.md b/developer-resources/Developer-Guidelines.md index c574f2734f4..a5dfb6a22c2 100644 --- a/developer-resources/Developer-Guidelines.md +++ b/developer-resources/Developer-Guidelines.md @@ -216,9 +216,6 @@ Many of our team use [JetBrains IntelliJ](tools/IntelliJ.md). In the case of problems the first problem determination step is to check you can build Egeria normally at the command line ie `mvn clean install` from the source root. That will prove at least java, maven are correct . -In addition, importantly, this also will retrieve additional dependencies which are not available in public -repositories are retrieved, otherwise you may see an error like `Cannot resolve com.ibm.gaiandb:gaian` or `Cannot resolve org.apache.derby:derby`. - We have also noticed that you need to ensure JAVA_HOME is set (see under 'Java' earlier on this page) or the build will fail running javadoc. ## Issue Tracking diff --git a/open-metadata-distribution/open-metadata-assemblies/src/main/assemblies/egeria-omag.xml b/open-metadata-distribution/open-metadata-assemblies/src/main/assemblies/egeria-omag.xml index f7ec8b0bc4a..04777459ecf 100644 --- a/open-metadata-distribution/open-metadata-assemblies/src/main/assemblies/egeria-omag.xml +++ b/open-metadata-distribution/open-metadata-assemblies/src/main/assemblies/egeria-omag.xml @@ -67,7 +67,6 @@ org.odpi.egeria:discovery-service-connectors:* org.odpi.egeria:governance-action-connectors:* org.odpi.egeria:files-integration-connectors:* - org.odpi.egeria:graph-repository-connector:* org.odpi.egeria:inmemory-open-metadata-topic-connector:* org.odpi.egeria:inmemory-repository-connector:* @@ -77,10 +76,7 @@ org.odpi.egeria:open-metadata-archive-file-connector:* org.odpi.egeria:open-metadata-security-samples:* - org.odpi.egeria:spring-rest-client-connector:* - - org.odpi.egeria:governance-services-sample:* diff --git a/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/pom.xml b/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/pom.xml index 68b8774ec04..bbd534d73ae 100644 --- a/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/pom.xml +++ b/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/pom.xml @@ -107,10 +107,6 @@ org.odpi.egeria governance-program-spring - - org.odpi.egeria - information-view-spring - org.odpi.egeria project-management-spring diff --git a/open-metadata-implementation/access-services/docs/user/README.md b/open-metadata-implementation/access-services/docs/user/README.md index 48839e55554..2a8130da3bf 100644 --- a/open-metadata-implementation/access-services/docs/user/README.md +++ b/open-metadata-implementation/access-services/docs/user/README.md @@ -9,7 +9,6 @@ * [Asset Consumer OMAS User Documentation](../../asset-consumer/docs/user) * [Community Profile OMAS User Documentation](../../community-profile/docs/user) * [Data Engine OMAS User Documentation](../../data-engine/docs/user) - * [Information View OMAS User Documentation](../../information-view/docs/user) diff --git a/open-metadata-implementation/access-services/information-view/README.md b/open-metadata-implementation/access-services/information-view/README.md deleted file mode 100644 index 4ad5f2e9a76..00000000000 --- a/open-metadata-implementation/access-services/information-view/README.md +++ /dev/null @@ -1,26 +0,0 @@ - - - -![Deprecated](../../../open-metadata-publication/website/images/egeria-content-status-deprecated.png#pagewidth) - -# Information View Open Metadata Access Service (OMAS) - -The Information View OMAS configures and manages metadata for data tools that -create virtual views over data - such as business intelligence tools and -data virtualization platforms. - -The module structure for the Information View OMAS is as follows: - -* [information-view-client](information-view-client) supports the client library. -* [information-view-api](information-view-api) supports the common Java classes that are used both by the client and the server. -* [information-view-server](information-view-server) supports in implementation of the access service and its related event management. -* [information-view-spring](information-view-spring) supports the REST API using the [Spring](../../../developer-resources/Spring.md) libraries. - - ----- -Return to the [access-services](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - diff --git a/open-metadata-implementation/access-services/information-view/docs/design/README.md b/open-metadata-implementation/access-services/information-view/docs/design/README.md deleted file mode 100644 index 657ed2aae71..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/design/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Information View OMAS Design - -The module structure for the Information View OMAS is as follows: - -* [information-view-client](../../information-view-client) supports the client library. -* [information-view-api](../../information-view-api) supports the common Java classes that are used both by the client and the server. -* [information-view-server](../../information-view-server) supports in implementation of the access service and its related event management. -* [information-view-spring](../../information-view-spring) supports the REST API using the [Spring](../../../../../developer-resources/Spring.md) libraries. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/README.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/README.md deleted file mode 100644 index c51ad4a77af..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/README.md +++ /dev/null @@ -1,47 +0,0 @@ - - - - -# Using the Information View OMAS(IV OMAS) - -Below is the list of tasks supported by Information View OMAS. - -## External Tool registration -In order for an external tool to submit reports or views to IV OMAS, first it needs to register as a software capability through IV OMAS. -The result will be a new entity of type SoftwareServerCapability. The guid of this entity will be further used by the external entity when submitting new assets. -Sample of the request can be found here: [register-external-tool](../../information-view-server/docs/user/register-tool.md) -## External Tool lookup -In order to retrieve the guid of the entity created at above step, a lookup based on qualifiedName can be performed -Sample of the request can be found here: [lookup-external-tool](../../information-view-server/docs/user/lookup-registration.md) -## Report submit -The external tool can submit the metadata for a report. The submitted payload must also contain either the guid or the qualified name of the software server entity mentioned above. -An example can be found here: [submit-report](../../information-view-server/docs/user/submit-report.md) -## Report lookup -The report representation can be retrieved by using the reportId where reportId is the internal id coming from external tool. -## Data View submit -The external tool can submit the metadata for a view. -An example can be found here: [submit-view](../../information-view-server/docs/user/submit-data-view.md) -## Data View lookup -The view representation can be retrieved by using the dataViewId where dataViewId is the internal id coming from external tool. -An example can be found here: [lookup-data-view](../../information-view-server/docs/user/lookup-data-view.md) -## Retrieve databases -This endpoint will return a list of all databases in the zones supported by IV OMAS. These zones are part of the configuration of IV OMAS -An example can be found here: [retrieve-databases](../../information-view-server/docs/user/retrieve-databases.md) -## Retrieve tables for a database -This endpoint will return a list of all tables based on the database guid provided by previous endpoint -An example can be found here: [retrieve-tables](../../information-view-server/docs/user/retrieve-database-tables.md) -## Retrieve context for a table -This endpoint will return the table context(columns, schema, database, endpoint details) based on the table guid provided by previous endpoint -An example can be found here: [retrieve-table-context](../../information-view-server/docs/user/retrieve-table-context.md) -## Retrieve columns for a table -This endpoint will return the columns of the table based on the table guid -An example can be found here: [retrieve-table-columns](../../information-view-server/docs/user/retrieve-table-columns.md) -## Publish Column Context Event on OUT topic - -When a NEW_RELATIONSHIP_EVENT event of type SemanticAssignment between a RelationalColumn and a GlossaryTern is published on cohort topic, the full context of the RelationalColumn is retrieved and published on Information View Out topic - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/ReportDiagramExample.png b/open-metadata-implementation/access-services/information-view/docs/scenarios/ReportDiagramExample.png deleted file mode 100644 index 7c3473c040834962bb9163ed46152090f4953186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103308 zcmeEtWmKHowj~r03JFlSy9T!qf;$NiAcWxVPJrOS6C`MYLxA83?(PnS1b25Wyzu@w z=f2l(yuN32_y0FW{VFz9-(Gv|wdR~_R;bDwxu@u)=m-c1PhZJPzePYmK}0|RZGfKu z@3?@eT@es4=sn+Qy4bnPIT<-xDmj>%*&-k)Y4jBDzreanMuoCnw+piU7!Zs-HD6A3 zzL<(ys6kDX`9&X-$?$De@EVDCAxXpT0u@wGQ*`o7;h}Y(3LJnCeT&h04^kludT7Oe zE&3GmVVN0UbXBf}JpNqc@xxhEQ+t-I0Mul^QeSMUt5Mh$yp~a@LXM@u1Yq-x(?`x}mg~YAg zQj~m&EE&(&(GbM4_0!ATo%{;X$B>-XS3KMsd5Jk{bN2z-*f2Pm4_~lF!Iz0ql%a}O z?N)yBU3;%&C~Z)I|E$HD8W#AF(GqY@TCp_4H&;OKWnpxP4b4`62UWeyfA>&(HpY_0 z`3%%0Er1-PB&~Z{5+k~M&uuJRe1mbzAJE{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i*z#-K+K9#nw-X^l<)94(f?!vj(4&lk;u%fm-YEdgS8ho8!Bql}ygQ_*n&G zmgDA{usKg`Ru|2Rpj*uQ@FAq3vC*c$QGeR@ z%S-5-)U4@e&KSqX$KT4$%_Yg`@z!5vNs-R2UVP3pir3lcJhp<}-rjyMKVP+`rY5tb zAqZtSEszcHvm|x(i!m`VBrUB|A2hhntMGO-4NGh}7l$F!$R*IVV}|v3_54zc{RX{C zBt#rs{1U66i;Gh}B3fQ#b>^S4qnZ8tFrWWI#2?X@&x{h28p+QRh3@+Q%huy{5e*r8 kMizFcNCG8g1Mc%qo%NZWunhCmUjiRnn?2j_TG7w_3m1rjdH?_b diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-data-view.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-data-view.md deleted file mode 100644 index 05d8f53da84..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-data-view.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Lookup a data view - -An external tool can lookup for the InformationView entity created at registration step - -Request to use is: [lookup-data-view](../../information-view-server/docs/user/lookup-data-view.md) - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-registration-tool.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-registration-tool.md deleted file mode 100644 index b2bd232daca..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/lookup-registration-tool.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Lookup an external tool - -An external tool can lookup for the SoftwareServerCapability entity created at registration step - -Request to use is: [lookup-external-tool](../../information-view-server/docs/user/lookup-registration.md) - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/register-external-tool.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/register-external-tool.md deleted file mode 100644 index 448c4bb3167..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/register-external-tool.md +++ /dev/null @@ -1,15 +0,0 @@ - - - -# Registering an external tool - -For an external tool to submit metadata to Information View OMAS it needs to first register. - -This implies creating a SoftwareServerCapability entity with the properties defining the external tool. - -Request to use is: [register-external-tool](../../information-view-server/docs/user/register-tool.md) - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/semantic-assignment.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/semantic-assignment.md deleted file mode 100644 index 2dfe9edb64b..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/semantic-assignment.md +++ /dev/null @@ -1,12 +0,0 @@ - - - -# Semantic assignment between a relational column and a glossary term - -When a new relationship of type SEMANTIC_ASSIGNMENT is created between a relational column and a glossary term, the full context of the column will be retrieved. - -This includes the host details, connection with connector type, database name, schema name, table name, list of columns in the table (with type, primaryKey flag, foreignKey constraint and business terms associated for each column). - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/submit-data-view.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/submit-data-view.md deleted file mode 100644 index dc50d1275be..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/submit-data-view.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Submit a data view - -An external tool can submit a data view as a view on top of other sources. The request must contain also the registration guid of the external tool, obtained when the tool initially registered. -For each data view column, the metadata contains: -* basic properties of the column like name, formula, comment, description -* the list of business terms associated, if any. This requires the list of guids of the business terms. -* a list of sources for the column. This can be a table column, a view column, a report column or a file column. It can be resolved in 3 ways: through guid (preferred as it is the global unique identifier, -through qualifiedName or by passing the details used for lookup( such as networkAddress, database name, schema name, table name and column name for a database column). -First 2 options should be preferred as the source is clearly indicated. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/scenarios/submit-report-metadata.md b/open-metadata-implementation/access-services/information-view/docs/scenarios/submit-report-metadata.md deleted file mode 100644 index 7b327d7fc11..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/scenarios/submit-report-metadata.md +++ /dev/null @@ -1,18 +0,0 @@ - - - -# Submit a report - -An external tool can submit a report metadata representation. The request must contain also the registration guid of the external tool, obtained when the tool initially registered. -For each report column, the metadata contains: -* basic properties of the column like name, formula -* the list of business terms associated, if any. This requires the list of guids of the business terms. -* a list of sources for the column. This can be a table column, a view column, a report column or a file column. It can be resolved in 3 ways: through guid (preferred as it is the global unique identifier, -through qualifiedName or by passing the details used for lookup( such as networkAddress, database name, schema name, table name and column name for a database column). -First 2 options should be preferred as the source is clearly indicated. -The report metadata representation can only be updated by the owning tool, meaning the registration guid must match the one used at initial creation step. -An example of a metadata representation of the report can be seen in [reportDiagram](ReportDiagramExample.png) - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/user/README.md b/open-metadata-implementation/access-services/information-view/docs/user/README.md deleted file mode 100644 index 2bd5ee75297..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/user/README.md +++ /dev/null @@ -1,25 +0,0 @@ - - - -# Information View OMAS User Documentation - -The Information View OMAS manages definitions of views and reports. - -Most of the interaction is done through BI and virtualization tools. - -There are 2 ways to interact with Information View OMAS: - -* [topic](java-events) for receiving events -* REST API to create information views and reports - - - -To understand more see: - -* [Configuring the Information View OMAS](../../../../admin-services/docs/user/configuring-the-access-services.md) -* [Using the Information View OMAS](../scenarios) - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/user/java-events/README.md b/open-metadata-implementation/access-services/information-view/docs/user/java-events/README.md deleted file mode 100644 index 0f061af083a..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/user/java-events/README.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# Receiving Information View OMAS(IV OMAS) Events using Java - - -Information View OMAS listens to 2 topics: -* cohort topic (topic name is defined in cohortOMRSTopicConnection) -* information view IN topic (topic name is defined in accessServiceInTopic for access service "Information View") - -and publishes events to one topic: -* information view OUT topic (topic name is defined in accessServiceOutTopic for access service "Information View") - -From cohort topic IV OMAS listens to the following OMRS events: - - * NewRelationshipEvent with type SemanticAssignment between a RelationalColumn and a GlossaryTerm. Following events will be published on OUT topic: - * a SemanticAssignment event: [semantic-assignment-example](semantic-assignment.json) - * event containing the full context of the parent table of the referenced column: host address of the database, database name, schema name, table name, all columns (including primary and foreign keys defined, column type) and the business terms assigned (null if column doesn't have any business term) - - [full-context-example](table-full-context.json) - * UpdatedEntityEvent for a GlossaryTerm. Following events will be published on OUT topic: - * an UpdatedEntityEvent: [updated-entity](updated-entity-event.json) - * if the glossary term name was updated, it will publish events containing the full context of tables that contain a column linked to the referenced glossary term - - * DeletedRelationshipEvent with type SemanticAssignment between a RelationalColumn and a GlossaryTerm. Following events will be published on OUT topic: - * event containing the full context of the parent table of the referenced column: host address of the database, database name, schema name, table name, all columns (including primary and foreign keys defined, column type) and the business terms assigned (null if column doesn't have any business term) - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/information-view/docs/user/java-events/semantic-assignment.json b/open-metadata-implementation/access-services/information-view/docs/user/java-events/semantic-assignment.json deleted file mode 100644 index 2bc0cdab81e..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/user/java-events/semantic-assignment.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "class": "SemanticAssignment", - "eventVersionId": 1, - "tableColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb23.pa2dds7.77ucei.kgbl5vs0vlcvh54p1cr2d", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=ROLE", - "name": "ROLE", - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - }, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.0v9mhc0ml.74ib0ld.933da6.pcumt2kvjraa3cbl6gopr", - "name": "job_role", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "test short description for glossary term", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=job_role" - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/user/java-events/table-full-context.json b/open-metadata-implementation/access-services/information-view/docs/user/java-events/table-full-context.json deleted file mode 100644 index c6ba3325f14..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/user/java-events/table-full-context.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "class": "TableContextEvent", - "eventVersionId": 1, - "tableSource": { - "class": "TableSource", - "@id": 1, - "guid": "b1c497ce.54bd3a08.0v9mgsb23.pa2bef1.34r7co.tgr5b7dgjjrm6tesftbr5", - "name": "EMPLOYEE", - "schemaName": "DB2INST1", - "databaseSource": { - "class": "DatabaseSource", - "@id": 2, - "guid": "b1c497ce.6e83759b.0v9mgsb23.pajbvbk.bi4t6t.6bj8srpdi3ra2uo10pslq", - "name": "EMPLOYEE", - "endpointSource": { - "class": "EndpointSource", - "@id": 3, - "networkAddress": "{{host}}", - "connectorProviderName": "DB2Connector" - } - } - }, - "tableColumns": [ - { - "guid": "b1c497ce.60641b50.0v9mgsb23.pa305oe.kii6u4.qdcfiucddadpe5qho0n8o", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=EMPSTATUS", - "name": "EMPSTATUS", - "position": 4, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pfrb.66t5p8c.jk5353.69k7s3u2do49odaavci58", - "name": "Employee Status", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Employee Status represents current various status that an employee could have. Possible values: 1=Student; 2=Temporary-Assignment; 3=Board-Advisor; 4=Sabbatical; 5=Executive; 6=Part-Time-Perm; 7=Full-Time-Perm; 8=Left; 9=Retired; 10=DIS", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Employee Status" - }, - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb23.pa2mb5g.o6aanb.ghn0ho4o1apm5kms0g957", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=LOCCODE", - "name": "LOCCODE", - "position": 8, - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb23.pa318je.s48jct.1hd6uud0rv9fu94lvo0ro", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=LNAME", - "name": "LNAME", - "position": 3, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.54865omgq.rfvlanh.nnt92o.b897ae4a46b6lji08q04c", - "name": "Last Name", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Last Name" - }, - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb23.pa2ik40.j8n8mn.j3ev5o280kc6gr2j6m44b", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=DEPT", - "name": "DEPT", - "position": 6, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pfv9.8dicae6.ms2vnv.944jep7aa2u7e0epjv35l", - "name": "Department Code", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Department Code" - }, - "referencedColumn": { - "columnGuid": "b1c497ce.60641b50.0v9mgsb23.pa30d9h.p5tahl.6ib6pt8gt4i8nnso0vreo", - "columnName": "DEPCODE", - "tableName": "DEPT" - }, - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb23.pa32d69.aig05d.srl9paej3itqugq468ah4", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=PNUM", - "name": "PNUM", - "position": 1, - "primaryKeyName": "SQL190121170031730", - "isNullable": false, - "isPrimaryKey": true, - "isUnique": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb23.p9ia47i.olib8a.fgogj3tln5ibkcdu6i5o5", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=FNAME", - "name": "FNAME", - "position": 2, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.54865omh1.pco9ecb.c3g5f1.pfvf6bdv95dnc67jq2jli", - "name": "First Name", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=First Name" - }, - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb23.p9i9d64.5qdc19.d6ntnlgms84k93kd4p6bp", - "qualifiedName": "(host_(engine))={{host}}::(database)=EMPLOYEE::(database_schema)=DB2INST1::(database_table)=EMPLOYEE::(database_column)=LVL", - "name": "LVL", - "position": 5, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pgh3.t31gl2q.lmuj3g.l1serkqbms76e5v8n8mes", - "name": "Job Level", - "description": "Job Level term identifies job level within the enterprise. Job level is from 1-9. This term is assigned to each employee.", - "abbreviation": "", - "usage": "", - "summary": "Job Level term identifies job level within the enterprise. Job level is from 1-9.", - "examples": "3", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Job Level" - }, - "isNullable": false, - "isPrimaryKey": false, - "isUnique": false - } - ] -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/docs/user/java-events/updated-entity-event.json b/open-metadata-implementation/access-services/information-view/docs/user/java-events/updated-entity-event.json deleted file mode 100644 index e91985e1829..00000000000 --- a/open-metadata-implementation/access-services/information-view/docs/user/java-events/updated-entity-event.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "class": "UpdatedEntityEvent", - "eventVersionId": 1, - "guid": "6662c0f2.e1b1ec6c.0v9mhc0ml.74ib0ld.933da6.pcumt2kvjraa3cbl6gopr", - "type": { - "class": "InstanceType", - "typeDefCategory": "ENTITY_DEF", - "typeDefGUID": "0db3e6ec-f5ef-4d75-ae38-b7ee6fd6ec0a", - "typeDefName": "GlossaryTerm", - "typeDefVersion": 1, - "typeDefDescription": "A semantic description of something, such as a concept, object, asset, technology, role or group.", - "typeDefSuperTypes": [ - { - "guid": "a32316b8-dc8c-48c5-b12b-71c1b2a080bf", - "name": "Referenceable" - } - ], - "validInstanceProperties": [ - "qualifiedName", - "additionalProperties", - "displayName", - "summary", - "description", - "examples", - "abbreviation", - "usage" - ] - }, - "oldProperties": { - "class": "InstanceProperties", - "instanceProperties": { - "summary": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "email address" - }, - "examples": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "qualifiedName": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=email" - }, - "displayName": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "email" - }, - "usage": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "description": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "additionalProperties": { - "class": "MapPropertyValue", - "instancePropertyCategory": "MAP", - "mapValues": { - "class": "InstanceProperties", - "instanceProperties": { - "additional_abbreviation": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "is_modifier": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "false" - }, - "type": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "NONE" - }, - "workflow_current_state": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "status": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "ACCEPTED" - } - }, - "propertyCount": 5, - "propertyNames": [ - "workflow_current_state", - "additional_abbreviation", - "is_modifier", - "type", - "status" - ] - }, - "mapElementCount": 5 - }, - "abbreviation": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - } - }, - "propertyCount": 8, - "propertyNames": [ - "summary", - "examples", - "qualifiedName", - "displayName", - "usage", - "description", - "additionalProperties", - "abbreviation" - ] - }, - "newProperties": { - "class": "InstanceProperties", - "instanceProperties": { - "summary": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "email address" - }, - "examples": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "qualifiedName": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=email" - }, - "displayName": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "email" - }, - "usage": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "description": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "additionalProperties": { - "class": "MapPropertyValue", - "instancePropertyCategory": "MAP", - "mapValues": { - "class": "InstanceProperties", - "instanceProperties": { - "additional_abbreviation": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "is_modifier": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "false" - }, - "type": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "NONE" - }, - "workflow_current_state": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - }, - "status": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "ACCEPTED" - } - }, - "propertyCount": 5, - "propertyNames": [ - "workflow_current_state", - "additional_abbreviation", - "is_modifier", - "type", - "status" - ] - }, - "mapElementCount": 5 - }, - "abbreviation": { - "class": "PrimitivePropertyValue", - "instancePropertyCategory": "PRIMITIVE", - "typeGUID": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4", - "typeName": "string", - "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING", - "primitiveValue": "" - } - }, - "propertyCount": 8, - "propertyNames": [ - "summary", - "examples", - "qualifiedName", - "displayName", - "usage", - "description", - "additionalProperties", - "abbreviation" - ] - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/build.gradle b/open-metadata-implementation/access-services/information-view/information-view-api/build.gradle deleted file mode 100644 index 78bd1623f01..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'com.fasterxml.jackson.core:jackson-annotations' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'javax.validation:validation-api' -} - -description = 'Information View OMAS API' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/pom.xml b/open-metadata-implementation/access-services/information-view/information-view-api/pom.xml deleted file mode 100644 index e9152f9b1e2..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - information-view - org.odpi.egeria - 2.11-SNAPSHOT - - - Information View OMAS API - - Shared beans for the Information View Open Metadata Access Service (OMAS). - - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - information-view-api - - - - com.fasterxml.jackson.core - jackson-annotations - - - - org.odpi.egeria - repository-services-apis - - - - javax.validation - validation-api - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/BusinessTerm.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/BusinessTerm.java deleted file mode 100644 index 81053a74ec1..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/BusinessTerm.java +++ /dev/null @@ -1,176 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class BusinessTerm { - - private String guid; - private String name; - private String query; - private String description; - private String abbreviation; - private String usage; - private String summary; - private String examples; - private String displayName; - private String qualifiedName; - private GlossaryCategory glossaryCategory; - - - /** - * Return the guid of the business term - * - * @return guid of the business term - */ - public String getGuid() { - return guid; - } - - /** - * set up the guid of the business term - * - * @param guid - guid of the business term - */ - public void setGuid(String guid) { - this.guid = guid; - } - - /** - * Return the foreignKeyName of the business term - * - * @return foreignKeyName of the business term - */ - public String getName() { - return name; - } - - /** - * set up the foreignKeyName of the business term - * - * @param name - foreignKeyName of the business term - */ - public void setName(String name) { - this.name = name; - } - - /** - * Return the query of the business term - * - * @return query of the business term - */ - public String getQuery() { - return query; - } - - /** - * set up the query of the business term - * - * @param query - query for the business term - */ - public void setQuery(String query) { - this.query = query; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getAbbreviation() { - return abbreviation; - } - - public void setAbbreviation(String abbreviation) { - this.abbreviation = abbreviation; - } - - public String getUsage() { - return usage; - } - - public void setUsage(String usage) { - this.usage = usage; - } - - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public String getExamples() { - return examples; - } - - public void setExamples(String examples) { - this.examples = examples; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public GlossaryCategory getGlossaryCategory() { - return glossaryCategory; - } - - public void setGlossaryCategory(GlossaryCategory glossaryCategory) { - this.glossaryCategory = glossaryCategory; - } - - public String getQualifiedName() { - return qualifiedName; - } - - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - public String buildQualifiedName() { - StringBuilder builder = new StringBuilder(this.getName()); - GlossaryCategory parentCategory = this.getGlossaryCategory(); - while (parentCategory != null) { - builder.insert(0, parentCategory.getName() + "."); - parentCategory = parentCategory.getParentCategory(); - } - - return builder.toString(); - } - - - @Override - public String toString() { - return "{" + - "guid='" + guid + '\'' + - ", name='" + name + '\'' + - ", query='" + query + '\'' + - ", description='" + description + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", summary='" + summary + '\'' + - ", examples='" + examples + '\'' + - ", displayName='" + displayName + '\'' + - ", glossaryCategory=" + glossaryCategory + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataView.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataView.java deleted file mode 100644 index 86e6a582daa..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataView.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.constraints.NotBlank; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataView { - - private String guid; - private List elements; - private List sources; - private String nativeClass; - private String endpointAddress = ""; - @NotBlank - private String name; - private String author; - @NotBlank - private String id; - private Long createdTime; - private String lastModifier; - private Long lastModifiedTime; - - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - public List getElements() { - return elements; - } - - public void setElements(List elements) { - this.elements = elements; - } - - public List getSources() { - return sources; - } - - public void setSources(List sources) { - this.sources = sources; - } - - public String getNativeClass() { - return nativeClass; - } - - public void setNativeClass(String nativeClass) { - this.nativeClass = nativeClass; - } - - public String getEndpointAddress() { - return endpointAddress; - } - - public void setEndpointAddress(String endpointAddress) { - this.endpointAddress = endpointAddress; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Long getCreatedTime() { - return createdTime; - } - - public void setCreatedTime(Long createdTime) { - this.createdTime = createdTime; - } - - public String getLastModifier() { - return lastModifier; - } - - public void setLastModifier(String lastModifier) { - this.lastModifier = lastModifier; - } - - public Long getLastModifiedTime() { - return lastModifiedTime; - } - - public void setLastModifiedTime(Long lastModifiedTime) { - this.lastModifiedTime = lastModifiedTime; - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - - @Override - public String toString() { - return "{" + - ", elements=" + elements + - ", sources=" + sources + - ", nativeClass='" + nativeClass + '\'' + - ", endpointAddress='" + endpointAddress + '\'' + - ", name='" + name + '\'' + - ", author='" + author + '\'' + - ", id='" + id + '\'' + - ", createdTime=" + createdTime + - ", lastModifier='" + lastModifier + '\'' + - ", lastModifiedTime=" + lastModifiedTime + - '}'; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumn.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumn.java deleted file mode 100644 index 46b99e25133..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumn.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataViewColumn extends DataViewElement { - - private String regularAggregate; - private String usage; - private String expression; - private String dataType; - private String hidden; - private List businessTerms; - private List sources; - - public String getRegularAggregate() { - return regularAggregate; - } - - public void setRegularAggregate(String regularAggregate) { - this.regularAggregate = regularAggregate; - } - - public String getUsage() { - return usage; - } - - public void setUsage(String usage) { - this.usage = usage; - } - - public String getExpression() { - return expression; - } - - public void setExpression(String expression) { - this.expression = expression; - } - - public String getDataType() { - return dataType; - } - - public void setDataType(String dataType) { - this.dataType = dataType; - } - - public String getHidden() { - return hidden; - } - - public void setHidden(String hidden) { - this.hidden = hidden; - } - - - public List getSources() { - return sources; - } - - public void setSources(List sources) { - this.sources = sources; - } - - public List getBusinessTerms() { - return businessTerms; - } - - public void setBusinessTerms(List businessTerms) { - this.businessTerms = businessTerms; - } - - @Override - public String toString() { - return "{" + - "regularAggregate='" + regularAggregate + '\'' + - ", usage='" + usage + '\'' + - ", expression='" + expression + '\'' + - ", dataType='" + dataType + '\'' + - ", hidden='" + hidden + '\'' + - ", businessTerms=" + businessTerms + - ", sources=" + sources + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumnSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumnSource.java deleted file mode 100644 index b9c854723e6..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewColumnSource.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -public class DataViewColumnSource extends Source { - - private String id; - private String name; - private DataViewSource dataViewSource; - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public DataViewSource getDataViewSource() { - return dataViewSource; - } - - public void setDataViewSource(DataViewSource dataViewSource) { - this.dataViewSource = dataViewSource; - } - - @Override - public String toString() { - return "{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", dataViewSource=" + dataViewSource + - '}'; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewElement.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewElement.java deleted file mode 100644 index 48dc8d4606d..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewElement.java +++ /dev/null @@ -1,99 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.*; - - -import javax.validation.constraints.NotBlank; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = DataViewColumn.class, name = "DataViewColumn"), - @JsonSubTypes.Type(value = DataViewModel.class, name = "DataViewModel")}) - -@JsonIdentityInfo(generator = ObjectIdGenerators.StringIdGenerator.class, property="id") -@JsonIdentityReference -public class DataViewElement { - - @NotBlank - private String id; - @NotBlank - private String name; - private String nativeClass; - private String comment; - private String description; - private List elements; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getNativeClass() { - return nativeClass; - } - - public void setNativeClass(String nativeClass) { - this.nativeClass = nativeClass; - } - - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List getElements() { - return elements; - } - - public void setElements(List elements) { - this.elements = elements; - } - - @Override - public String toString() { - return "{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", nativeClass='" + nativeClass + '\'' + - ", comment='" + comment + '\'' + - ", description='" + description + '\'' + - ", elements=" + elements + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewModel.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewModel.java deleted file mode 100644 index f13af0aae80..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewModel.java +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataViewModel extends DataViewElement { - - private List elements; - - public List getElements() { - return elements; - } - - public void setElements(List elements) { - this.elements = elements; - } - - @Override - public String toString() { - return "{" + - "elements=" + elements + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewRequestBody.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewRequestBody.java deleted file mode 100644 index 09da476330a..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewRequestBody.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataViewRequestBody extends InformationViewHeader{ - - private String registrationGuid; - private String registrationQualifiedName; - @Valid - @NotNull - private DataView dataView; - - public DataView getDataView() { - return dataView; - } - - public void setDataView(DataView dataView) { - this.dataView = dataView; - } - - /** - * - * @return guid associated to the external tool at registration step - */ - public String getRegistrationGuid() { - return registrationGuid; - } - - /** - * - * @param registrationGuid - guid of the external tool - */ - public void setRegistrationGuid(String registrationGuid) { - this.registrationGuid = registrationGuid; - } - - public String getRegistrationQualifiedName() { - return registrationQualifiedName; - } - - public void setRegistrationQualifiedName(String registrationQualifiedName) { - this.registrationQualifiedName = registrationQualifiedName; - } - - @Override - public String toString() { - return "{" + - "registrationGuid='" + registrationGuid + '\'' + - ", registrationQualifiedName='" + registrationQualifiedName + '\'' + - ", dataView=" + dataView + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewSource.java deleted file mode 100644 index 29bf6b61cd8..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DataViewSource.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -public class DataViewSource extends Source{ - - protected EndpointSource endpointSource; - protected String id; - protected String name; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public EndpointSource getEndpointSource() { - return endpointSource; - } - - public void setEndpointSource(EndpointSource endpointSource) { - this.endpointSource = endpointSource; - } - - @Override - public String toString() { - return "{" + - "endpointSource=" + endpointSource + - ", id='" + id + '\'' + - ", name='" + name + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseColumnSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseColumnSource.java deleted file mode 100644 index 153747d7025..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseColumnSource.java +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DatabaseColumnSource extends Source { - - private String name; - - private TableSource tableSource = new TableSource(); - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public TableSource getTableSource() { - return tableSource; - } - - public void setTableSource(TableSource tableSource) { - this.tableSource = tableSource; - } - - - @Override - public Map getAdditionalProperties() { - return tableSource != null ? tableSource.getAdditionalProperties() : super.getAdditionalProperties(); - } - - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - ", tableSource=" + tableSource + - '}'; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseSource.java deleted file mode 100644 index aba1c4f5b1a..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DatabaseSource.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DatabaseSource extends Source{ - - private String name; - private EndpointSource endpointSource; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public EndpointSource getEndpointSource() { - return endpointSource; - } - - public void setEndpointSource(EndpointSource endpointSource) { - this.endpointSource = endpointSource; - } - - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - ", endpointSource=" + endpointSource + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DeployedReport.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DeployedReport.java deleted file mode 100644 index ba60e1fc099..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DeployedReport.java +++ /dev/null @@ -1,249 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.constraints.NotBlank; -import java.util.List; -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DeployedReport { - - private String guid; - private String qualifiedName; - private List sources; - @NotBlank - private String id; - private Long createdTime; - private String author; - @NotBlank - private String reportName; - private String reportUrl; - private String lastModifier; - private Long lastModifiedTime; - private List reportElements; - private Map additionalProperties; - - - /** - * - * @return qualifiedName of the report - */ - public String getQualifiedName() { - return qualifiedName; - } - - /** - * - * @param qualifiedName value of property qualified name - */ - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - /** - * - * @return the unique identifier specific to BI tool for the report - */ - public String getId() { - return id; - } - - /** - * set the id of the report - * - * @param id - unique identifier of the report - */ - public void setId(String id) { - this.id = id; - } - - /** - * - * @return timestamp for the report creation time - */ - public Long getCreatedTime() { - return createdTime; - } - - /** - * set the createdTime - * - * @param createdTime - timestamp of the creation time of the report - */ - public void setCreatedTime(Long createdTime) { - this.createdTime = createdTime; - } - - /** - * - * @return the author of the report - */ - public String getAuthor() { - return author; - } - - /** - * set the report's author - * - * @param author - creator of the report - */ - public void setAuthor(String author) { - this.author = author; - } - - /** - * - * @return report name - */ - public String getReportName() { - return reportName; - } - - /** - * set the report name - * - * @param reportName - name of the report - */ - public void setReportName(String reportName) { - this.reportName = reportName; - } - - /** - * - * @return the url for accessing the report - */ - public String getReportUrl() { - return reportUrl; - } - - /** - * set set the url of the report - * - * @param reportUrl - url to access the report - */ - public void setReportUrl(String reportUrl) { - this.reportUrl = reportUrl; - } - - /** - * - * @return the last modifier - */ - public String getLastModifier() { - return lastModifier; - } - - /** - * set up the last modifier of the report - * - * @param lastModifier - last modifier of the report - */ - public void setLastModifier(String lastModifier) { - this.lastModifier = lastModifier; - } - - /** - * - * @return time of the last report modification - */ - public Long getLastModifiedTime() { - return lastModifiedTime; - } - - /** - *set the last time the report was modified - * - * @param lastModifiedTime - time of the last report modification - */ - public void setLastModifiedTime(Long lastModifiedTime) { - this.lastModifiedTime = lastModifiedTime; - } - - /** - * - * @return list of sources referenced by the report - */ - public List getSources() { - return sources; - } - - /** - * set the list of sources referenced by the report - * - * @param sources - list of sources referenced by the report - */ - public void setSources(List sources) { - this.sources = sources; - } - - /** - * - * @return additional properties of the report - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * set additional properties of the report that are not represented as basic report properties - * - * @param additionalProperties - additional properties of the report - */ - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - /** - * - * @return elements composing the reports - */ - public List getReportElements() { - return reportElements; - } - - /** - * set the elements of the report - * - * @param reportElements - elements composing the report - */ - public void setReportElements(List reportElements) { - this.reportElements = reportElements; - } - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - @Override - public String toString() { - return "{" + - "guid='" + guid + '\'' + - ", qualifiedName='" + qualifiedName + '\'' + - ", sources=" + sources + - ", id='" + id + '\'' + - ", createdTime=" + createdTime + - ", author='" + author + '\'' + - ", reportName='" + reportName + '\'' + - ", reportUrl='" + reportUrl + '\'' + - ", lastModifier='" + lastModifier + '\'' + - ", lastModifiedTime=" + lastModifiedTime + - ", reportElements=" + reportElements + - ", additionalProperties=" + additionalProperties + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DerivedColumn.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DerivedColumn.java deleted file mode 100644 index bd94dfe7584..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/DerivedColumn.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DerivedColumn extends TableColumn { - - private TableColumn sourceColumn; - - /** - * Return the real column associated with the derived column - * - * @return real column linked to the derived column - */ - public TableColumn getSourceColumn() { - return sourceColumn; - } - - /** - * set up the real column linked to the derived column - * - * @param sourceColumn - real column associated to the derived column - */ - public void setSourceColumn(TableColumn sourceColumn) { - this.sourceColumn = sourceColumn; - } - - - @Override - public String toString() { - return "{" + - "name='" + getName() + '\'' + - ", position=" + getPosition() + - ", cardinality='" + getCardinality() + '\'' + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", type='" + getType() + '\'' + - ", sourceColumn=" + sourceColumn + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/EndpointSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/EndpointSource.java deleted file mode 100644 index bdcebb81066..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/EndpointSource.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -public class EndpointSource extends Source { - private String networkAddress; - private String protocol; - private String encryptionMethod; - private String connectorProviderName; - private String user; - - /** - * Return the protocol of the connection - * - * @return protocol of the connection - */ - public String getProtocol() { - return protocol; - } - - /** - * set up the protocol of the connection - * - * @param protocol - protocol of the connection - */ - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - - /** - * Return the address of the connection - * - * @return address of the connection - */ - public String getNetworkAddress() { - return networkAddress; - } - - /** - * set up the address of the connection - * - * @param networkAddress - address of the connection - */ - public void setNetworkAddress(String networkAddress) { - this.networkAddress = networkAddress; - } - - /** - * Return the name of the connector provider. - * - * @return sting name - */ - public String getConnectorProviderName() { - return connectorProviderName; - } - - /** - * Set up the name of the connector provider. - * - * @param connectorProviderName string name - */ - public void setConnectorProviderName(String connectorProviderName) { - this.connectorProviderName = connectorProviderName; - } - - public String getUser() { - return user; - } - - public void setUser(String user) { - this.user = user; - } - - public String getEncryptionMethod() { - return encryptionMethod; - } - - public void setEncryptionMethod(String encryptionMethod) { - this.encryptionMethod = encryptionMethod; - } - - @Override - public String toString() { - return "{" + - "networkAddress='" + networkAddress + '\'' + - ", protocol='" + protocol + '\'' + - ", encryptionMethod='" + encryptionMethod + '\'' + - ", connectorProviderName='" + connectorProviderName + '\'' + - ", user='" + user + '\'' + - ", additionalProperties=" + additionalProperties + - ", qualifiedName='" + qualifiedName + '\'' + - ", guid='" + guid + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ForeignKey.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ForeignKey.java deleted file mode 100644 index ece8763f690..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ForeignKey.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ForeignKey { - - String columnGuid; - String foreignKeyName; - String columnName; - String tableName; - - - public String getColumnGuid() { - return columnGuid; - } - - public void setColumnGuid(String columnGuid) { - this.columnGuid = columnGuid; - } - - public String getForeignKeyName() { - return foreignKeyName; - } - - public void setForeignKeyName(String foreignKeyName) { - this.foreignKeyName = foreignKeyName; - } - - public String getColumnName() { - return columnName; - } - - public void setColumnName(String columnName) { - this.columnName = columnName; - } - - public String getTableName() { - return tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - @Override - public String toString() { - return "{" + - "columnGuid='" + columnGuid + '\'' + - ", foreignKeyName='" + foreignKeyName + '\'' + - ", columnName='" + columnName + '\'' + - ", tableName='" + tableName + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/GlossaryCategory.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/GlossaryCategory.java deleted file mode 100644 index 4a93a544547..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/GlossaryCategory.java +++ /dev/null @@ -1,43 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class GlossaryCategory { - - private String name; - private GlossaryCategory parentCategory; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public GlossaryCategory getParentCategory() { - return parentCategory; - } - - public void setParentCategory(GlossaryCategory parentCategory) { - this.parentCategory = parentCategory; - } - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - ", parentCategory=" + parentCategory + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/InformationViewHeader.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/InformationViewHeader.java deleted file mode 100644 index a1e10073658..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/InformationViewHeader.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = TableContextEvent.class, name = "TableContextEvent"), - @JsonSubTypes.Type(value = RegistrationRequestBody.class, name = "RegistrationRequestBody"), - @JsonSubTypes.Type(value = ReportRequestBody.class, name = "ReportRequestBody"), - @JsonSubTypes.Type(value = DataViewRequestBody.class, name = "DataViewRequestBody"), - @JsonSubTypes.Type(value = SemanticAssignment.class, name = "SemanticAssignment"), - @JsonSubTypes.Type(value = UpdatedEntityEvent.class, name = "UpdatedEntityEvent") -}) -public abstract class InformationViewHeader { - - private long eventVersionId = 1L; - - public long getEventVersionId() { - return eventVersionId; - } - - public void setEventVersionId(long eventVersionId) { - this.eventVersionId = eventVersionId; - } - - - @Override - public String toString() { - return "{" + - "eventVersionId=" + eventVersionId + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Paging.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Paging.java deleted file mode 100644 index d6458efa829..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Paging.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -public class Paging { - - private String total; - private String next; - private String pageSize; - private String end; - private String startFrom; - - public String getTotal() { - return total; - } - - public void setTotal(String total) { - this.total = total; - } - - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public String getPageSize() { - return pageSize; - } - - public void setPageSize(String pageSize) { - this.pageSize = pageSize; - } - - public String getEnd() { - return end; - } - - public void setEnd(String end) { - this.end = end; - } - - public String getStartFrom() { - return startFrom; - } - - public void setStartFrom(String startFrom) { - this.startFrom = startFrom; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/RegistrationRequestBody.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/RegistrationRequestBody.java deleted file mode 100644 index b70879c0d77..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/RegistrationRequestBody.java +++ /dev/null @@ -1,39 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class RegistrationRequestBody extends InformationViewHeader { - - @Valid - @NotNull - private SoftwareServerCapabilitySource softwareServerCapability; - - public SoftwareServerCapabilitySource getSoftwareServerCapability() { - return softwareServerCapability; - } - - public void setSoftwareServerCapability(SoftwareServerCapabilitySource softwareServerCapability) { - this.softwareServerCapability = softwareServerCapability; - } - - @Override - public String toString() { - return "{" + - "softwareServerCapability=" + softwareServerCapability + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumn.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumn.java deleted file mode 100644 index ad270335b98..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumn.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReportColumn extends ReportElement { - - private String aggregation; - private String formula; - private List sources; - private List businessTerms; - - public String getAggregation() { - return aggregation; - } - - public void setAggregation(String aggregation) { - this.aggregation = aggregation; - } - - public String getFormula() { - return formula; - } - - public void setFormula(String formula) { - this.formula = formula; - } - - public List getSources() { - return sources; - } - - public void setSources(List sources) { - this.sources = sources; - } - - public List getBusinessTerms() { - return businessTerms; - } - - public void setBusinessTerms(List businessTerms) { - this.businessTerms = businessTerms; - } - - @Override - public String toString() { - return "{" + - "aggregation='" + aggregation + '\'' + - ", formula='" + formula + '\'' + - ", sources=" + sources + - ", businessTerms=" + businessTerms + - ", name='" + name + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumnSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumnSource.java deleted file mode 100644 index 2faa2c973dd..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportColumnSource.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -public class ReportColumnSource extends Source { - - private String name; - private ReportSectionSource parentReportSection; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ReportSectionSource getParentReportSection() { - return parentReportSection; - } - - public void setParentReportSection(ReportSectionSource parentReportSection) { - this.parentReportSection = parentReportSection; - } - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - '}'; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportElement.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportElement.java deleted file mode 100644 index 3a65996ace5..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportElement.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import javax.validation.constraints.NotBlank; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = ReportSection.class, name = "ReportSection"), - @JsonSubTypes.Type(value = ReportColumn.class, name = "ReportColumn"), - -}) -public abstract class ReportElement { - - @NotBlank - protected String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportRequestBody.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportRequestBody.java deleted file mode 100644 index bbc02dbadc6..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportRequestBody.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReportRequestBody extends InformationViewHeader { - - @Valid - @NotNull - private DeployedReport report; - private String registrationGuid; - private String registrationQualifiedName; - - public DeployedReport getReport() { - return report; - } - - public void setReport(DeployedReport report) { - this.report = report; - } - - public String getRegistrationGuid() { - return registrationGuid; - } - - public void setRegistrationGuid(String registrationGuid) { - this.registrationGuid = registrationGuid; - } - - - public String getRegistrationQualifiedName() { - return registrationQualifiedName; - } - - public void setRegistrationQualifiedName(String registrationQualifiedName) { - this.registrationQualifiedName = registrationQualifiedName; - } - - @Override - public String toString() { - return "{" + - "report=" + report + - ", registrationGuid='" + registrationGuid + '\'' + - ", registrationQualifiedName='" + registrationQualifiedName + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSection.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSection.java deleted file mode 100644 index 317ac17749c..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSection.java +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReportSection extends ReportElement{ - - private List elements; - - public List getElements() { - return elements; - } - - public void setElements(List elements) { - this.elements = elements; - } - - @Override - public String toString() { - return "{" + - "elements=" + elements + - ", name='" + name + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSectionSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSectionSource.java deleted file mode 100644 index 8519ef3a1d6..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSectionSource.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -public class ReportSectionSource extends Source { - - private ReportSource reportSource; - private ReportSectionSource parentReportSection; - private String name; - - public ReportSource getReportSource() { - return reportSource; - } - - public void setReportSource(ReportSource reportSource) { - this.reportSource = reportSource; - } - - public ReportSectionSource getParentReportSection() { - return parentReportSection; - } - - public void setParentReportSection(ReportSectionSource parentReportSection) { - this.parentReportSection = parentReportSection; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "{" + - "reportSource=" + reportSource + - ", parentReportSection=" + parentReportSection + - ", name='" + name + '\'' + - ", additionalProperties=" + additionalProperties + - ", qualifiedName='" + qualifiedName + '\'' + - ", guid='" + guid + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSource.java deleted file mode 100644 index 3d1f362bd51..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/ReportSource.java +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -public class ReportSource extends Source { - - private EndpointSource endpointSource; - private String reportId; - - public EndpointSource getEndpointSource() { - return endpointSource; - } - - public void setEndpointSource(EndpointSource endpointSource) { - this.endpointSource = endpointSource; - } - - public String getReportId() { - return reportId; - } - - public void setReportId(String reportId) { - this.reportId = reportId; - } - - @Override - public String toString() { - return "{" + - "endpointSource=" + endpointSource + - ", reportId='" + reportId + '\'' + - '}'; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SemanticAssignment.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SemanticAssignment.java deleted file mode 100644 index 399987a61ed..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SemanticAssignment.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -public class SemanticAssignment extends InformationViewHeader{ - - private TableColumn tableColumn; - private BusinessTerm businessTerm; - - public BusinessTerm getBusinessTerm() { - return businessTerm; - } - - public void setBusinessTerm(BusinessTerm businessTerm) { - this.businessTerm = businessTerm; - } - - public TableColumn getTableColumn() { - return tableColumn; - } - - public void setTableColumn(TableColumn tableColumn) { - this.tableColumn = tableColumn; - } - - @Override - public String toString() { - return "{" + - "businessTerm=" + businessTerm + - ", tableColumn=" + tableColumn + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SoftwareServerCapabilitySource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SoftwareServerCapabilitySource.java deleted file mode 100644 index 688086c4b1c..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/SoftwareServerCapabilitySource.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -public class SoftwareServerCapabilitySource extends Source{ - - private String name; - private String description; - private String type; - private String version; - private String source; - private String patchLevel; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } - - public String getPatchLevel() { - return patchLevel; - } - - public void setPatchLevel(String patchLevel) { - this.patchLevel = patchLevel; - } - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", type='" + type + '\'' + - ", version='" + version + '\'' + - ", source='" + source + '\'' + - ", patchLevel='" + patchLevel + '\'' + - '}'; - } - - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Source.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Source.java deleted file mode 100644 index fab79ca2a3c..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/Source.java +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIdentityInfo; -import com.fasterxml.jackson.annotation.JsonIdentityReference; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; - -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = EndpointSource.class, name = "EndpointSource"), - @JsonSubTypes.Type(value = TableSource.class, name = "TableSource"), - @JsonSubTypes.Type(value = DatabaseColumnSource.class, name = "DatabaseColumnSource"), - @JsonSubTypes.Type(value = ReportColumnSource.class, name = "ReportColumnSource"), - @JsonSubTypes.Type(value = ReportSection.class, name = "ReportSection"), - @JsonSubTypes.Type(value = ReportSectionSource.class, name = "ReportSectionSource"), - @JsonSubTypes.Type(value = DataViewSource.class, name = "DataViewSource"), - @JsonSubTypes.Type(value = DataViewColumnSource.class, name = "DataViewColumnSource"), - @JsonSubTypes.Type(value = DatabaseSource.class, name = "DatabaseSource"), - @JsonSubTypes.Type(value = SoftwareServerCapabilitySource.class, name = "SoftwareServerCapabilitySource")}) - -@JsonIdentityInfo(generator = ObjectIdGenerators.StringIdGenerator.class , property="guid") -@JsonIdentityReference -public abstract class Source { - - - protected Map additionalProperties; - protected String qualifiedName; - protected String guid; - - - public Map getAdditionalProperties() { - return additionalProperties; - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - public String getQualifiedName() { - return qualifiedName; - } - - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - - @Override - public String toString() { - return "{" + - "additionalProperties=" + additionalProperties + - ", qualifiedName='" + qualifiedName + '\'' + - ", guid='" + guid + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableColumn.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableColumn.java deleted file mode 100644 index fcadca9b729..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableColumn.java +++ /dev/null @@ -1,236 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class TableColumn { - - private String guid; - private String qualifiedName; - private String name; - private Integer position; - private String cardinality; - private String defaultValueOverride; - private String type; - private String primaryKeyName; - private List businessTerms; - private ForeignKey referencedColumn; - private boolean isUnique; - private boolean isPrimaryKey; - private boolean isNullable; - - - /** - * Return the name of the column - * - * @return name of the column - */ - public String getName() { - return name; - } - - /** - * set up the name of the column - * - * @param name - name of the column - */ - public void setName(String name) { - this.name = name; - } - - /** - * Return the position of the column - * - * @return position of the column - */ - public Integer getPosition() { - return position; - } - - /** - * set up the position of the column - * - * @param position - position of the column - */ - public void setPosition(Integer position) { - this.position = position; - } - - /** - * Return the cardinality of the column - * - * @return cardinality of the column - */ - public String getCardinality() { - return cardinality; - } - - /** - * set up the cardinality of the column - * - * @param cardinality - cardinality of the column - */ - public void setCardinality(String cardinality) { - this.cardinality = cardinality; - } - - /** - * Return the default value of the column - * - * @return default value of the column - */ - public String getDefaultValueOverride() { - return defaultValueOverride; - } - - /** - * set up the default value of the column - * - * @param defaultValueOverride - default value of the column - */ - public void setDefaultValueOverride(String defaultValueOverride) { - this.defaultValueOverride = defaultValueOverride; - } - - /** - * Return the business term associated to the column - * - * @return business term of the column - */ - public List getBusinessTerms() { - return businessTerms; - } - - /** - * set up the business term associated with the column - * - * @param businessTerms - business term linked to the column - */ - public void setBusinessTerms(List businessTerms) { - this.businessTerms = businessTerms; - } - - /** - * Return the guid of the column - * - * @return guid of the column - */ - public String getGuid() { - return guid; - } - - /** - * set up the giud of the column - * - * @param guid - guid of the column - */ - public void setGuid(String guid) { - this.guid = guid; - } - - public String getType() { - return type; - } - - /** - * set up the type of the column - * - * @param type - type of the column - */ - public void setType(String type) { - this.type = type; - } - - /** - * Return the qualified name of the column - * - * @return qualified name of the column - */ - public String getQualifiedName() { - return qualifiedName; - } - - /** - * set up the qualified name of the column - * - * @param qualifiedName - qualified name of the column - */ - public void setQualifiedName(String qualifiedName) { - this.qualifiedName = qualifiedName; - } - - public String getPrimaryKeyName() { - return primaryKeyName; - } - - public void setPrimaryKeyName(String primaryKeyName) { - this.primaryKeyName = primaryKeyName; - } - - public ForeignKey getReferencedColumn() { - return referencedColumn; - } - - public void setReferencedColumn(ForeignKey referencedColumn) { - this.referencedColumn = referencedColumn; - } - - @JsonProperty("isUnique") - public boolean isUnique() { - return isUnique; - } - - public void setUnique(boolean unique) { - isUnique = unique; - } - - @JsonProperty("isPrimaryKey") - public boolean isPrimaryKey() { - return isPrimaryKey; - } - - public void setPrimaryKey(boolean primaryKey) { - isPrimaryKey = primaryKey; - } - - @JsonProperty("isNullable") - public boolean isNullable() { - return isNullable; - } - - public void setNullable(boolean nullable) { - isNullable = nullable; - } - - @Override - public String toString() { - return "{" + - "guid='" + guid + '\'' + - ", qualifiedName='" + qualifiedName + '\'' + - ", name='" + name + '\'' + - ", position=" + position + - ", cardinality='" + cardinality + '\'' + - ", defaultValueOverride='" + defaultValueOverride + '\'' + - ", type='" + type + '\'' + - ", primaryKeyName='" + primaryKeyName + '\'' + - ", businessTerms=" + businessTerms + - ", referencedColumn=" + referencedColumn + - ", isUnique=" + isUnique + - ", isPrimaryKey=" + isPrimaryKey + - ", isNullable=" + isNullable + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableContextEvent.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableContextEvent.java deleted file mode 100644 index 9da0eae886d..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableContextEvent.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.ArrayList; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class TableContextEvent extends InformationViewHeader { - - private TableSource tableSource; - private List tableColumns = new ArrayList<>(); - private Paging paging; - - - /** - * Return the list of columns - * - * @return list of columns - */ - public List getTableColumns() { - return tableColumns; - } - - /** - * set up the column list of the table - * - * @param tableColumns - columns of the table - */ - public void setTableColumns(List tableColumns) { - this.tableColumns = tableColumns; - } - - public TableSource getTableSource() { - return tableSource; - } - - public void setTableSource(TableSource tableSource) { - this.tableSource = tableSource; - } - - @Override - public String toString() { - return "{" + - "tableSource=" + tableSource + - ", tableColumns=" + tableColumns + - '}'; - } -} - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableSource.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableSource.java deleted file mode 100644 index 1dae926e28c..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/TableSource.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class TableSource extends Source { - - private String name; - private String schemaName; - private DatabaseSource databaseSource; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getSchemaName() { - return schemaName; - } - - public void setSchemaName(String schemaName) { - this.schemaName = schemaName; - } - - - public DatabaseSource getDatabaseSource() { - return databaseSource; - } - - public void setDatabaseSource(DatabaseSource databaseSource) { - this.databaseSource = databaseSource; - } - - @Override - public String toString() { - return "{" + - "name='" + name + '\'' + - ", schemaName='" + schemaName + '\'' + - ", guid='" + guid + '\'' + - ", databaseSource=" + databaseSource + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/UpdatedEntityEvent.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/UpdatedEntityEvent.java deleted file mode 100644 index ee0267f2350..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/events/UpdatedEntityEvent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.events; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -public class UpdatedEntityEvent extends InformationViewHeader{ - - private String guid; - private InstanceType type; - private InstanceProperties oldProperties; - private InstanceProperties newProperties; - - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - public InstanceType getType() { - return type; - } - - public void setType(InstanceType type) { - this.type = type; - } - - public InstanceProperties getOldProperties() { - return oldProperties; - } - - public void setOldProperties(InstanceProperties oldProperties) { - this.oldProperties = oldProperties; - } - - public InstanceProperties getNewProperties() { - return newProperties; - } - - public void setNewProperties(InstanceProperties newProperties) { - this.newProperties = newProperties; - } - - @Override - public String toString() { - return "{" + - "guid='" + guid + '\'' + - ", type=" + type + - ", oldProperties=" + oldProperties + - ", newProperties=" + newProperties + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddEntityException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddEntityException.java deleted file mode 100644 index 43497d4152b..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddEntityException.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class AddEntityException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public AddEntityException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddRelationshipException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddRelationshipException.java deleted file mode 100644 index 01a7a040425..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/AddRelationshipException.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class AddRelationshipException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public AddRelationshipException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ContextLoadException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ContextLoadException.java deleted file mode 100644 index fcdfc120e11..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ContextLoadException.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class ContextLoadException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public ContextLoadException(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public ContextLoadException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DataViewCreationException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DataViewCreationException.java deleted file mode 100644 index 1018edf7b00..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DataViewCreationException.java +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - - -public class DataViewCreationException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - private String dataViewId; - - - - public DataViewCreationException(int httpCode, - String className, - String errorMessage, - String systemAction, - String userAction, - String dataViewId) { - super(httpCode, className, errorMessage, systemAction, userAction, null); - this.dataViewId = dataViewId; - } - - public DataViewCreationException(int httpCode, String className, String errorMessage, String systemAction, String userAction, Throwable throwable, String dataViewId) { - super(httpCode, className, errorMessage, systemAction, userAction, throwable); - this.dataViewId = dataViewId; - } - - public String getDataViewId() { - return dataViewId; - } - - public void setDataViewId(String dataViewId) { - this.dataViewId = dataViewId; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteEntityException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteEntityException.java deleted file mode 100644 index 3097d58d5b2..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteEntityException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class DeleteEntityException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public DeleteEntityException(String className, String errorMessage, String systemAction, String userAction, Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public DeleteEntityException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteRelationshipException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteRelationshipException.java deleted file mode 100644 index 96686efb5b5..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/DeleteRelationshipException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class DeleteRelationshipException extends InformationViewExceptionBase{ - - private static final long serialVersionUID = 1L; - - public DeleteRelationshipException(String className, String errorMessage, String systemAction, String userAction, Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public DeleteRelationshipException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/EntityNotFoundException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/EntityNotFoundException.java deleted file mode 100644 index ec6db6c19f8..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/EntityNotFoundException.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class EntityNotFoundException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public EntityNotFoundException(String className, String errorMessage, - String systemAction, String userAction, Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public EntityNotFoundException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IllegalUpdateException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IllegalUpdateException.java deleted file mode 100644 index e76202a57c0..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IllegalUpdateException.java +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class IllegalUpdateException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public IllegalUpdateException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectModelException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectModelException.java deleted file mode 100644 index dcd8cabe480..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectModelException.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class IncorrectModelException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public IncorrectModelException(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public IncorrectModelException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectTypeException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectTypeException.java deleted file mode 100644 index 0c41b4626ec..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/IncorrectTypeException.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class IncorrectTypeException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public IncorrectTypeException(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public IncorrectTypeException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/InformationViewExceptionBase.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/InformationViewExceptionBase.java deleted file mode 100644 index 29c2bc12dd5..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/InformationViewExceptionBase.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class InformationViewExceptionBase extends RuntimeException{ - - private static final long serialVersionUID = 1L; - - private int httpErrorCode; - private String reportingClassName; - private String reportedErrorMessage; - private String reportedSystemAction; - private String reportedUserAction; - private Throwable reportedCaughtException ; - - public InformationViewExceptionBase( - String className, - String errorMessage, - String systemAction, - String userAction, - Throwable caughtError) { - super(errorMessage, caughtError); - this.reportingClassName = className; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtException = caughtError; - } - - public InformationViewExceptionBase(int httpErrorCode, - String reportingClassName, - String reportedErrorMessage, - String reportedSystemAction, - String reportedUserAction, - Throwable reportedCaughtException) { - this.httpErrorCode = httpErrorCode; - this.reportingClassName = reportingClassName; - this.reportedErrorMessage = reportedErrorMessage; - this.reportedSystemAction = reportedSystemAction; - this.reportedUserAction = reportedUserAction; - this.reportedCaughtException = reportedCaughtException; - } - - public String getReportingClassName() { - return reportingClassName; - } - - public void setReportingClassName(String reportingClassName) { - this.reportingClassName = reportingClassName; - } - - public String getReportedErrorMessage() { - return reportedErrorMessage; - } - - public void setReportedErrorMessage(String reportedErrorMessage) { - this.reportedErrorMessage = reportedErrorMessage; - } - - public String getReportedSystemAction() { - return reportedSystemAction; - } - - public void setReportedSystemAction(String reportedSystemAction) { - this.reportedSystemAction = reportedSystemAction; - } - - public String getReportedUserAction() { - return reportedUserAction; - } - - public void setReportedUserAction(String reportedUserAction) { - this.reportedUserAction = reportedUserAction; - } - - public Throwable getReportedCaughtException() { - return reportedCaughtException; - } - - public void setReportedCaughtException(Throwable reportedCaughtException) { - this.reportedCaughtException = reportedCaughtException; - } - - public int getHttpErrorCode() { - return httpErrorCode; - } - - public void setHttpErrorCode(int httpErrorCode) { - this.httpErrorCode = httpErrorCode; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/MultipleEntitiesMatching.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/MultipleEntitiesMatching.java deleted file mode 100644 index 111429fa851..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/MultipleEntitiesMatching.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class MultipleEntitiesMatching extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public MultipleEntitiesMatching(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public MultipleEntitiesMatching(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoMatchingEntityException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoMatchingEntityException.java deleted file mode 100644 index 638f9a58f18..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoMatchingEntityException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class NoMatchingEntityException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public NoMatchingEntityException(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public NoMatchingEntityException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoRegistrationDetailsProvided.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoRegistrationDetailsProvided.java deleted file mode 100644 index 14623a77a40..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/NoRegistrationDetailsProvided.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class NoRegistrationDetailsProvided extends InformationViewExceptionBase{ - - private static final long serialVersionUID = 1L; - - public NoRegistrationDetailsProvided(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/PropertyServerException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/PropertyServerException.java deleted file mode 100644 index 5e4b8a62839..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/PropertyServerException.java +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -/** - * The PropertyServerException is thrown by the Information View OMAS when it is not able to communicate with the - * property server. - */ -public class PropertyServerException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - /** - * This is the typical constructor used for creating a PropertyServerException. - * - * @param className name of class reporting error - * @param errorMessage description of error - * @param systemAction actions of the system as a result of the error - * @param userAction instructions for correcting the error - */ - public PropertyServerException(String className, - String errorMessage, - String systemAction, - String userAction) { - super(503, className, errorMessage, systemAction, userAction, null); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RegistrationException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RegistrationException.java deleted file mode 100644 index 4072ca8aea9..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RegistrationException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class RegistrationException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public RegistrationException(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public RegistrationException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportElementCreationException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportElementCreationException.java deleted file mode 100644 index d8ccbc16dc4..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportElementCreationException.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class ReportElementCreationException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public ReportElementCreationException(String className, String errorMessage, String systemAction, - String userAction, Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public ReportElementCreationException(int httpErrorCode, String reportingClassName, - String reportedErrorMessage, String reportedSystemAction, - String reportedUserAction, Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportSubmitException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportSubmitException.java deleted file mode 100644 index 90f72e55beb..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/ReportSubmitException.java +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - - -public class ReportSubmitException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - private String reportName; - - public ReportSubmitException(int httpCode, - String className, - String errorMessage, - String systemAction, - String userAction, - Throwable throwable, - String reportName) { - super(httpCode, className, errorMessage, systemAction, userAction, throwable); - this.reportName = reportName; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveEntityException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveEntityException.java deleted file mode 100644 index 4412a2faeb9..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveEntityException.java +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class RetrieveEntityException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public RetrieveEntityException(String className, String errorMessage, String systemAction, String userAction, - Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public RetrieveEntityException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveRelationshipException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveRelationshipException.java deleted file mode 100644 index e5502d1004f..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/RetrieveRelationshipException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class RetrieveRelationshipException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public RetrieveRelationshipException(String className, String errorMessage, String systemAction, - String userAction, Throwable caughtError) { - super(className, errorMessage, systemAction, userAction, caughtError); - } - - public RetrieveRelationshipException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/SourceNotFoundException.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/SourceNotFoundException.java deleted file mode 100644 index 9dda9a94270..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/runtime/SourceNotFoundException.java +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime; - -public class SourceNotFoundException extends InformationViewExceptionBase { - - private static final long serialVersionUID = 1L; - - public SourceNotFoundException(int httpErrorCode, String reportingClassName, String reportedErrorMessage, - String reportedSystemAction, String reportedUserAction, - Throwable reportedCaughtException) { - super(httpErrorCode, reportingClassName, reportedErrorMessage, reportedSystemAction, reportedUserAction, - reportedCaughtException); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DataViewResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DataViewResponse.java deleted file mode 100644 index b71adaf9ed1..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DataViewResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import org.odpi.openmetadata.accessservices.informationview.events.DataView; - -public class DataViewResponse extends InformationViewOMASAPIResponse{ - - private DataView dataView; - - public DataView getDataView() { - return dataView; - } - - public void setDataView(DataView dataView) { - this.dataView = dataView; - } - - @Override - public String toString() { - return "{" + - "dataView=" + dataView + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DatabaseListResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DatabaseListResponse.java deleted file mode 100644 index 9139ecd01ee..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/DatabaseListResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseSource; - -import java.util.List; - -public class DatabaseListResponse extends InformationViewOMASAPIResponse{ - - private List databasesList; - - public List getDatabasesList() { - return databasesList; - } - - public void setDatabasesList(List databasesList) { - this.databasesList = databasesList; - } - - @Override - public String toString() { - return "{" + - "databasesList=" + databasesList + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/GuidResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/GuidResponse.java deleted file mode 100644 index f6456de4c01..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/GuidResponse.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -public class GuidResponse extends InformationViewOMASAPIResponse{ - - private String guid; - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - @Override - public String toString() { - return "GuidResponse{" + - "guid='" + guid + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/InformationViewOMASAPIResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/InformationViewOMASAPIResponse.java deleted file mode 100644 index ad560c9f296..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/InformationViewOMASAPIResponse.java +++ /dev/null @@ -1,98 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Map; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes - ({ - @JsonSubTypes.Type(value = VoidResponse.class, name = "VoidResponse"), - @JsonSubTypes.Type(value = DatabaseListResponse.class, name = "DatabaseListResponse"), - @JsonSubTypes.Type(value = TableListResponse.class, name = "TableListResponse"), - @JsonSubTypes.Type(value = TableColumnsResponse.class, name = "TableColumnsResponse"), - @JsonSubTypes.Type(value = RegistrationResponse.class, name = "RegistrationResponse"), - @JsonSubTypes.Type(value = ReportResponse.class, name = "ReportResponse") - }) -public class InformationViewOMASAPIResponse{ - - private int relatedHTTPCode = 200; - private String exceptionClassName = null; - private String exceptionErrorMessage = null; - private String exceptionSystemAction = null; - private String exceptionUserAction = null; - private Map exceptionProperties = null; - - public int getRelatedHTTPCode() { - return relatedHTTPCode; - } - - public void setRelatedHTTPCode(int relatedHTTPCode) { - this.relatedHTTPCode = relatedHTTPCode; - } - - public String getExceptionClassName() { - return exceptionClassName; - } - - public void setExceptionClassName(String exceptionClassName) { - this.exceptionClassName = exceptionClassName; - } - - public String getExceptionErrorMessage() { - return exceptionErrorMessage; - } - - public void setExceptionErrorMessage(String exceptionErrorMessage) { - this.exceptionErrorMessage = exceptionErrorMessage; - } - - public String getExceptionSystemAction() { - return exceptionSystemAction; - } - - public void setExceptionSystemAction(String exceptionSystemAction) { - this.exceptionSystemAction = exceptionSystemAction; - } - - public String getExceptionUserAction() { - return exceptionUserAction; - } - - public void setExceptionUserAction(String exceptionUserAction) { - this.exceptionUserAction = exceptionUserAction; - } - - public Map getExceptionProperties() { - return exceptionProperties; - } - - public void setExceptionProperties(Map exceptionProperties) { - this.exceptionProperties = exceptionProperties; - } - - @Override - public String toString() { - return "InformationViewOMASAPIResponse{" + - "relatedHTTPCode=" + relatedHTTPCode + - ", exceptionClassName='" + exceptionClassName + '\'' + - ", exceptionErrorMessage='" + exceptionErrorMessage + '\'' + - ", exceptionSystemAction='" + exceptionSystemAction + '\'' + - ", exceptionUserAction='" + exceptionUserAction + '\'' + - ", exceptionProperties=" + exceptionProperties + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/RegistrationResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/RegistrationResponse.java deleted file mode 100644 index 0e184c69e4a..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/RegistrationResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; - -public class RegistrationResponse extends InformationViewOMASAPIResponse { - - private SoftwareServerCapabilitySource softwareServerCapabilitySource; - - public SoftwareServerCapabilitySource getSoftwareServerCapabilitySource() { - return softwareServerCapabilitySource; - } - - public void setSoftwareServerCapabilitySource(SoftwareServerCapabilitySource softwareServerCapabilitySource) { - this.softwareServerCapabilitySource = softwareServerCapabilitySource; - } - - @Override - public String toString() { - return "{" + - "softwareServerCapabilitySource=" + softwareServerCapabilitySource + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/ReportResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/ReportResponse.java deleted file mode 100644 index 7340e4c44a8..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/ReportResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import org.odpi.openmetadata.accessservices.informationview.events.DeployedReport; - -public class ReportResponse extends InformationViewOMASAPIResponse{ - - private DeployedReport report; - - public DeployedReport getReport() { - return report; - } - - public void setReport(DeployedReport report) { - this.report = report; - } - - @Override - public String toString() { - return "{" + - "report=" + report + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableColumnsResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableColumnsResponse.java deleted file mode 100644 index 48c869b0efe..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableColumnsResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - - -import org.odpi.openmetadata.accessservices.informationview.events.TableColumn; - -import java.util.List; - -public class TableColumnsResponse extends InformationViewOMASAPIResponse{ - - private List tableColumns; - - public List getTableColumns() { - return tableColumns; - } - - public void setTableColumns(List tableColumns) { - this.tableColumns = tableColumns; - } - - @Override - public String toString() { - return "{" + - "tableColumns=" + tableColumns + - '}'; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableContextResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableContextResponse.java deleted file mode 100644 index bb2e4380b97..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableContextResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; - -import java.util.List; - -public class TableContextResponse extends InformationViewOMASAPIResponse{ - - private List tableContexts; - - public List getTableContexts() { - return tableContexts; - } - - public void setTableContexts(List tableContexts) { - this.tableContexts = tableContexts; - } - - @Override - public String toString() { - return "{" + - "tableContexts=" + tableContexts + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableListResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableListResponse.java deleted file mode 100644 index 666225a7c99..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/TableListResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import org.odpi.openmetadata.accessservices.informationview.events.TableSource; - -import java.util.List; - -public class TableListResponse extends InformationViewOMASAPIResponse{ - - private List tableList; - - - public List getTableList() { - return tableList; - } - - public void setTableList(List tableList) { - this.tableList = tableList; - } - - - @Override - public String toString() { - return "{" + - "tableList=" + tableList + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/VoidResponse.java b/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/VoidResponse.java deleted file mode 100644 index 9746b791b32..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-api/src/main/java/org/odpi/openmetadata/accessservices/informationview/responses/VoidResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.responses; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class VoidResponse extends InformationViewOMASAPIResponse{ - - public VoidResponse() { - } - - @Override - public String toString() { - return "VoidResponse{" + - "relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-client/README.md b/open-metadata-implementation/access-services/information-view/information-view-client/README.md deleted file mode 100644 index 7565ea5e530..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-client/README.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Information View Open Metadata Access Service (OMAS) Client - -The Information View OMAS supports a REST API for requests and an event-based -interface for asynchronous integration. This client -package provides language-specific client packages to make it easier -for data tools and applications to call these interfaces. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/information-view/information-view-client/build.gradle b/open-metadata-implementation/access-services/information-view/information-view-client/build.gradle deleted file mode 100644 index 46b2238941d..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-client/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -description = 'Information View OMAS Client' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-client/pom.xml b/open-metadata-implementation/access-services/information-view/information-view-client/pom.xml deleted file mode 100644 index 82514cb56be..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-client/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - information-view - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Information View OMAS Client - - Client library for the Information View Open Metadata Access Service (OMAS). - - - information-view-client - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/README.md b/open-metadata-implementation/access-services/information-view/information-view-server/README.md deleted file mode 100644 index b71a42d9570..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/README.md +++ /dev/null @@ -1,17 +0,0 @@ - - - -# Information View Open Metadata Access Service (OMAS) server-side implementation - - -The Information View OMAS server supports the server side implementation of the access service.This includes the - * interaction with the [administration services](../../../admin-services) for - registration, configuration, initialization and termination of the access service. - * interaction with the [repository services](../../../repository-services) to work with open metadata from the - [cohort](../../../repository-services/docs/open-metadata-repository-cohort.md). - * support for the access service's REST APIs and its related event management. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/build.gradle b/open-metadata-implementation/access-services/information-view/information-view-server/build.gradle deleted file mode 100644 index 788aa9a4341..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'commons-io:commons-io' - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation project(':open-metadata-implementation:admin-services:admin-services-registration') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:inmemory-repository-connector') - implementation 'org.springframework:spring-core' - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:access-services:information-view:information-view-api') - implementation 'org.apache.commons:commons-collections4' - testImplementation 'org.mockito:mockito-core' - testImplementation 'org.mockito:mockito-junit-jupiter' - testImplementation 'org.junit.jupiter:junit-jupiter-api' - testImplementation 'junit:junit' - testImplementation project(':open-metadata-implementation:repository-services:repository-services-implementation') - -} - -description = 'Information View OMAS Server-side' - -java { - withJavadocJar() -} - -test { - //TODO: Maven build is currently not running these failing tests - ignoreFailures = true -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-data-view.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-data-view.md deleted file mode 100644 index 04d85798394..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-data-view.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# Retrieve data view - -Retrieve data view submitted based on internal id of the view. - -``` - -GET {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/dataview?dataViewId= - -where dataViewId is the internal id of the view submitted by the external tool - - -Response containing the view details -VoidReponse with error message and status - -``` ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-registration.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-registration.md deleted file mode 100644 index 4a84c2d1923..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/lookup-registration.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# Lookup registration - -Lookup registration submitted by an external tool. - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/registration/lookup -``` - -```json -{ - "class": "RegistrationRequestBody", - "softwareServerCapability": { - "class": "SoftwareServerCapabilitySource", - "qualifiedName":"internal id" - } - } -``` - -`RegistrationResponse` - response containing the registration details or -`VoidReponse` with error message and status. - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/register-tool.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/register-tool.md deleted file mode 100644 index 58c27993dc2..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/register-tool.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# Register tool - -Register an external tool. - -``` - -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/register -``` - -```json -{ - "class": "RegistrationRequestBody", - "softwareServerCapability": { - "class": "SoftwareServerCapabilitySource", - "qualifiedName":"internal id", - "author": "owner-test", - "userId": "cognosToolId", - "lastModifiedTime": 1547838663347, - "lastModifier": "owner", - "name": "cognos reporting tool", - "version": "1", - "type": "reporting" - } -} -``` -RegistrationResponse for success containing details of the software server capability entity create or error response otherwise - -``` ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-database-tables.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-database-tables.md deleted file mode 100644 index 7ad1d04e196..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-database-tables.md +++ /dev/null @@ -1,37 +0,0 @@ - - - - -# Retrieve tables of a database - -Retrieve list of tables belonging to a database using pagination - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/databases/{databaseGUID}/tables?pageSize=10&startFrom=0 -``` - -`TableListResponse` response with list of tables from database or -`VoidResponse` with error message in case of error. - -Sample: - -```json -{ - "class": "TableListResponse", - "relatedHTTPCode": 200, - "tableList": [ - { - "class": "TableSource", - "@id": 1, - "guid": "b1c497ce.54bd3a08.0v9mgsb2t.fae21gd.ehu9t3.egljqf3hf176clmuugvlc", - "name": "EMPSALARYANALYSIS", - "schemaName": "DB2INST1" - } - ] -} -``` - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-databases.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-databases.md deleted file mode 100644 index 78532e1e309..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-databases.md +++ /dev/null @@ -1,100 +0,0 @@ - - - -# Retrieve databases - -Retrieve list of databases using pagination - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/databases?pageSize=10&startFrom=0 -``` - -`DatabaseListResponse` response containing list of databases or -`VoidResponse` with error message. - -Sample: - -```json -{ - "class": "DatabaseListResponse", - "relatedHTTPCode": 200, - "databasesList": [ - { - "class": "DatabaseSource", - "@id": 1, - "guid": "b1c497ce.6e83759b.0v9mgsb2t.fauo7tn.0vv57r.miqdq9fqjod6vnco6jfep", - "name": "EMPLSANL", - "endpointSource": { - "class": "EndpointSource", - "@id": 2, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - }, - { - "class": "DatabaseSource", - "@id": 3, - "guid": "b1c497ce.6e83759b.0v9mgnepg.2vq7cd4.m41j85.01dktrea2fingt8raol7l", - "name": "IADB", - "endpointSource": { - "class": "EndpointSource", - "@id": 4, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - }, - { - "class": "DatabaseSource", - "@id": 5, - "guid": "b1c497ce.6e83759b.0v9mgsb23.pajbvbk.bi4t6t.6bj8srpdi3ra2uo10pslq", - "name": "EMPLOYEE", - "endpointSource": { - "class": "EndpointSource", - "@id": 6, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - }, - { - "class": "DatabaseSource", - "@id": 7, - "guid": "b1c497ce.6e83759b.0v9mgsb1m.9vb8pg1.6dhnfn.eqf2drkck0l4nho3m500f", - "name": "LOCATION", - "endpointSource": { - "class": "EndpointSource", - "@id": 8, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - }, - { - "class": "DatabaseSource", - "@id": 9, - "guid": "b1c497ce.6e83759b.0v9mgsb39.qiqs969.3r3pjo.qbkl7gfvsu96q5ohpddb4", - "name": "PATIENT", - "endpointSource": { - "class": "EndpointSource", - "@id": 10, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - }, - { - "class": "DatabaseSource", - "@id": 11, - "guid": "b1c497ce.6e83759b.0v9mgsb2h.cgleq3j.tn4590.f6182m5pasm71v45do246", - "name": "COMPDIR", - "endpointSource": { - "class": "EndpointSource", - "@id": 12, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - } - ] -} -``` - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-columns.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-columns.md deleted file mode 100644 index 1c55b779a8e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-columns.md +++ /dev/null @@ -1,94 +0,0 @@ - - - -# Retrieve columns - -Retrieve columns of a table using pagination - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/tables/{tableGUID}/columns?pageSize=10&startFrom=0 -``` - -`TableColumnsResponse` response with list of columns of table from startFrom to startFrom + pageSize -`VoidResponse` with error message in case of error. - -Sample: - -```json -{ - "class": "TableColumnsResponse", - "relatedHTTPCode": 200, - "tableColumns": [ - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faunv1i.4jppgp.vcpqhhv5aub9uk5thtugp", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=STATE", - "name": "STATE", - "position": 20, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263phfe.hdcsrms.095jod.69a74ckl4hrfodcsgeu2d", - "name": "State", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=State" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadq4s6.5vn3hu.ehqs5908s76ig6cn8ho6g", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=EMPSTATUS", - "name": "EMPSTATUS", - "position": 4, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263pfrb.66t5p8c.jk5353.69k7s3u2do49odaavci58", - "name": "Employee Status", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Employee Status represents current various status that an employee could have. Possible values: 1=Student; 2=Temporary-Assignment; 3=Board-Advisor; 4=Sabbatical; 5=Executive; 6=Part-Time-Perm; 7=Full-Time-Perm; 8=Left; 9=Retired; 10=DIS", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Employee Status" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadoft6.jdu07h.62mt3l35mh6qmt0lcufbv", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=TAXP", - "name": "TAXP", - "position": 22, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263phg8.gdtncls.audklp.e6or1vj80e3j7mgaqignr", - "name": "Tax State", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Tax State" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faul2ce.qfu265.bepvic8n0615h13llbi6h", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=HDR", - "name": "HDR", - "position": 1, - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - } - ] -} -``` - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-context.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-context.md deleted file mode 100644 index e9559563e8c..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/retrieve-table-context.md +++ /dev/null @@ -1,156 +0,0 @@ - - - -# Retrieve full context of a table - -Retrieve table context: host, database name, schema name, table name, list of columns along with business terms assigned - -``` -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/tables/{tableGUID} -``` - -`VoidResponse` response with error status in case of error. - -Sample: - -```json -{ - "class": "TableContextResponse", - "relatedHTTPCode": 200, - "tableContexts": [ - { - "class": "TableContextEvent", - "eventVersionId": 1, - "tableSource": { - "class": "TableSource", - "@id": 1, - "guid": "b1c497ce.54bd3a08.0v9mgsb2t.fae21gd.ehu9t3.egljqf3hf176clmuugvlc", - "name": "EMPSALARYANALYSIS", - "schemaName": "DB2INST1", - "databaseSource": { - "class": "DatabaseSource", - "@id": 2, - "guid": "b1c497ce.6e83759b.0v9mgsb2t.fauo7tn.0vv57r.miqdq9fqjod6vnco6jfep", - "name": "EMPLSANL", - "endpointSource": { - "class": "EndpointSource", - "@id": 3, - "networkAddress": "{host}", - "connectorProviderName": "DB2Connector" - } - } - }, - "tableColumns": [ - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faunv1i.4jppgp.vcpqhhv5aub9uk5thtugp", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=STATE", - "name": "STATE", - "position": 20, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263phfe.hdcsrms.095jod.69a74ckl4hrfodcsgeu2d", - "name": "State", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=State" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadq4s6.5vn3hu.ehqs5908s76ig6cn8ho6g", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=EMPSTATUS", - "name": "EMPSTATUS", - "position": 4, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263pfrb.66t5p8c.jk5353.69k7s3u2do49odaavci58", - "name": "Employee Status", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Employee Status represents current various status that an employee could have. Possible values: 1=Student; 2=Temporary-Assignment; 3=Board-Advisor; 4=Sabbatical; 5=Executive; 6=Part-Time-Perm; 7=Full-Time-Perm; 8=Left; 9=Retired; 10=DIS", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Employee Status" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadoft6.jdu07h.62mt3l35mh6qmt0lcufbv", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=TAXP", - "name": "TAXP", - "position": 22, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263phg8.gdtncls.audklp.e6or1vj80e3j7mgaqignr", - "name": "Tax State", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Tax State" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadue7h.1773qq.bgf1nnglkv2j42jlnrs7o", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=BONUS", - "name": "BONUS", - "position": 16, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263ph59.aqte17n.28ed5t.81mkudrsucorsqicli64s", - "name": "Discretionary Bonus", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Discretionary Bonus" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fauqp0r.jqrvpc.6bo5obcmp33g86iegdc0l", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=STREET", - "name": "STREET", - "position": 18, - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263ph63.beh4unk.9jn1qm.db96h9bqgj8gkjoj7qhh6", - "name": "Street", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Street" - }], - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - }, - { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadn9e2.qq5dgo.t0gu7m9sucub1dns5u1ov", - "qualifiedName": "(host_(engine))={host}::(database)=EMPLSANL::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=SNUM", - "name": "SNUM", - "position": 17, - "isNullable": false, - "isUnique": false, - "isPrimaryKey": false - } - ] - } - ] -} -``` - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-data-view.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-data-view.md deleted file mode 100644 index fe89a8458ae..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-data-view.md +++ /dev/null @@ -1,85 +0,0 @@ - - - -# Submit a data view - -Create a data view as a view on top of other sources. - -``` - -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/dataview -``` -```json -{ - "author": "owner-test", - "class": "DataViewRequestBody", - "registrationGuid": "registrationGuid", - "dataView":{ - "elements": [ - { - "class": "DataViewTable", - "comment": null, - "description": null, - "elements": [ - { - "class": "DataViewColumn", - "columnGuid": "d0845613-749d-42ac-8f5c-c9c45f565687", - "comment": null, - "dataType": null, - "description": null, - "formula": "COUNTRYCODE", - "hidden": null, - "id": "EuroConversion.CountryCode", - "identifier": "CountryCode", - "label": "CountryCode", - "name": "CountryCode", - "nativeClass": "QueryItem", - "regularAggregate": "none", - "usage": "identifier", - "businessTerms":[{"guid":"6662c0f2.e1b1ec6c.00263pgul.jam2g2s.qlr9u8.b9ei1dc60fgnhvs533pvs"}] - }, - { - "class": "DataViewColumn", - "columnGuid": "9544f066-488a-448c-9537-65999f1dafab", - "comment": null, - "dataType": null, - "description": null, - "formula": "EUROMONTH", - "hidden": null, - "id": "EuroConversion._EuroMounth", - "identifier": "EuroMounth", - "label": "EuroMounth", - "name": "EuroMounth", - "nativeClass": "QueryItem", - "regularAggregate": "none", - "usage": "identifier" - } - ], - "id": "test._employee", - "label": "EuroConversion", - "name": "EuroConversion", - "nativeClass": "QuerySubject" - } - ], - "id": "i999911123", - "lastModifiedTime": 1547838663347, - "lastModifier": "owner", - "name": "test-module-test", - "nativeClass": "Module", - "networkAddress": null - } -} -``` - - -GuidResponse in case of success containing the guid of the view top level entity or error response in case of errors - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-report.md b/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-report.md deleted file mode 100644 index 01a98eb3246..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/docs/user/submit-report.md +++ /dev/null @@ -1,268 +0,0 @@ - - - -# Submit Report - -Submit the metadata representing a report. -Property "id" (as unique identifier on external tool side) in combination with address from report url are used to uniquely identify a report - -If no entity exists matching these properties, a new DeployedReport entity (along with underlying entities) is created. The registrationGuid is set on entityDetails as the identifier of the tool that created the report - -If there is an entity matching these properties, a check is made against the registrationGuid to amke sure only the owner tool can modify the report structure - -The payload contains the structure of the report and the metadata for underlying sources. - -Currently supported sources for a report are: - -* database column -* report column -* data view column - -The structure of the report is described by elements of type ReportElement. ReportElement can be of 2 types: -* ReportSection: used to describe the high level structure for a report. - - Supported properties are: - * name - * elements: other elements of type ReportSection or ReportColumn - The nesting level of sections is not restricted - -* ReportColumn - - Supported properties are: - * name: name for report column - * formula: formula applied on top of the column sources (if any) - * sources: underlying sources for the report column - - Supported sources are: - - * database column - - In order to identify the database column, following details are required: endpoint address, database name, schema name, table name and column name. - The bean to use to identify the referenced column is DatabaseColumnSource - * report column - - In order to identify the report column, following details are required: report id, full nested sections down to column level and column name. - The bean to use to identify the referenced column is ReportColumnSource - - Sample 2 is an example of using ReportColumnSource as source - * data view column - - The bean to use to identify the referenced column is DataViewColumnSource - Sample 3 is an example of using DataViewColumnSource - - * businessTerm: business term linked to the report column; - - One of the unique identifiers - guid or qualifiedName - is required to uniquely identify the business term - -``` - -POST {serverURLRoot}/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/report - -Sample 1 -{ - "class": "ReportRequestBody", - "registrationGuid": "registration-guid", - "report":{ - "sources": [ - { - "@id": "0", - "class": "TableSource", - "additionalProperties": { - "type": "live/import" - }, - "name": "EMPLOYEE", - "schemaName": "HR", - "databaseSource": { - "class": "DatabaseSource", - "name": "XE", - "endpointSource": { - "networkAddress": "host", - "protocol": "", - "class": "EndpointSource" - } - } - } - ], - "id": "report_uuid", - "createdTime": 1538988150715, - "author": "John Martin Winston", - "reportName": "TestReport", - "reportPath": "/reports/employee46.xml", - "reportUrl": "http://powerbi-server/reports/testReport", - "lastModifier": "John Martin", - "lastModifiedTime": 1538988150715, - "reportElements": [ - { - "class": "ReportSection", - "name": "section1", - "elements": [ - { - "class": "ReportSection", - "name": "section1.1", - "elements": [ - { - "class": "ReportColumn", - "name": "Full Name", - "formula": "concat", - "sources": [ - { - "class": "DatabaseColumnSource", - "tableSource": "0", - "name": "FNAME" - }, - { - "class": "DatabaseColumnSource", - "tableSource": "0", - "name": "LNAME" - } - ], - "businessTerms": [{ - "name": "Patient Full Name", - "guid": "UUID", - "qualifiedName": "businessTermQualifiedName", - }] - } - ] - } - ] - } - ] - } -} - -``` -``` -Sample 2 - -{ - "class": "ReportRequestBody", - "sources": [{ - "@id": "0", - "class": "ReportSectionSource", - "name": "section1.1", - "parentReportSection": { - "class": "ReportSectionSource", - "name": "section1", - "reportSource": { - "class": "ReportSource", - "reportId": "report_number_1200", - "networkAddress": "powerbi-server" - } - } - - } - ], - "id": "report_number_1201", - "createdTime": 1538988150715, - "author": "John Martin", - "reportName": "Employee1201", - "reportPath": "/reports/employee1201.xml", - "reportUrl": "http://powerbi-server/reports/rep1201", - "lastModifier": "John Martin", - "lastModifiedTime": 1538988150715, - "reportElements": [{ - "class": "ReportSection", - "name": "section1", - "elements": [{ - "class": "ReportSection", - "name": "section1.1", - "elements": [{ - "class": "ReportColumn", - "name": "Full Name derived from report", - "formula": "concat", - "sources": [{ - "class": "ReportColumnSource", - "guid": "774c8b42-f805-4c8a-a320-68dcf936f0d1" - } - ], - "businessTerms": [{ - "guid": "6662c0f2.e1b1ec6c.00263shk7.8vmg2e5.dt0tqp.fedhui18kd6cif3ro2ugd" - }] - }, { - "class": "ReportColumn", - "name": "Role of the employee derived from report", - "formula": "upper", - "sources": [{ - "class": "ReportColumnSource", - "parentReportSection": "0", - "name": "Role of the employee" - } - ] - } - ] - } - ] - } - ] -} - -``` - -``` -Sample 3 -{ - "class": "ReportRequestBody", - "sources": [ - { - "@id": "0", - "class": "DataViewSource", - "networkAddress": "address", - "id": "unique identifier for data view on external tool side" - } - ], - "id": "report_number_1500", - "createdTime": 1538988150715, - "author": "John Martin tesssst", - "reportName": "Employee based on data module", - "reportPath": "/reports/employee1500.xml", - "reportUrl": "http://cognos/reports/rep1500", - "lastModifier": "Paul Martin", - "lastModifiedTime": 1538988150715, - "reportElements": [ - { - "class": "ReportSection", - "name": "Page1", - "elements": [ - { - "class": "ReportColumn", - "name": "Dept name - Job Level", - "formula": "concat", - "sources": [ - { - "class": "DataViewColumnSource", - "dataViewSource": "0", - "id": "_EMPSALARYANALYSIS.Employee_Contract_Number" - } - ], - "businessTerms": [{ - "name": "Employee Contract Number", - "guid": "6662c0f2.e1b1ec6c.00263pfur.m0g2a5b.l5676h.5imorjcftp26mv2rr93bp" - }] - }, - { - "class": "ReportColumn", - "name": "Role of the employee", - "formula": "upper", - "sources": [ - { - "class": "DataViewColumnSource", - "dataViewSource": "0", - "id": "_EMPSALARYANALYSIS.Employee_Status" - } - ] - } - ] - } - ] -} - -GuidResponse in case of success containing the guid of the report top level entity or error response in case of errors - -``` ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/pom.xml b/open-metadata-implementation/access-services/information-view/information-view-server/pom.xml deleted file mode 100644 index 6625f0477e6..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - information-view - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Information View OMAS Server-side - - Server-side support for the Information View Open Metadata Access Service (OMAS). - - - information-view-server - - - - - commons-io - commons-io - - - - org.odpi.egeria - admin-services-api - - - - org.odpi.egeria - admin-services-registration - - - - org.odpi.egeria - open-connector-framework - - - - org.odpi.egeria - inmemory-repository-connector - - - - org.springframework - spring-core - - - - com.fasterxml.jackson.core - jackson-databind - - - - org.odpi.egeria - repository-services-apis - - - - org.slf4j - slf4j-api - - - - org.odpi.egeria - information-view-api - - - - org.mockito - mockito-core - test - - - - org.mockito - mockito-junit-jupiter - test - - - - org.junit.jupiter - junit-jupiter-api - test - - - - junit - junit - test - - - - org.odpi.egeria - repository-services-implementation - test - - - - org.apache.commons - commons-collections4 - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/admin/InformationViewAdmin.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/admin/InformationViewAdmin.java deleted file mode 100644 index b5e5fa703d7..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/admin/InformationViewAdmin.java +++ /dev/null @@ -1,324 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.admin; - - -import org.odpi.openmetadata.accessservices.informationview.auditlog.InformationViewAuditCode; -import org.odpi.openmetadata.accessservices.informationview.context.ContextBuilders; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.registration.RegistrationHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.DataViewHandler; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.reports.ReportHandler; -import org.odpi.openmetadata.accessservices.informationview.eventprocessor.EventPublisher; -import org.odpi.openmetadata.accessservices.informationview.listeners.InformationViewEnterpriseOmrsEventListener; -import org.odpi.openmetadata.accessservices.informationview.server.InformationViewServicesInstance; -import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceAdmin; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditingComponent; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSConfigErrorException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Map; - - -public class InformationViewAdmin extends AccessServiceAdmin -{ - - private static final Logger log = LoggerFactory.getLogger(InformationViewAdmin.class); - private OpenMetadataTopicConnector informationViewOutTopicConnector; - private OMRSAuditLog auditLog; - private String serverName = null; - private InformationViewServicesInstance instance = null; - - - /** - * Initialize the access service. - * - * @param accessServiceConfigurationProperties specific configuration properties for this access service. - * @param enterpriseOMRSTopicConnector connector for receiving OMRS Events from the cohorts - * @param enterpriseConnector connector for querying the cohort repositories - * @param auditLog audit log component for logging messages. - * @param serverUserName user id to use on OMRS calls where there is no end user. - * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. - */ - @Override - public void initialize(AccessServiceConfig accessServiceConfigurationProperties, OMRSTopicConnector enterpriseOMRSTopicConnector, OMRSRepositoryConnector enterpriseConnector, OMRSAuditLog auditLog, String serverUserName) throws OMAGConfigurationErrorException { - final String actionDescription = "initialize"; - InformationViewAuditCode auditCode; - - auditCode = InformationViewAuditCode.SERVICE_INITIALIZING; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - this.auditLog = auditLog; - - if (enterpriseConnector != null) - { - serverName = enterpriseConnector.getServerName(); - } - - String outTopicName = getTopicName(accessServiceConfigurationProperties.getAccessServiceOutTopic()); - informationViewOutTopicConnector = initializeInformationViewTopicConnector(accessServiceConfigurationProperties.getAccessServiceOutTopic()); - List supportedZones = this.extractSupportedZones(accessServiceConfigurationProperties.getAccessServiceOptions()); - OMEntityDao omEntityDao = new OMEntityDao(enterpriseConnector, supportedZones, auditLog); - - EventPublisher eventPublisher = null; - if (enterpriseOMRSTopicConnector != null) { - auditCode = InformationViewAuditCode.SERVICE_REGISTERED_WITH_ENTERPRISE_TOPIC; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(serverName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - eventPublisher = new EventPublisher(informationViewOutTopicConnector, enterpriseConnector, supportedZones, auditLog); - InformationViewEnterpriseOmrsEventListener informationViewEnterpriseOmrsEventListener = new InformationViewEnterpriseOmrsEventListener(eventPublisher, auditLog); - enterpriseOMRSTopicConnector.registerListener(informationViewEnterpriseOmrsEventListener, accessServiceConfigurationProperties.getAccessServiceName()); - } - - if (informationViewOutTopicConnector != null) { - startConnector(InformationViewAuditCode.SERVICE_REGISTERED_WITH_IV_OUT_TOPIC, actionDescription, outTopicName, informationViewOutTopicConnector); - } - - LookupHelper lookupHelper = new LookupHelper(enterpriseConnector, omEntityDao, auditLog); - DataViewHandler dataViewHandler = new DataViewHandler(omEntityDao, lookupHelper, enterpriseConnector.getRepositoryHelper(), auditLog); - ReportHandler reportHandler = new ReportHandler(omEntityDao, lookupHelper, enterpriseConnector.getRepositoryHelper(), auditLog); - RegistrationHandler registrationHandler = new RegistrationHandler(omEntityDao, enterpriseConnector, auditLog); - ContextBuilders contextBuilders = new ContextBuilders(enterpriseConnector, omEntityDao, auditLog); - instance = new InformationViewServicesInstance(reportHandler, dataViewHandler, registrationHandler, contextBuilders, serverName); - - auditCode = InformationViewAuditCode.SERVICE_INITIALIZED; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(serverName), - accessServiceConfigurationProperties.toString(), - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - - private void startConnector(InformationViewAuditCode auditCode, String actionDescription, String topicName, OpenMetadataTopicConnector topicConnector) throws OMAGConfigurationErrorException { - - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(topicName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - - try { - topicConnector.start(); - } catch (ConnectorCheckedException e) { - auditCode = InformationViewAuditCode.ERROR_INITIALIZING_INFORMATION_VIEW_TOPIC_CONNECTION; - auditLog.logException(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(topicName, serverName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction(), - e); - throw new OMAGConfigurationErrorException(400, - InformationViewAdmin.class.getSimpleName(), - actionDescription, - auditCode.getFormattedLogMessage(), - auditCode.getSystemAction(), - auditCode.getUserAction(), - e); - } - } - - - - - /** - * Returns the topic created based on connection properties - * - * @param topicConnection properties of the topic - * @return the topic created based on the connection properties - */ - private OpenMetadataTopicConnector initializeInformationViewTopicConnector(Connection topicConnection) { - final String actionDescription = "initialize"; - if (topicConnection != null) { - try { - return getTopicConnector(topicConnection); - } catch (Exception e) { - InformationViewAuditCode auditCode = InformationViewAuditCode.ERROR_INITIALIZING_CONNECTION; - auditLog.logException(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(topicConnection.toString(), serverName, e.getMessage()), - topicConnection.toString(), - auditCode.getSystemAction(), - auditCode.getUserAction(), - e); - throw e; - } - - } - return null; - - } - - - /** - * Returns the connector created from topic connection properties - * - * @param topicConnection properties of the topic connection - * @return the connector created based on the topic connection properties - */ - private OpenMetadataTopicConnector getTopicConnector(Connection topicConnection) { - try { - ConnectorBroker connectorBroker = new ConnectorBroker(); - - OpenMetadataTopicConnector topicConnector = (OpenMetadataTopicConnector) connectorBroker.getConnector(topicConnection); - - topicConnector.setAuditLog(auditLog.createNewAuditLog(OMRSAuditingComponent.OPEN_METADATA_TOPIC_CONNECTOR)); - - return topicConnector; - } catch (Throwable error) { - String methodName = "getTopicConnector"; - - if (log.isDebugEnabled()) { - log.debug("Unable to create topic connector: " + error.toString()); - } - - InformationViewErrorCode errorCode = InformationViewErrorCode.NULL_TOPIC_CONNECTOR; - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage("getTopicConnector"); - - throw new OMRSConfigErrorException(errorCode.getHttpErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); - - } - } - - - private List extractSupportedZones(Map accessServiceOptions) throws OMAGConfigurationErrorException - { - final String methodName = "extractSupportedZones"; - InformationViewAuditCode auditCode; - - if (accessServiceOptions == null) - { - return null; - } - else - { - Object zoneListObject = accessServiceOptions.get(supportedZonesPropertyName); - - if (zoneListObject == null) - { - auditCode = InformationViewAuditCode.ALL_ZONES; - auditLog.logRecord(methodName, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - return null; - } - else - { - try - { - List zoneList = (List)zoneListObject; - - auditCode = InformationViewAuditCode.SUPPORTED_ZONES; - auditLog.logRecord(methodName, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(zoneList.toString()), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - return zoneList; - } - catch (Throwable error) - { - auditCode = InformationViewAuditCode.BAD_CONFIG; - auditLog.logRecord(methodName, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(zoneListObject.toString(), supportedZonesPropertyName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - InformationViewErrorCode errorCode = InformationViewErrorCode.BAD_CONFIG; - String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(zoneListObject.toString(), - supportedZonesPropertyName, - error.getClass().getName(), - error.getMessage()); - - throw new OMAGConfigurationErrorException(errorCode.getHttpErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - error); - } - } - } - } - - - - /** - * Shutdown the access service. - */ - public void shutdown() { - try { - informationViewOutTopicConnector.disconnect(); - } catch (ConnectorCheckedException e) { - log.error("Error disconnecting information view topic connector"); - } - - if (instance != null) - { - instance.shutdown(); - } - - final String actionDescription = "shutdown"; - InformationViewAuditCode auditCode; - - auditCode = InformationViewAuditCode.SERVICE_SHUTDOWN; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(serverName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/assets/DatabaseContextHandler.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/assets/DatabaseContextHandler.java deleted file mode 100644 index 712339e9d9a..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/assets/DatabaseContextHandler.java +++ /dev/null @@ -1,113 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.assets; - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.context.ColumnContextBuilder; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseSource; -import org.odpi.openmetadata.accessservices.informationview.events.TableColumn; -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.accessservices.informationview.events.TableSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.ContextLoadException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.EntityNotFoundException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.IncorrectModelException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.IncorrectTypeException; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -public class DatabaseContextHandler { - - - private static final Logger log = LoggerFactory.getLogger(DatabaseContextHandler.class); - private org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao; - private OMRSRepositoryHelper repositoryHelper; - private OMRSAuditLog auditLog; - private ColumnContextBuilder columnContextBuilder; - - public DatabaseContextHandler(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, - OMRSAuditLog auditLog) { - this.omEntityDao = omEntityDao; - this.repositoryHelper = enterpriseConnector.getRepositoryHelper(); - this.auditLog = auditLog; - this.columnContextBuilder = new ColumnContextBuilder(enterpriseConnector); - } - - public List getDatabases(int startFrom, int pageSize) { - // GDW - nothing to convert to regex here as the map is empty - InstanceProperties instanceProperties = omEntityDao.buildMatchingInstanceProperties(Collections.emptyMap(), true); - List entities = omEntityDao.findEntities(instanceProperties, Constants.DATABASE, startFrom, pageSize); - return buildDatabaseContext(entities); - } - - public List getTables(String databaseGuid, int startFrom, int pageSize) { - EntityDetail database = getEntity(databaseGuid, Constants.DATA_STORE); - return columnContextBuilder.getTablesForDatabase(database.getGUID(), startFrom, pageSize); - } - - public List getTableContext(String tableGuid) { - EntityDetail table = getEntity(tableGuid , Constants.RELATIONAL_TABLE); - List relationships = columnContextBuilder.getSchemaTypeRelationships(table, Constants.SCHEMA_ATTRIBUTE_TYPE, Constants.START_FROM, Constants.PAGE_SIZE); - if (relationships != null && !relationships.isEmpty()) { - return columnContextBuilder.getTableContext(relationships.get(0).getEntityTwoProxy().getGUID(), Constants.START_FROM, Constants.PAGE_SIZE); - } else { - throw new ContextLoadException(InformationViewErrorCode.RETRIEVE_CONTEXT_EXCEPTION.getHttpErrorCode(), DatabaseContextHandler.class.getName(), InformationViewErrorCode.RETRIEVE_CONTEXT_EXCEPTION.getFormattedErrorMessage(tableGuid, "Schema attribute type relationship doesn't exist"), InformationViewErrorCode.RETRIEVE_CONTEXT_EXCEPTION.getSystemAction(), InformationViewErrorCode.RETRIEVE_CONTEXT_EXCEPTION.getUserAction(), null); - } - } - - private List buildDatabaseContext(List entities) { - List databaseSources = Optional.ofNullable(entities).map(Collection::stream) - .orElseGet(Stream::empty) - .parallel() - .map(e -> { List contexts = columnContextBuilder.getDatabaseContext(e.getGUID()); - if(!CollectionUtils.isEmpty(contexts)){ - return contexts.get(0).getTableSource().getDatabaseSource(); - } - return null;}) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - return databaseSources; - } - - public List getTableColumns(String tableGuid, int startFrom, int pageSize) { - EntityDetail table = getEntity(tableGuid, Constants.RELATIONAL_TABLE); - List relationships; - - relationships = columnContextBuilder.getSchemaTypeRelationships(table, Constants.SCHEMA_ATTRIBUTE_TYPE, Constants.START_FROM, Constants.PAGE_SIZE); - if (relationships != null && !relationships.isEmpty()) { - return columnContextBuilder.getTableColumns(relationships.get(0).getEntityTwoProxy().getGUID(), startFrom, pageSize); - } - else{ - throw new IncorrectModelException(DatabaseContextHandler.class.getName(), - InformationViewErrorCode.INCORRECT_MODEL_EXCEPTION.getFormattedErrorMessage(tableGuid, "Table Schema Type is missing"), - InformationViewErrorCode.INCORRECT_MODEL_EXCEPTION.getSystemAction(), - InformationViewErrorCode.INCORRECT_MODEL_EXCEPTION.getUserAction(), null); - } - } - - private EntityDetail getEntity(String guid, String typeName) { - EntityDetail entityDetail = omEntityDao.getEntityByGuid(guid); - if (entityDetail == null) - throw new EntityNotFoundException(InformationViewErrorCode.ENTITY_NOT_FOUND_EXCEPTION.getHttpErrorCode(), DatabaseContextHandler.class.getName(), InformationViewErrorCode.ENTITY_NOT_FOUND_EXCEPTION.getFormattedErrorMessage(Constants.GUID, guid, typeName), InformationViewErrorCode.ENTITY_NOT_FOUND_EXCEPTION.getSystemAction(), InformationViewErrorCode.ENTITY_NOT_FOUND_EXCEPTION.getUserAction(), null); - if(!repositoryHelper.isTypeOf("lookupEntityByGuid", entityDetail.getType().getTypeDefName(), typeName)){ - throw new IncorrectTypeException(InformationViewErrorCode.INCORRECT_TYPE_EXCEPTION.getHttpErrorCode(), DatabaseContextHandler.class.getName(), InformationViewErrorCode.INCORRECT_TYPE_EXCEPTION.getFormattedErrorMessage(Constants.GUID, guid, typeName), InformationViewErrorCode.INCORRECT_TYPE_EXCEPTION.getSystemAction(), InformationViewErrorCode.INCORRECT_TYPE_EXCEPTION.getUserAction(), null); - } - return entityDetail; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/auditlog/InformationViewAuditCode.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/auditlog/InformationViewAuditCode.java deleted file mode 100644 index 8f9294c154c..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/auditlog/InformationViewAuditCode.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.auditlog; - - -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.text.MessageFormat; -import java.util.Arrays; - - -public enum InformationViewAuditCode { - - SERVICE_INITIALIZING("OMAS-INFORMATION-VIEW-0001", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) is initializing a new server instance", - "The local server has started up a new instance of the Information View OMAS.", - "No action is required. This is part of the normal operation of the server."), - - SERVICE_REGISTERED_WITH_ENTERPRISE_TOPIC("OMAS-INFORMATION-VIEW-0002", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) is registering a listener with the OMRS Topic for server {0}", - "The Information View OMAS is registering to receive events from the connected open metadata repositories.", - "No action is required. This is part of the normal operation of the server."), - - SERVICE_REGISTERED_WITH_IV_IN_TOPIC("OMAS-INFORMATION-VIEW-0003", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) is registering a listener with the Information View In topic {0}", - "The Information View OMAS is registering to receive incoming events from external tools and applications.", - "No action is required. This is part of the normal operation of the server."), - - SERVICE_REGISTERED_WITH_IV_OUT_TOPIC("OMAS-INFORMATION-VIEW-0004", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) is registering a publisher with the Information View Out topic {0}", - "The Information View OMAS is registering to publish events to Information View Out topic.", - "No action is required. This is part of the normal operation of the server."), - - SERVICE_INITIALIZED("OMAS-INFORMATION-VIEW-0005", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) has initialized a new instance for server {0}", - "The Information View OMAS has completed initialization.", - "No action is required. This is part of the normal operation of the server."), - - SERVICE_SHUTDOWN("OMAS-INFORMATION-VIEW-0006", - OMRSAuditLogRecordSeverity.SHUTDOWN, - "The Information View Open Metadata Access Service (OMAS) is shutting down server instance {0}", - "The local server has requested shut down of an Information View OMAS server instance.", - "No action is required. This is part of the normal operation of the server."), - - ERROR_INITIALIZING_CONNECTION("OMAS-INFORMATION-VIEW-0007", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Unable to initialize the Information View Open Metadata Access Service (OMAS) topic connection {0} for server instance {1}; error message was: {2}", - "The connection could not be initialized.", - "Review the exception and resolve the configuration. "), - - ERROR_INITIALIZING_INFORMATION_VIEW_TOPIC_CONNECTION("OMAS-INFORMATION-VIEW-0008", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Unable to initialize the connection to topic {0} in the Information View Open Metadata Access Service (OMAS) instance for server {1} ", - "The connection to information view topic could not be initialized.", - "Review the exception and resolve the configuration. "), - SUPPORTED_ZONES("OMAS-INFORMATION-VIEW-0009", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) is supporting the following governance zones {0}", - "The access service was passed a list of governance zones in the SupportedZones property of the access services options. " + - "This means it is only providing access to the Assets from these zone(s) and the new Assets will be visible only for these zone(s)", - "No action is required. This is part of the normal operation of the service."), - BAD_CONFIG("OMAS-INFORMATION-VIEW-0010", - OMRSAuditLogRecordSeverity.ERROR, - "The Information View Open Metadata Access Service (OMAS) has been passed an invalid value of {0} in the {1} property", - "The access service has not been passed valid configuration.", - "Correct the configuration and restart the service."), - ALL_ZONES("OMAS-INFORMATION-VIEW-0011", - OMRSAuditLogRecordSeverity.STARTUP, - "The Information View Open Metadata Access Service (OMAS) is supporting all governance zones", - "The access service has not been passed a list of governance zones in the SupportedZones property of the access services options. " + - "This means it is providing access to all Assets irrespective of the zone(s) they are located in and the created Assets can be accessed from any zone", - "No action is required. This is part of the normal operation of the service."), - NULL_OMRS_EVENT_RECEIVED("OMAS-INFORMATION-VIEW-9002", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Unable to process a received event from topic {0} because its content is null", - "The system is unable to process an incoming event.", - "This may be caused by an internal logic error or the receipt of an incompatible OMRSEvent, " + - "possibly from a later version of the OMRS protocol"), - - ; - - private static final Logger log = LoggerFactory.getLogger(InformationViewAuditCode.class); - private String logMessageId; - private OMRSAuditLogRecordSeverity severity; - private String logMessage; - private String systemAction; - private String userAction; - - InformationViewAuditCode(String logMessageId, OMRSAuditLogRecordSeverity severity, String logMessage, String systemAction, String userAction) { - this.logMessageId = logMessageId; - this.severity = severity; - this.logMessage = logMessage; - this.systemAction = systemAction; - this.userAction = userAction; - } - - - public String getLogMessageId() { - return logMessageId; - } - - public OMRSAuditLogRecordSeverity getSeverity() { - return severity; - } - - public String getLogMessage() { - return logMessage; - } - - public String getSystemAction() { - return systemAction; - } - - public String getUserAction() { - return userAction; - } - - public String getFormattedLogMessage(String... params) { - log.debug(String.format("<== OMRS Audit Code.getMessage(%s)", Arrays.toString(params))); - - String result = MessageFormat.format(logMessage, params); - - log.debug(String.format("==> OMRS Audit Code.getMessage(%s): %s", Arrays.toString(params), result)); - - return result; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityDao.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityDao.java deleted file mode 100644 index 25e911fa7ce..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityDao.java +++ /dev/null @@ -1,605 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.contentmanager; - - -import org.odpi.openmetadata.accessservices.informationview.reports.ReportBasicOperation; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.MatchCriteria; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; - -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildAddEntityRelationship; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildAddRelationshipException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildDeleteRelationshipException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildEntityNotFoundException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildIllegalUpdateEntityException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildRetrieveEntityException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildRetrieveRelationshipException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildUpdateEntityException; -import static org.odpi.openmetadata.accessservices.informationview.utils.Constants.PAGE_SIZE; - -public class OMEntityDao { - - private static final Logger log = LoggerFactory.getLogger(OMEntityDao.class); - private final OMRSRepositoryConnector enterpriseConnector; - private final OMRSAuditLog auditLog; - private List supportedZones; - - public OMEntityDao(OMRSRepositoryConnector enterpriseConnector, List supportedZones, OMRSAuditLog auditLog) { - this.enterpriseConnector = enterpriseConnector; - this.auditLog = auditLog; - this.supportedZones = supportedZones; - } - - /** - * Returns the newly created entity with the specified properties - * - * @param metadataCollectionId unique identifier for the metadata collection used for adding entities - * @param userName name of the user performing the add operation - * @param typeName of the entity type def - * @param instanceProperties specific to the entity - * @param zoneRestricted - * @return the new entity added to the metadata collection - * @throws ClassificationErrorException - * @throws StatusNotSupportedException - * @throws UserNotAuthorizedException - * @throws InvalidParameterException - * @throws RepositoryErrorException - * @throws PropertyErrorException - * @throws TypeErrorException - */ - private EntityDetail addEntity(String metadataCollectionId, - String userName, - String typeName, - InstanceProperties instanceProperties, - List classifications, - boolean zoneRestricted) throws ClassificationErrorException, StatusNotSupportedException, - UserNotAuthorizedException, InvalidParameterException, - RepositoryErrorException, PropertyErrorException, - TypeErrorException, FunctionNotSupportedException { - EntityDetail entity; - entity = enterpriseConnector.getRepositoryHelper().getSkeletonEntity(Constants.INFORMATION_VIEW_OMAS_NAME, - metadataCollectionId, - InstanceProvenanceType.LOCAL_COHORT, - userName, - typeName); - entity.setClassifications(classifications); - if(zoneRestricted && supportedZones != null && !supportedZones.isEmpty()){ - instanceProperties = enterpriseConnector.getRepositoryHelper().addStringArrayPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, instanceProperties, Constants.ZONE_MEMBERSHIP, supportedZones, "addEntity"); - } - return enterpriseConnector.getMetadataCollection().addEntity(userName, - entity.getType().getTypeDefGUID(), - instanceProperties, - entity.getClassifications(), - entity.getStatus()); - } - - /** - * Returns the newly created relationship between 2 entities with the specified properties - * - * @param metadataCollectionId unique identifier for the metadata collection used for adding relationships - * @param typeName name of the relationship type def - * @param instanceProperties properties for the relationship - * @param entityOneGUID giud of the first end of the relationship - * @param entityTwoGUID giud of the second end of the relationship - * @return the created relationship - */ - private Relationship addRelationship(String metadataCollectionId, - String typeName, - InstanceProperties instanceProperties, - String entityOneGUID, - String entityTwoGUID) { - - Relationship relationship = null; - try { - relationship = enterpriseConnector.getRepositoryHelper() - .getSkeletonRelationship(Constants.INFORMATION_VIEW_OMAS_NAME, - metadataCollectionId, - InstanceProvenanceType.LOCAL_COHORT, - Constants.INFORMATION_VIEW_USER_ID, - typeName); - return enterpriseConnector.getMetadataCollection() - .addRelationship(Constants.INFORMATION_VIEW_USER_ID, - relationship.getType().getTypeDefGUID(), - instanceProperties, - entityOneGUID, - entityTwoGUID, - InstanceStatus.ACTIVE); - } catch (StatusNotSupportedException | UserNotAuthorizedException | EntityNotKnownException | InvalidParameterException | RepositoryErrorException | PropertyErrorException | TypeErrorException | FunctionNotSupportedException e) { - throw buildAddRelationshipException(typeName, e.getMessage(), this.getClass().getName()); - } - } - - /** - * Returns the entity of the specified type retrieved based on qualified name - * - * @param typeName name of the type def for the entity to be retrieved - * @param qualifiedName qualified name property of the entity to be retrieved - * @param zoneRestricted - * @return the existing entity with the given qualified name or null if it doesn't exist - */ - public EntityDetail getEntity(String typeName, String qualifiedName, boolean zoneRestricted) { - Map properties = new HashMap<>(); - // GDW - need to convert qualifiedName to exactMatchRegex - String qualifiedNameRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(qualifiedName); - properties.put(Constants.QUALIFIED_NAME, qualifiedNameRegex); - InstanceProperties matchProperties = buildMatchingInstanceProperties(properties, zoneRestricted); - List existingEntities; - existingEntities = findEntities(matchProperties, typeName, Constants.START_FROM, PAGE_SIZE); - return checkEntities(existingEntities, qualifiedName); - } - - public List findEntities(InstanceProperties matchProperties, String typeName, int fromElement, int pageSize) { - // GDW the matchProperties passed to this method should have already converted any exact match string - // using the getExactMatchRegex repository helper method - OMRSRepositoryHelper repositoryHelper = enterpriseConnector.getRepositoryHelper(); - TypeDef typeDef = repositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeName); - List existingEntities; - try { - log.debug("Retrieving entities of type {} with properties {}", typeDef.getName(), matchProperties); - existingEntities = enterpriseConnector.getMetadataCollection().findEntitiesByProperty(Constants.INFORMATION_VIEW_USER_ID, - typeDef.getGUID(), - matchProperties, - MatchCriteria.ALL, - fromElement, - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - null, - SequencingOrder.ANY, - pageSize); - } catch (InvalidParameterException | PropertyErrorException | TypeErrorException | FunctionNotSupportedException | UserNotAuthorizedException | RepositoryErrorException | PagingErrorException e) { - String keys = String.join(",", matchProperties.getInstanceProperties().keySet()); - String values = matchProperties.getInstanceProperties().values().stream().map(InstancePropertyValue::valueAsString).collect(Collectors.joining(",")); - throw buildRetrieveEntityException(keys, values, e, this.getClass().getName()); - } - return existingEntities; - } - - - public EntityDetail getEntityByGuid(String guid) { - EntityDetail entity = null; - try { - entity = enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, guid); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - throw buildRetrieveEntityException(Constants.GUID, guid, e, this.getClass().getName()); - } - if(entity == null ) { - throw buildEntityNotFoundException(Constants.GUID, guid, null, this.getClass().getName()); - } - - return entity; - } - - /** - * Returns the entity filtered out from entities list based on qualified name - * - * @param existingEntities the list of entities to search in - * @param qualifiedName qualified name based on which the entity is retrieved - * @return the entity that has the specified qualified name - */ - private EntityDetail checkEntities(List existingEntities, String qualifiedName) { - if (!CollectionUtils.isEmpty(existingEntities)) - return existingEntities.stream().filter(e -> qualifiedName.equals(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, e.getProperties(), "checkEntities"))).findFirst().orElse(null); - return null; - } - - /** - * Returns the relationship of the given type between the 2 entities - * - * @param relationshipType is the name of the relationship type - * @param guid1 is guid of first end of relationship - * @param guid2 is guid of the second end f relationship - * @return the relationship of the given type between the two entities; null if it doesn't exist - */ - private Relationship checkRelationshipExists(String relationshipType, - String guid1, - String guid2) { - List relationships = getRelationships(relationshipType, guid2); - if (!CollectionUtils.isEmpty(relationships)){ - return relationships.stream().filter(relationship -> relationship.getType().getTypeDefName().equals(relationshipType) - && checkRelationshipEnds(relationship, guid1, guid2)).findFirst().orElse(null); - } - return null; - } - - public List getRelationships(String relationshipType, String guid) { - - if (log.isDebugEnabled()) { - log.debug("Retrieving relationships of type {} for entity {}", relationshipType, guid); - } - try { - String relationshipTypeGuid = enterpriseConnector.getRepositoryHelper() - .getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, relationshipType) - .getGUID(); - - return enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, - guid, - relationshipTypeGuid, - Constants.START_FROM, - Collections.singletonList(InstanceStatus.ACTIVE), - null, - null, - null, - PAGE_SIZE); - } catch (RepositoryErrorException | UserNotAuthorizedException | EntityNotKnownException | FunctionNotSupportedException | InvalidParameterException | PropertyErrorException | TypeErrorException | PagingErrorException e) { - throw buildRetrieveRelationshipException(guid, relationshipType, e, this.getClass().getName()); - } - } - - /** - * Returns true if the provided relationship is between the 2 specified entities - * - * @param relationship - the relationship instance to be checked - * @param guid1 is the guid of one end - * @param guid2 is the guid of the second end - * @return boolean - */ - private boolean checkRelationshipEnds(Relationship relationship, String guid1, String guid2) { - String end1Guid = relationship.getEntityOneProxy().getGUID(); - String end2Guid = relationship.getEntityTwoProxy().getGUID(); - return (end1Guid.equals(guid1) && end2Guid.equals(guid2)) || (end1Guid.equals(guid2) && end2Guid.equals(guid1)); - } - - /** - * Returns the entity of the given type with the specified qualified name; if it doesn't already exists, it is created with the provided instance properties - * - * @param typeName is the entity type - * @param qualifiedName - qualified name property of the entity, unique for the same entity type - * @param properties specific to the entity type - * @return the existing entity with the given qualified name or the newly created entity with the given qualified name - * @throws InvalidParameterException - * @throws PropertyErrorException - * @throws RepositoryErrorException - * @throws EntityNotKnownException - * @throws FunctionNotSupportedException - * @throws PagingErrorException - * @throws ClassificationErrorException - * @throws UserNotAuthorizedException - * @throws TypeErrorException - * @throws StatusNotSupportedException - */ - public EntityDetail addEntity(String typeName, - String qualifiedName, - InstanceProperties properties, - boolean zoneRestricted) throws InvalidParameterException, PropertyErrorException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, PagingErrorException, ClassificationErrorException, UserNotAuthorizedException, TypeErrorException, StatusNotSupportedException { - return addEntity(typeName, qualifiedName, properties, null, zoneRestricted); - } - - - /** - * Returns the entity of the given type with the specified qualified name; if it doesn't already exists, it is created with the provided instance properties - * - * @param typeName is the entity type - * @param qualifiedName - qualified name property of the entity, unique for the same entity type - * @param properties specific to the entity type - * @param classifications classifications to be added to entity - * @param zoneRestricted - * @return the existing entity with the given qualified name or the newly created entity with the given qualified name - * @throws InvalidParameterException - * @throws StatusNotSupportedException - * @throws PropertyErrorException - * @throws EntityNotKnownException - * @throws TypeErrorException - * @throws FunctionNotSupportedException - * @throws PagingErrorException - * @throws ClassificationErrorException - * @throws UserNotAuthorizedException - * @throws RepositoryErrorException - */ - public EntityDetail addEntity(String typeName, - String qualifiedName, - InstanceProperties properties, - List classifications, - boolean zoneRestricted) throws InvalidParameterException, StatusNotSupportedException, PropertyErrorException, EntityNotKnownException, TypeErrorException, FunctionNotSupportedException, PagingErrorException, ClassificationErrorException, UserNotAuthorizedException, RepositoryErrorException { - - OMEntityWrapper wrapper = createOrUpdateEntity(typeName, - qualifiedName, - properties, - classifications, - false, - zoneRestricted); - return wrapper != null ? wrapper.getEntityDetail() : null; - } - - public OMEntityWrapper createOrUpdateEntity(String typeName, - String qualifiedName, - InstanceProperties properties, - List classifications, - boolean update, - boolean zoneRestricted) throws UserNotAuthorizedException, FunctionNotSupportedException, - InvalidParameterException, RepositoryErrorException, - PropertyErrorException, TypeErrorException, - PagingErrorException, ClassificationErrorException, - StatusNotSupportedException, EntityNotKnownException { - EntityDetail entityDetail; - OMEntityWrapper wrapper; - entityDetail = getEntity(typeName, qualifiedName, zoneRestricted); - if (entityDetail == null) { - entityDetail = addEntity("", Constants.INFORMATION_VIEW_USER_ID, typeName, properties, classifications, zoneRestricted); - log.debug("Entity with qualified name {} added", qualifiedName); - if(log.isDebugEnabled()) { - log.debug("Entity: {}", entityDetail); - } - wrapper = new OMEntityWrapper(entityDetail, OMEntityWrapper.EntityStatus.NEW); - } else { - log.debug("Entity with qualified name {} already exists", qualifiedName); - if(log.isDebugEnabled()) { - log.debug("Entity: {}", entityDetail); - } - if (update && !EntityPropertiesUtils.matchExactlyInstanceProperties(entityDetail.getProperties(), properties)) {//TODO should add validation - log.debug("Updating entity with qualified name {} ", qualifiedName); - entityDetail = updateEntity(entityDetail, Constants.INFORMATION_VIEW_USER_ID, properties, zoneRestricted); - wrapper = new OMEntityWrapper(entityDetail, OMEntityWrapper.EntityStatus.UPDATED); - } - else{ - wrapper = new OMEntityWrapper(entityDetail, OMEntityWrapper.EntityStatus.EXISTING); - } - - } - - return wrapper; - } - - public OMEntityWrapper createOrUpdateExternalEntity(String userId, - String typeName, - String qualifiedName, - String externalSourceGuid, - String externalSourceName, - InstanceProperties properties, - List classifications, - boolean update, - boolean zoneRestricted) { - EntityDetail entityDetail; - OMEntityWrapper wrapper; - entityDetail = getEntity(typeName, qualifiedName, zoneRestricted); - if (entityDetail == null) { - entityDetail = addExternalEntity(userId, typeName, qualifiedName, externalSourceGuid, externalSourceName, properties, classifications, zoneRestricted); - log.debug("Entity with qualified name {} added", qualifiedName); - if(log.isDebugEnabled()) { - log.debug("Entity: {}", entityDetail); - } - wrapper = new OMEntityWrapper(entityDetail, OMEntityWrapper.EntityStatus.NEW); - } else { - log.debug("Entity with qualified name {} already exists", qualifiedName); - if(log.isDebugEnabled()) { - log.debug("Entity: {}", entityDetail); - } - if (update && !EntityPropertiesUtils.matchExactlyInstanceProperties(entityDetail.getProperties(), properties)) {//TODO should add validation - log.debug("Updating entity with qualified name {} ", qualifiedName); - if(!externalSourceGuid.equals(entityDetail.getMetadataCollectionId())){ - throw buildIllegalUpdateEntityException(null, this.getClass().getName()); - } - entityDetail = updateEntity(entityDetail, userId, properties, zoneRestricted); - wrapper = new OMEntityWrapper(entityDetail, OMEntityWrapper.EntityStatus.UPDATED); - } - else{ - wrapper = new OMEntityWrapper(entityDetail, OMEntityWrapper.EntityStatus.EXISTING); - } - - } - - return wrapper; - } - - - - public EntityDetail addExternalEntity(String userId, - String typeName, - String qualifiedName, - String externalSourceGuid, - String externalSourceName, - InstanceProperties properties, - List classifications, - boolean zoneRestricted) { - TypeDef type = enterpriseConnector.getRepositoryHelper().getTypeDefByName(Constants.INFORMATION_VIEW_OMAS_NAME, typeName); - if(zoneRestricted && supportedZones != null && !supportedZones.isEmpty()){ - properties = enterpriseConnector.getRepositoryHelper().addStringArrayPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, properties, Constants.ZONE_MEMBERSHIP, supportedZones, "addEntity"); - } - properties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, properties, Constants.QUALIFIED_NAME, qualifiedName, "addEntity"); - - try { - return enterpriseConnector.getMetadataCollection().addExternalEntity(userId, - type.getGUID(), - externalSourceGuid, - externalSourceName, - properties, - classifications, - InstanceStatus.ACTIVE); - } catch (InvalidParameterException | RepositoryErrorException | TypeErrorException | PropertyErrorException | ClassificationErrorException | StatusNotSupportedException | FunctionNotSupportedException | UserNotAuthorizedException e) { - throw buildAddEntityRelationship(typeName, e, ReportBasicOperation.class.getName()); - } - } - - - - - private EntityDetail updateEntity(EntityDetail entityDetail, String userId, InstanceProperties instanceProperties, boolean zoneRestricted) { - //TODO add validation to new instance properties - if(zoneRestricted){ - instanceProperties = enterpriseConnector.getRepositoryHelper().addStringArrayPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, instanceProperties, Constants.ZONE_MEMBERSHIP, supportedZones, "addEntity"); - } - try { - entityDetail = enterpriseConnector.getMetadataCollection().updateEntityProperties(userId, entityDetail.getGUID(), instanceProperties); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | UserNotAuthorizedException | FunctionNotSupportedException e) { - throw buildUpdateEntityException(entityDetail.getGUID(), e, this.getClass().getName()); - } - return entityDetail; - } - - /** - * Returns the relationship of the given type with the specified qualified name; if it doesn't already exists, it is created with the provided instance properties - * - * @param relationshipType is the relationship type name - * @param guid1 first end of the relationship - * @param guid2 second end of the relationship - * @param instanceProperties specific to the relationship type - * @return the existing relationship with the given qualified name or the newly created relationship with the given qualified name - */ - public Relationship addRelationship(String relationshipType, - String guid1, - String guid2, - InstanceProperties instanceProperties) { - Relationship relationship = checkRelationshipExists(relationshipType, guid1, guid2); - if (relationship == null) { - relationship = addRelationship("", relationshipType, instanceProperties, guid1, guid2); - log.debug("Relationship {} added between: {} and {}", relationshipType, guid1, guid2); - if(log.isDebugEnabled()) { - log.debug("Relationship: {}", relationship); - } - } else { - log.debug("Relationship {} already exists between: {} and {}", relationshipType, guid1, guid2); - } - - return relationship; - } - - - public Relationship addExternalRelationship(String userId, - String relationshipType, - String externalSourceGuid, - String externalSourceName, - String guid1, - String guid2, - InstanceProperties instanceProperties) { - Relationship relationship = checkRelationshipExists(relationshipType, guid1, guid2); - if (relationship == null) { - relationship = addExternalRelationship(userId,"", relationshipType, externalSourceGuid, externalSourceName, instanceProperties, guid1, guid2 ); - log.debug("Relationship {} added between: {} and {}", relationshipType, guid1, guid2); - if(log.isDebugEnabled()) { - log.debug("Relationship: {}", relationship); - } - } else { - log.debug("Relationship {} already exists between: {} and {}", relationshipType, guid1, guid2); - } - - return relationship; - } - - private Relationship addExternalRelationship(String userId, - String metadataCollectionId, - String typeName, - String registrationGuid, - String registrationQualifiedName, - InstanceProperties instanceProperties, - String entityOneGUID, - String entityTwoGUID) { - - Relationship relationship = null; - try { - relationship = enterpriseConnector.getRepositoryHelper().getSkeletonRelationship(Constants.INFORMATION_VIEW_OMAS_NAME, - metadataCollectionId, - InstanceProvenanceType.LOCAL_COHORT, - Constants.INFORMATION_VIEW_USER_ID, - typeName); - return enterpriseConnector.getMetadataCollection().addExternalRelationship(userId, - relationship.getType().getTypeDefGUID(), - registrationGuid, - registrationQualifiedName, - instanceProperties, - entityOneGUID, - entityTwoGUID, - InstanceStatus.ACTIVE); - } catch (UserNotAuthorizedException | StatusNotSupportedException | RepositoryErrorException | TypeErrorException | EntityNotKnownException | InvalidParameterException | PropertyErrorException | FunctionNotSupportedException e) { - throw buildAddRelationshipException(typeName, e.getMessage(), this.getClass().getName()); - } - } - - - /** - * Returns the properties object for the given pair of key - value that can be used for retrieving - * - * @param properties - all properties to use for matching - * @param zoneRestricted - * @return properties with the given key - value pair - */ - public InstanceProperties buildMatchingInstanceProperties(Map properties, boolean zoneRestricted) { - InstanceProperties instanceProperties = new InstanceProperties(); - if(properties != null && properties.size() > 0) { - for(Map.Entry entry : properties.entrySet()){ - instanceProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, instanceProperties, entry.getKey(), entry.getValue(), "throw buildMatchingInstanceProperties"); - } - } - if(zoneRestricted && supportedZones != null && !supportedZones.isEmpty()){ - instanceProperties = enterpriseConnector.getRepositoryHelper().addStringArrayPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, instanceProperties, Constants.ZONE_MEMBERSHIP, supportedZones, "throw buildMatchingInstanceProperties"); - } - - return instanceProperties; - } - - public void purgeRelationships(List relationship) { - Optional.ofNullable(relationship).map(Collection::stream) - .orElseGet(Stream::empty) - .forEach(this::purgeRelationship); - } - public void purgeRelationship(Relationship relationship) { - if (relationship == null || relationship.getGUID() == null || relationship.getType() == null) { - log.debug("Nothing will be purged, invalid relationship passed as argument: {}", relationship); - } else { - log.debug("Purge relationship with guid {}", relationship.getGUID()); - try { - enterpriseConnector.getMetadataCollection().deleteRelationship(Constants.INFORMATION_VIEW_USER_ID, relationship.getType().getTypeDefGUID(), relationship.getType().getTypeDefName(), relationship.getGUID()); - enterpriseConnector.getMetadataCollection().purgeRelationship(Constants.INFORMATION_VIEW_USER_ID, relationship.getType().getTypeDefGUID(), relationship.getType().getTypeDefName(), relationship.getGUID()); - } catch (InvalidParameterException | RepositoryErrorException | RelationshipNotDeletedException | UserNotAuthorizedException | FunctionNotSupportedException | RelationshipNotKnownException e) { - throw buildDeleteRelationshipException(relationship, e, this.getClass().getName()); - } - } - } - - public void purgeEntity(EntitySummary entitySummary) throws RepositoryErrorException, UserNotAuthorizedException, InvalidParameterException, EntityNotKnownException, EntityNotDeletedException, FunctionNotSupportedException { - if (entitySummary == null || entitySummary.getGUID() == null || entitySummary.getType() == null) { - log.debug("Nothing will be purged, invalid entity passed as argument: {}", entitySummary); - } else { - log.debug("Purge entity with guid {}", entitySummary.getGUID()); - enterpriseConnector.getMetadataCollection().deleteEntity(Constants.INFORMATION_VIEW_USER_ID, entitySummary.getType().getTypeDefGUID(), entitySummary.getType().getTypeDefName(), entitySummary.getGUID()); - enterpriseConnector.getMetadataCollection().purgeEntity(Constants.INFORMATION_VIEW_USER_ID, entitySummary.getType().getTypeDefGUID(), entitySummary.getType().getTypeDefName(), entitySummary.getGUID()); - } - } - - /** - * Return list of guids of entities linked through the mentioned relationship - * @param allEntitiesGuids - * @param relationshipType - * @param relationshipEndFunction - * @return list of related entities - */ - public List getRelatedEntities(List allEntitiesGuids, String relationshipType, Function relationshipEndFunction) { - List relatedEntities = allEntitiesGuids.stream().flatMap(e -> Optional.ofNullable(getRelationships(relationshipType, e)) - .map(Collection::stream) - .orElseGet(Stream::empty)).collect(Collectors.toList()); - return getEntityDetails(relatedEntities, relationshipEndFunction); - } - - - - public List getEntityDetails(List relationships, Function relationshipEndFunction ) { - Set allLinkedEntitiesGuids = Optional.ofNullable(relationships) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(relationshipEndFunction) - .collect(Collectors.toSet()); - return allLinkedEntitiesGuids.stream().map(this::getEntityByGuid).collect(Collectors.toList()); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityWrapper.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityWrapper.java deleted file mode 100644 index 4806c6ec030..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/contentmanager/OMEntityWrapper.java +++ /dev/null @@ -1,43 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.contentmanager; - - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -public class OMEntityWrapper { - - private EntityDetail entityDetail; - private EntityStatus entityStatus; - - - public OMEntityWrapper(EntityDetail entityDetail, EntityStatus entityStatus) { - this.entityDetail = entityDetail; - this.entityStatus = entityStatus; - } - - public EntityDetail getEntityDetail() { - return entityDetail; - } - - public void setEntityDetail(EntityDetail entityDetail) { - this.entityDetail = entityDetail; - } - - public EntityStatus getEntityStatus() { - return entityStatus; - } - - public void setEntityStatus(EntityStatus entityStatus) { - this.entityStatus = entityStatus; - } - - public enum EntityStatus { - NEW, - EXISTING, - UPDATED, - DELETED - - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ColumnContextBuilder.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ColumnContextBuilder.java deleted file mode 100644 index 834e137d4a9..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ColumnContextBuilder.java +++ /dev/null @@ -1,694 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.context; - - -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.informationview.events.*; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.ContextLoadException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.RetrieveEntityException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.RetrieveRelationshipException; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildRetrieveContextException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildRetrieveEntityException; - -/** - * ColumnContextBuilder loads the full context for a column from a relational table - */ -public class ColumnContextBuilder { - - private static final Logger log = LoggerFactory.getLogger(ColumnContextBuilder.class); - - private OMRSRepositoryConnector enterpriseConnector; - - private OMRSRepositoryHelper omrsRepositoryHelper; - - private static String BUILD_CONTEXT_METHOD_NAME = "buildContexts"; - - /** - * @param enterpriseConnector - combined connector for all repositories - */ - public ColumnContextBuilder(OMRSRepositoryConnector enterpriseConnector) { - this.enterpriseConnector = enterpriseConnector; - this.omrsRepositoryHelper = enterpriseConnector.getRepositoryHelper(); - } - - - /** - * Returns the list of columns contexts - * - * @param guidColumn of the relational column entity - * @return the list of full contexts for the column - */ - public List buildContexts(String guidColumn) { - List tableContexts = new ArrayList<>(); - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ATTRIBUTE_FOR_SCHEMA).getGUID(); - try { - for (Relationship relationship : - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, guidColumn, relationshipTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0)) { - tableContexts.addAll(getTableContext(relationship.getEntityOneProxy().getGUID(), Constants.START_FROM - , Constants.PAGE_SIZE)); - } - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - throw buildRetrieveContextException(guidColumn, e, ColumnContextBuilder.class.getName()); - } - if (log.isDebugEnabled()) { - log.debug("Context events: {}", tableContexts); - } - return tableContexts; - } - - - /** - * Returns the list of table contexts(database host details, database name, schema name, table name, list of - * columns) - * - * @param tableTypeGuid guid of the table type entity - * @param startFrom - * @param pageSize - * @return the list of contexts with table details populated - */ - public List getTableContext(String tableTypeGuid, int startFrom, int pageSize) { - if (log.isDebugEnabled()) { - log.debug("Load table type details for entity with guid {}", tableTypeGuid); - } - List tableContexts = new ArrayList<>(); - EntityDetail tableTypeDetail = null; - try { - tableTypeDetail = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - tableTypeGuid); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - InformationViewErrorCode code = InformationViewErrorCode.GET_ENTITY_EXCEPTION; - throw new RetrieveEntityException(code.getHttpErrorCode(), ColumnContextBuilder.class.getName(), - code.getFormattedErrorMessage(Constants.GUID, tableTypeGuid, e.getMessage()), - code.getSystemAction(), code.getUserAction(), e); - } - List columns = getTableColumns(tableTypeGuid, startFrom, pageSize); - List schemaAttributeTypeRelationships = getSchemaTypeRelationships(tableTypeDetail, - Constants.SCHEMA_ATTRIBUTE_TYPE, Constants.START_FROM, Constants.PAGE_SIZE); - - for (Relationship schemaAttributeTypeRelationship : schemaAttributeTypeRelationships) { - String tableGuid = schemaAttributeTypeRelationship.getEntityOneProxy().getGUID(); - EntityDetail tableEntity = null; - try { - tableEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, tableGuid); - String tableName = omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.ATTRIBUTE_NAME, tableEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME); - String attributeForSchemaTypeGuid = - omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ATTRIBUTE_FOR_SCHEMA).getGUID(); - - for (Relationship parentSchemaTypeRelationship : - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, tableEntity.getGUID(), attributeForSchemaTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0)) { - List events = - getDatabaseSchemaTypeContext(parentSchemaTypeRelationship.getEntityOneProxy().getGUID()); - tableContexts.addAll(events.stream().peek(e -> { - e.getTableSource().setName(tableName); - e.getTableSource().setGuid(tableGuid); - e.setTableColumns(columns); - }).collect(Collectors.toList())); - } - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException | PropertyErrorException | FunctionNotSupportedException | TypeErrorException | PagingErrorException e) { - InformationViewErrorCode code = InformationViewErrorCode.RETRIEVE_CONTEXT_EXCEPTION; - throw new ContextLoadException(code.getHttpErrorCode(), ColumnContextBuilder.class.getName(), - code.getFormattedErrorMessage(tableGuid, e.getMessage()), code.getSystemAction(), - code.getUserAction(), e); - } - } - return tableContexts; - } - - /** - * @param entityDetail - the entity based on which we want to retrieve schema type relationships - * @param schemaTypeRelationshipName - * @param startFrom - * @param pageSize - * @return - */ - public List getSchemaTypeRelationships(EntityDetail entityDetail, String schemaTypeRelationshipName - , int startFrom, int pageSize) { - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - schemaTypeRelationshipName).getGUID(); - try { - return enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, entityDetail.getGUID(), relationshipTypeGuid, startFrom, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, pageSize); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - InformationViewErrorCode code = InformationViewErrorCode.GET_RELATIONSHIP_EXCEPTION; - throw new RetrieveRelationshipException(code.getHttpErrorCode(), ColumnContextBuilder.class.getName(), - code.getFormattedErrorMessage(Constants.ATTRIBUTE_FOR_SCHEMA, entityDetail.getGUID(), - e.getMessage()), code.getSystemAction(), code.getUserAction(), e); - } - } - - /** - * Returns the list of columns for the specified table type; - * - * @param tableTypeGuid for which the columns are loaded - * @return the list of details of all columns of the table - */ - public List getTableColumns(String tableTypeGuid, int startFrom, int pageSize) { - if (log.isDebugEnabled()) { - log.debug("Load table columns for entity with guid {}", tableTypeGuid); - } - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ATTRIBUTE_FOR_SCHEMA).getGUID(); - - List allColumns = new ArrayList<>(); - List relationshipsToColumns; - try { - relationshipsToColumns = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, tableTypeGuid, relationshipTypeGuid, startFrom, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, pageSize); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - InformationViewErrorCode code = InformationViewErrorCode.GET_RELATIONSHIP_EXCEPTION; - throw new RetrieveRelationshipException(code.getHttpErrorCode(), ColumnContextBuilder.class.getName(), - code.getFormattedErrorMessage(Constants.ATTRIBUTE_FOR_SCHEMA, tableTypeGuid, e.getMessage()), - code.getSystemAction(), code.getUserAction(), e); - } - if (CollectionUtils.isNotEmpty(relationshipsToColumns)) { - allColumns.addAll(relationshipsToColumns.parallelStream().map(this::buildTableColumn).collect(Collectors.toList())); - } - return allColumns; - } - - private TableColumn buildTableColumn(Relationship tableTypeToColumns) { - try { - EntityDetail columnEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - tableTypeToColumns.getEntityTwoProxy().getGUID()); - TableColumn tableColumn = new TableColumn(); - tableColumn.setName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.ATTRIBUTE_NAME, columnEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - tableColumn.setPosition(omrsRepositoryHelper.getIntProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.ELEMENT_POSITION_NAME, columnEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - tableColumn.setGuid(columnEntity.getGUID()); - tableColumn.setBusinessTerms(getBusinessTermsAssociated(columnEntity)); - tableColumn.setPrimaryKeyName(getPrimaryKeyClassification(columnEntity)); - if (tableColumn.getPrimaryKeyName() != null && !tableColumn.getPrimaryKeyName().isEmpty()) { - tableColumn.setPrimaryKey(true); - } - tableColumn.setNullable(omrsRepositoryHelper.getBooleanProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.IS_NULLABLE, columnEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - tableColumn.setUnique(omrsRepositoryHelper.getBooleanProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.IS_UNIQUE, columnEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - tableColumn.setReferencedColumn(getReferencedColumn(columnEntity)); - - EntityDetail columnTypeUniverse = getColumnType(columnEntity); - tableColumn.setType(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.DATA_TYPE, columnTypeUniverse.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - tableColumn.setQualifiedName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.QUALIFIED_NAME, columnEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - return tableColumn; - } catch (EntityNotKnownException | UserNotAuthorizedException | EntityProxyOnlyException | InvalidParameterException | RepositoryErrorException e) { - throw buildRetrieveContextException(tableTypeToColumns.getEntityTwoProxy().getGUID(), e, this.getClass().getName()); - } - } - - private ForeignKey getReferencedColumn(EntityDetail columnEntity) { - if (log.isDebugEnabled()) { - log.debug("Load foreign keys for entity with guid {}", columnEntity.getGUID()); - } - List columnForeignKeys = getRelationships(Constants.FOREIGN_KEY, columnEntity.getGUID()); - if (CollectionUtils.isEmpty(columnForeignKeys)) { - return null; - } - - List foreignKeys = new ArrayList<>(); - for (Relationship relationship : columnForeignKeys) { - if (relationship.getEntityTwoProxy().getGUID().equals(columnEntity.getGUID())) { - EntityDetail foreignKeyEntity; - try { - foreignKeyEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, relationship.getEntityOneProxy().getGUID()); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - InformationViewErrorCode code = InformationViewErrorCode.GET_ENTITY_EXCEPTION; - throw new RetrieveEntityException(code.getHttpErrorCode(), ColumnContextBuilder.class.getName(), code.getFormattedErrorMessage(Constants.GUID, relationship.getEntityOneProxy().getGUID(), e.getMessage()), code.getSystemAction(), code.getUserAction(), e); - } - ForeignKey foreignKey = new ForeignKey(); - foreignKey.setColumnGuid(foreignKeyEntity.getGUID()); - foreignKey.setForeignKeyName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, relationship.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - foreignKey.setColumnName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, foreignKeyEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - List tablesForColumn = getTablesForColumn(foreignKeyEntity.getGUID()); - foreignKey.setTableName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, tablesForColumn.get(0).getProperties(), BUILD_CONTEXT_METHOD_NAME));//TODO - // should check for table from same database - foreignKeys.add(foreignKey); - } - } - - if (foreignKeys.size() == 1) { - return foreignKeys.get(0); - } - if (foreignKeys.size() > 1) { - String allReferencedColumns = foreignKeys.stream().map(ForeignKey::getColumnGuid).collect(Collectors.joining(", ")); - log.error("Column {} is referencing more than one column from another table: {}", columnEntity.getGUID(), - allReferencedColumns); - } - return null; - - } - - private List getRelationships(String relationshipTypeName, String guid) { - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - relationshipTypeName).getGUID(); - try { - return enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, - guid, - relationshipTypeGuid, - 0, - Arrays.asList(InstanceStatus.ACTIVE), - null, - null, - null, - 0); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - throw buildRetrieveEntityException(Constants.GUID, guid, e, this.getClass().getName()); - } - } - - public List getTablesForColumn(String columnEntityGuid) { - if (log.isDebugEnabled()) { - log.debug("Load table for column with guid {}", columnEntityGuid); - } - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ATTRIBUTE_FOR_SCHEMA).getGUID(); - Relationship columnToTableType; - try { - columnToTableType = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, columnEntityGuid, relationshipTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0).get(0); - EntityDetail tableTypeEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - columnToTableType.getEntityOneProxy().getGUID()); - relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.SCHEMA_ATTRIBUTE_TYPE).getGUID(); - - List relationshipToTable = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, tableTypeEntity.getGUID(), relationshipTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0); - return relationshipToTable.stream().map(r -> { - try { - return enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, r.getEntityOneProxy().getGUID()); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | UserNotAuthorizedException | EntityProxyOnlyException e) { - throw buildRetrieveEntityException(Constants.GUID, r.getGUID(), e, this.getClass().getName()); - } - }).collect(Collectors.toList()); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException | EntityProxyOnlyException e) { - throw buildRetrieveContextException(columnEntityGuid, e, this.getClass().getName()); - } - } - - /** - * @param databaseEntityGuid - guid of the database entity - * @param startFrom - index to start from - * @param pageSize - number of tables to return - * @return - */ - public List getTablesForDatabase(String databaseEntityGuid, int startFrom, int pageSize) { - if (log.isDebugEnabled()) { - log.debug("Load table for database with guid {}", databaseEntityGuid); - } - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.DATA_CONTENT_FOR_DATASET).getGUID(); - List databaseToDbSchemaRelationships; - try { - databaseToDbSchemaRelationships = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, databaseEntityGuid, relationshipTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0); - return databaseToDbSchemaRelationships.parallelStream() - .flatMap(r -> getTablesForSchema(r.getEntityTwoProxy().getGUID(), startFrom, pageSize).stream()) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - throw buildRetrieveContextException(databaseEntityGuid, e, this.getClass().getName()); - } - } - - - private List getTablesForSchema(String databaseSchemaGuid, int startFrom, int pageSize) { - try { - EntityDetail dbSchemaEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - databaseSchemaGuid); - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ASSET_SCHEMA_TYPE).getGUID(); - Relationship dbSchemaToSchemaType = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, dbSchemaEntity.getGUID(), relationshipTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0).get(0); - EntityDetail dbSchemaTypeEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - dbSchemaToSchemaType.getEntityTwoProxy().getGUID()); - String schemaName = omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.ATTRIBUTE_NAME, dbSchemaEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME); - - relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ATTRIBUTE_FOR_SCHEMA).getGUID(); - List dbSchemaTypeToTableRelationships = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, - dbSchemaTypeEntity.getGUID(), relationshipTypeGuid, startFrom, - Arrays.asList(InstanceStatus.ACTIVE), null, null, null, pageSize); - - return Optional.ofNullable(dbSchemaTypeToTableRelationships) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(r -> buildTableSource(schemaName, r)) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - } catch (UserNotAuthorizedException | EntityProxyOnlyException | RepositoryErrorException | PagingErrorException | TypeErrorException | EntityNotKnownException | InvalidParameterException | PropertyErrorException | FunctionNotSupportedException e) { - throw buildRetrieveEntityException(Constants.GUID, databaseSchemaGuid, e, this.getClass().getName()); - } - } - - private TableSource buildTableSource(String schemaName, Relationship relationship) { - String tableGuid = relationship.getEntityTwoProxy().getGUID(); - EntityDetail tableEntity; - try { - tableEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - tableGuid); - String tableName = omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.ATTRIBUTE_NAME, tableEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME); - TableSource tableSource = new TableSource(); - tableSource.setName(tableName); - tableSource.setGuid(tableGuid); - tableSource.setSchemaName(schemaName); - return tableSource; - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - log.error(InformationViewErrorCode.GET_ENTITY_EXCEPTION.getFormattedErrorMessage(), e); - return null; - } - } - - private String getPrimaryKeyClassification(EntityDetail columnEntity) { - if (columnEntity.getClassifications() == null || columnEntity.getClassifications().isEmpty()) { - return null; - } - Classification classification = columnEntity.getClassifications().stream() - .filter(e -> e.getName().equals(Constants.PRIMARY_KEY)) - .findFirst() - .orElse(null); - - return classification != null ? omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, classification.getProperties(), BUILD_CONTEXT_METHOD_NAME) : null; - } - - /** - * Returns the column type details for a given column - * - * @param columnEntity for which the type is retrieved - * @return the column type entity linked to column entity - */ - private EntityDetail getColumnType(EntityDetail columnEntity) { - if (log.isDebugEnabled()) { - log.debug("Load column type for entity with guid {}", columnEntity.getGUID()); - } - List columnToColumnType = getSchemaTypeRelationships(columnEntity, - Constants.SCHEMA_ATTRIBUTE_TYPE, Constants.START_FROM, Constants.PAGE_SIZE); - try { - return enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - columnToColumnType.get(0).getEntityOneProxy().getGUID()); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - throw buildRetrieveEntityException(Constants.GUID, columnEntity.getGUID(), e, this.getClass().getName()); - } - } - - /** - * Returns the business term associated with a column - * - * @param columnEntity for which business term is retrieved - * @return the business term associated to the column - */ - private List getBusinessTermsAssociated(EntityDetail columnEntity) { - if (log.isDebugEnabled()) { - log.debug("Load business term associated to column with guid {}", columnEntity.getGUID()); - } - List btRelationships = getRelationships(Constants.SEMANTIC_ASSIGNMENT, columnEntity.getGUID()); - if (btRelationships != null && !btRelationships.isEmpty()) { - return btRelationships.stream().map(btRelationship -> { - String businessTermGuid = btRelationship.getEntityTwoProxy().getGUID(); - EntityDetail btDetail; - try { - btDetail = enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, businessTermGuid); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - throw ExceptionHandler.buildRetrieveEntityException(Constants.GUID, businessTermGuid, e, this.getClass().getName()); - } - return buildBusinessTerm(btDetail); - }).collect(Collectors.toList()); - } - return Collections.emptyList(); - } - - /** - * Returns the lists of contexts populated with schema type details - * - * @param dbSchemaTypeGuid is the relationship between table and database schema type - * @return the list of contexts with DbSchemaType details populated - */ - private List getDatabaseSchemaTypeContext(String dbSchemaTypeGuid) { - if (log.isDebugEnabled()) { - log.debug("Load db schema type with guid {}", dbSchemaTypeGuid); - } - List tableContexts = new ArrayList<>(); - String assetSchemaTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.ASSET_SCHEMA_TYPE).getGUID(); - List relationships; - try { - relationships = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, dbSchemaTypeGuid, assetSchemaTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - InformationViewErrorCode code = InformationViewErrorCode.GET_RELATIONSHIP_EXCEPTION; - throw new RetrieveRelationshipException(code.getHttpErrorCode(), ColumnContextBuilder.class.getName(), - code.getFormattedErrorMessage(Constants.GUID, dbSchemaTypeGuid, Constants.ASSET_SCHEMA_TYPE, - e.getMessage()), code.getSystemAction(), code.getUserAction(), e); - } - if (log.isDebugEnabled()) { - log.debug("Loaded AssetSchemaType relationships for {}", dbSchemaTypeGuid); - } - for (Relationship relationship : relationships) { - List events = - getDeployedDatabaseSchemaContext(relationship.getEntityOneProxy().getGUID()); - tableContexts.addAll(events); - } - - return tableContexts; - } - - /** - * Returns the lists of contexts populated with schema details - * - * @param deployedDatabaseSchemaGuid guid of DeployedDatabaseSchema entity - * @return the list of contexts with deployed database schema details populated - */ - private List getDeployedDatabaseSchemaContext(String deployedDatabaseSchemaGuid) { - if (log.isDebugEnabled()) { - log.debug("Load deployed db schema with guid {}", deployedDatabaseSchemaGuid); - } - List allEvents = new ArrayList<>(); - EntityDetail deployedDatabaseSchemaEntity; - try { - deployedDatabaseSchemaEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - deployedDatabaseSchemaGuid); - InstanceProperties deployedDatabaseSchemaEntityProperties = deployedDatabaseSchemaEntity.getProperties(); - String schemaName = omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, deployedDatabaseSchemaEntityProperties, BUILD_CONTEXT_METHOD_NAME); - List dbRelationships = getRelationships(Constants.DATA_CONTENT_FOR_DATASET, - deployedDatabaseSchemaGuid); - for (Relationship relationship : dbRelationships) { - List events = getDatabaseContext(relationship.getEntityOneProxy().getGUID()); - allEvents.addAll(events.stream().peek(e -> e.getTableSource().setSchemaName(schemaName)).collect(Collectors.toList())); - } - return allEvents; - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - throw buildRetrieveContextException(deployedDatabaseSchemaGuid, e, this.getClass().getName()); - } - - } - - /** - * Returns the lists of contexts populated with database details - * - * @param databaseGuid guid of database entity - * @return the list of contexts with database details populated - */ - public List getDatabaseContext(String databaseGuid) { - if (log.isDebugEnabled()) { - log.debug("Load database details entity with guid {}", databaseGuid); - } - List allEvents = new ArrayList<>(); - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.CONNECTION_TO_ASSET).getGUID(); - InstanceProperties databaseEntityProperties; - try { - databaseEntityProperties = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - databaseGuid).getProperties(); - List relationships = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, databaseGuid, relationshipTypeGuid, 0, Arrays.asList(InstanceStatus.ACTIVE), null, null, null, 0); - if (CollectionUtils.isNotEmpty(relationships)) { - TableContextEvent event = getConnectionContext(relationships.get(0).getEntityOneProxy().getGUID()); - String databaseName = omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, databaseEntityProperties, BUILD_CONTEXT_METHOD_NAME); - event.getTableSource().getDatabaseSource().setName(databaseName); - event.getTableSource().getDatabaseSource().setGuid(databaseGuid); - allEvents.add(event); - } - - return allEvents; - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException | FunctionNotSupportedException | PropertyErrorException | TypeErrorException | PagingErrorException e) { - throw buildRetrieveContextException(databaseGuid, e, this.getClass().getName()); - } - } - - - /** - * Returns the lists of contexts populated with connection details - * - * @param connectionEntityGuid guid of connection entity - * @return the context with connection details populated - */ - public TableContextEvent getConnectionContext(String connectionEntityGuid) { - if (log.isDebugEnabled()) { - log.debug("Load connection details for entity with guid {}", connectionEntityGuid); - } - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.CONNECTION_TO_ENDPOINT).getGUID(); - Relationship relationshipToEndpoint = null; - try { - relationshipToEndpoint = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, - connectionEntityGuid, - relationshipTypeGuid, - 0, - Arrays.asList(InstanceStatus.ACTIVE), - null, - null, - null, - 0).get(0); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException e) { - throw buildRetrieveContextException(connectionEntityGuid, e, this.getClass().getName()); - } - TableContextEvent event = getEndpointDetails(relationshipToEndpoint.getEntityOneProxy().getGUID()); - EntityDetail connectorTypeEntity = getConnectorTypeProviderName(connectionEntityGuid); - event.getTableSource().getDatabaseSource().getEndpointSource().setConnectorProviderName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.CONNECTOR_PROVIDER_CLASSNAME, connectorTypeEntity.getProperties(), BUILD_CONTEXT_METHOD_NAME)); - return event; - } - - - /** - * Returns the connector provider entity linked to connection - * - * @param connectionEntityGuid for which to retrieve the connectorType entity - * @return the connectorType entity linked to connectionEntity - */ - private EntityDetail getConnectorTypeProviderName(String connectionEntityGuid) { - String relationshipTypeGuid = omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, - Constants.CONNECTION_CONNECTOR_TYPE).getGUID(); - Relationship relationshipToConnectorType; - try { - relationshipToConnectorType = - enterpriseConnector.getMetadataCollection().getRelationshipsForEntity(Constants.INFORMATION_VIEW_USER_ID, - connectionEntityGuid, - relationshipTypeGuid, - 0, - Arrays.asList(InstanceStatus.ACTIVE), - null, - null, - null, - 0).get(0); - return enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - relationshipToConnectorType.getEntityTwoProxy().getGUID()); - } catch (InvalidParameterException | TypeErrorException | RepositoryErrorException | EntityNotKnownException | PropertyErrorException | PagingErrorException | FunctionNotSupportedException | UserNotAuthorizedException | EntityProxyOnlyException e) { - throw buildRetrieveContextException(connectionEntityGuid, e, this.getClass().getName()); - } - } - - /** - * Returns the context populated with endpoint details - * - * @param endpointGuid - guid for endpoint - * @return the context with connection details populated - */ - private TableContextEvent getEndpointDetails(String endpointGuid) { - if (log.isDebugEnabled()) { - log.debug("Load endpoint details for entity with guid {}", endpointGuid); - } - String methodName = "getEndpointDetails"; - EntityDetail endpointEntity; - try { - endpointEntity = - enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, - endpointGuid); - } catch (InvalidParameterException | RepositoryErrorException | EntityNotKnownException | EntityProxyOnlyException | UserNotAuthorizedException e) { - throw buildRetrieveContextException(endpointGuid, e, this.getClass().getName()); - } - TableContextEvent tableContextEvent = new TableContextEvent(); - TableSource tableSource = new TableSource(); - tableContextEvent.setTableSource(tableSource); - String address = omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NETWORK_ADDRESS, endpointEntity.getProperties(), methodName); - DatabaseSource databaseSource = new DatabaseSource(); - EndpointSource endpointSource = new EndpointSource(); - databaseSource.setEndpointSource(endpointSource); - tableSource.setDatabaseSource(databaseSource); - endpointSource.setNetworkAddress(address); - endpointSource.setProtocol(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.PROTOCOL, endpointEntity.getProperties(), methodName)); - - return tableContextEvent; - } - - /** - * @param businessTermGuid guid of the business term for which we want to retrieve the linked columns - * @return list of columns assigned to the business term - */ - public List getAssignedColumns(String businessTermGuid) { - List entities = new ArrayList<>(); - List columnsAssigned = null; - columnsAssigned = getRelationships(Constants.SEMANTIC_ASSIGNMENT, businessTermGuid); - if (columnsAssigned != null && !columnsAssigned.isEmpty()) { - return columnsAssigned.stream() - .filter(r -> Constants.RELATIONAL_COLUMN.equals(r.getEntityOneProxy().getType().getTypeDefName())) - .map(Relationship::getEntityOneProxy) - .collect(Collectors.toList()); - } - return entities; - } - - - public BusinessTerm buildBusinessTerm(EntityDetail businessTermEntity) { - BusinessTerm businessTerm = new BusinessTerm(); - businessTerm.setGuid(businessTermEntity.getGUID()); - String methodName = "buildBusinessTerm"; - InstanceProperties properties = businessTermEntity.getProperties(); - businessTerm.setQualifiedName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.QUALIFIED_NAME, properties, methodName)); - businessTerm.setSummary(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.SUMMARY, properties, methodName)); - businessTerm.setName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.DISPLAY_NAME, properties, methodName)); - businessTerm.setExamples(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.EXAMPLES, properties, methodName)); - businessTerm.setAbbreviation(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.ABBREVIATION, properties, methodName)); - businessTerm.setQuery(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.QUERY, properties, methodName)); - businessTerm.setDescription(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.DESCRIPTION, properties, methodName)); - businessTerm.setUsage(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.USAGE, properties, methodName)); - return businessTerm; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilder.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilder.java deleted file mode 100644 index 82ea665dcf3..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilder.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.context; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.BusinessTerm; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseColumnSource; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Collection; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -public abstract class ContextBuilder { - - protected OMRSRepositoryConnector enterpriseConnector; - protected OMEntityDao entityDao; - protected OMRSAuditLog auditLog; - protected OMRSRepositoryHelper omrsRepositoryHelper; - - - public ContextBuilder(OMRSRepositoryConnector enterpriseConnector, OMEntityDao entityDao, OMRSAuditLog omrsAuditLog) { - this.enterpriseConnector = enterpriseConnector; - this.entityDao = entityDao; - this.omrsRepositoryHelper = enterpriseConnector.getRepositoryHelper(); - } - - /** - * Return the children elements linked with relationship ATTRIBUTE_FOR_SCHEMA to the entity with unique identifier guid - * - * @param guid - unique identifier for which we want to retrieve the children elements - * @return the list of children elements - */ - protected List getChildrenElements(String guid) { - List elementsRelationship; - elementsRelationship = entityDao.getRelationships(Constants.ATTRIBUTE_FOR_SCHEMA, guid); - - return Optional.ofNullable(elementsRelationship). - map(Collection::stream). - orElseGet(Stream::empty). - map(e -> buildElement(entityDao.getEntityByGuid(e.getEntityTwoProxy().getGUID()))). - collect(Collectors.toList()); - } - - abstract T buildElement(EntityDetail entity); - - - /** - * Return the business term associated to the entity - * - * @param entityGuid unique identifier of the entity for which we want to retrieve the business term - * @return bean describing the business term associated - */ - protected List getAssignedBusinessTerms(String entityGuid) { - List semanticAssignments = entityDao.getRelationships(Constants.SEMANTIC_ASSIGNMENT, entityGuid); - return Optional.ofNullable(semanticAssignments) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(r -> retrieveBusinessTerm(r.getEntityTwoProxy().getGUID())) - .collect(Collectors.toList()); - } - - private BusinessTerm retrieveBusinessTerm(String businessTermGuid) { - BusinessTerm businessTerm = new BusinessTerm(); - EntityDetail businessTermEntity = entityDao.getEntityByGuid(businessTermGuid); - - businessTerm.setGuid(businessTermGuid); - businessTerm.setName(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setSummary(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.SUMMARY, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setExamples(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.EXAMPLES, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setUsage(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.USAGE, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setQuery(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUERY, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setAbbreviation(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.ABBREVIATION, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setDescription(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.DESCRIPTION, businessTermEntity.getProperties(), "retrieveReport")); - businessTerm.setDisplayName(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.DISPLAY_NAME, businessTermEntity.getProperties(), "retrieveReport")); - return businessTerm; - } - - - /** - * Return the list of asset schema type - * - * @param guid - unique identifier of the entity representing an asset - * @return the list of asset schema type relationships linked to the entity - */ - protected List getAssetSchemaTypeRelationships(String guid) { - return entityDao.getRelationships(Constants.ASSET_SCHEMA_TYPE, guid); - } - - - protected List getSources(String guid) { - List relationships = entityDao.getRelationships(Constants.SCHEMA_QUERY_IMPLEMENTATION, guid); - List entities = Optional.ofNullable(relationships) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(r -> entityDao.getEntityByGuid(r.getEntityTwoProxy().getGUID())) - .collect(Collectors.toList()); - - List sources = Optional.ofNullable(entities) - .map(Collection::stream) - .orElseGet(Stream::empty) - .map(this::buildSource) - .collect(Collectors.toList()); - - return sources; - } - - protected Source buildSource(EntityDetail entityDetail) { - String methodName = "buildSource"; - if (omrsRepositoryHelper.isTypeOf(Constants.INFORMATION_VIEW_OMAS_NAME, entityDetail.getType().getTypeDefName(), Constants.RELATIONAL_COLUMN)) { - Source columnSource = new DatabaseColumnSource(); - columnSource.setGuid(entityDetail.getGUID()); - columnSource.setQualifiedName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, entityDetail.getProperties(), methodName)); - return columnSource; - } - return null; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilders.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilders.java deleted file mode 100644 index d92061e4caa..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ContextBuilders.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.context; - -import org.odpi.openmetadata.accessservices.informationview.assets.DatabaseContextHandler; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -public class ContextBuilders { - - private ReportContextBuilder reportContextBuilder; - private DatabaseContextHandler databaseContextHandler; - private DataViewContextBuilder dataViewContextBuilder; - - public ContextBuilders(OMRSRepositoryConnector enterpriseConnector, OMEntityDao entityDao, OMRSAuditLog auditLog){ - reportContextBuilder = new ReportContextBuilder(enterpriseConnector, entityDao, auditLog); - databaseContextHandler = new DatabaseContextHandler(enterpriseConnector, entityDao, auditLog ); - dataViewContextBuilder = new DataViewContextBuilder(enterpriseConnector, entityDao, auditLog); - } - - /** - * - * @return builder of report metadata representation - */ - public ReportContextBuilder getReportContextBuilder() { - return reportContextBuilder; - } - - public void setReportContextBuilder(ReportContextBuilder reportContextBuilder) { - this.reportContextBuilder = reportContextBuilder; - } - - /** - * - * @return builder of database metadata representation - */ - public DatabaseContextHandler getDatabaseContextHandler() { - return databaseContextHandler; - } - - public void setDatabaseContextHandler(DatabaseContextHandler databaseContextHandler) { - this.databaseContextHandler = databaseContextHandler; - } - - /** - * - * @return builder of data view metadata representation - */ - public DataViewContextBuilder getDataViewContextBuilder() { - return dataViewContextBuilder; - } - - public void setDataViewContextBuilder(DataViewContextBuilder dataViewContextBuilder) { - this.dataViewContextBuilder = dataViewContextBuilder; - } - - @Override - public String toString() { - return "{" + - "reportContextBuilder=" + reportContextBuilder + - ", databaseContextHandler=" + databaseContextHandler + - ", dataViewContextBuilder=" + dataViewContextBuilder + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/DataViewContextBuilder.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/DataViewContextBuilder.java deleted file mode 100644 index de5eab615b3..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/DataViewContextBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.context; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DataView; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewColumn; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewElement; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewSource; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewModel; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.lookup.DataViewLookup; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.springframework.util.CollectionUtils; - -import java.util.Date; -import java.util.List; -import java.util.Optional; - -public class DataViewContextBuilder extends ContextBuilder{ - - private DataViewLookup dataViewLookup; - - public DataViewContextBuilder(OMRSRepositoryConnector enterpriseConnector, OMEntityDao entityDao, OMRSAuditLog auditLog) { - super(enterpriseConnector, entityDao, auditLog); - this.dataViewLookup = new DataViewLookup(enterpriseConnector, entityDao,null, auditLog); - } - - - /** - * - * @param dataViewId - id of the data view to retrieve - * @return bean describing full structure of data view - */ - public DataView retrieveDataView(String dataViewId) { - DataViewSource source = new DataViewSource(); - source.setId(dataViewId); - EntityDetail dataViewEntity = Optional.ofNullable(dataViewLookup.lookupEntity(source)) - .orElseThrow(() -> ExceptionHandler.buildEntityNotFoundException(Constants.ID, dataViewId, Constants.INFORMATION_VIEW, this.getClass().getName())); - return buildDataView(dataViewEntity); - } - - /** - * - * @param dataViewEntity - entity describing the top level properties of the view - * @return - */ - private DataView buildDataView(EntityDetail dataViewEntity) { - DataView dataView = new DataView(); - dataView.setGuid(dataViewEntity.getGUID()); - dataView.setAuthor(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.AUTHOR, dataViewEntity.getProperties(), "retrieveDataView")); - dataView.setLastModifier(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.LAST_MODIFIER, dataViewEntity.getProperties(), "retrieveDataView")); - Date lastModifiedDate = enterpriseConnector.getRepositoryHelper().getDateProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.LAST_MODIFIED_TIME, dataViewEntity.getProperties(), "retrieveDataView"); - if(lastModifiedDate!=null) { - dataView.setLastModifiedTime(lastModifiedDate.getTime()); - } - Date createdTime = enterpriseConnector.getRepositoryHelper().getDateProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.CREATE_TIME, dataViewEntity.getProperties(), "retrieveDataView"); - if(createdTime!=null) { - dataView.setCreatedTime(createdTime.getTime()); - } - dataView.setId(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.ID, dataViewEntity.getProperties(), "retrieveDataView")); - dataView.setNativeClass(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NATIVE_CLASS, dataViewEntity.getProperties(), "retrieveDataView")); - dataView.setEndpointAddress(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NETWORK_ADDRESS, dataViewEntity.getProperties(), "retrieveDataView")); - dataView.setName(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, dataViewEntity.getProperties(), "retrieveDataView")); - - addDataViewStructure(dataView, dataViewEntity); - - return dataView; - } - - /** - * - * @param dataView bean representing the data view - * @param dataViewEntity entity describing the top level entity - */ - private void addDataViewStructure(DataView dataView, EntityDetail dataViewEntity) { - String dataViewGuid = dataViewEntity.getGUID(); - List relationships = getAssetSchemaTypeRelationships(dataViewGuid); - if(!CollectionUtils.isEmpty(relationships)) { - EntityProxy assetSchemaType = relationships.get(0).getEntityTwoProxy(); - dataView.setElements(getChildrenElements(assetSchemaType.getGUID())); - } - } - - - /** - * - * @param entityDetail entity describing the data view element - * @return - */ - DataViewElement buildElement(EntityDetail entityDetail) { - - String methodName = "buildElement"; - if (entityDetail.getType().getTypeDefName().equals(Constants.SCHEMA_ATTRIBUTE)) { - DataViewModel dataViewElement = new DataViewModel(); - dataViewElement.setName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, entityDetail.getProperties(), methodName)); - List schemaType = entityDao.getRelationships(Constants.SCHEMA_ATTRIBUTE_TYPE, - entityDetail.getGUID()); - if (!CollectionUtils.isEmpty(schemaType)) { - dataViewElement.setElements(getChildrenElements(schemaType.get(0).getEntityTwoProxy().getGUID())); - } - return dataViewElement; - } else { - DataViewColumn dataViewElement = new DataViewColumn(); - dataViewElement.setName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.NAME, entityDetail.getProperties(), methodName)); - dataViewElement.setUsage(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.USAGE, entityDetail.getProperties(), methodName)); - dataViewElement.setComment(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.COMMENT, entityDetail.getProperties(), methodName)); - dataViewElement.setRegularAggregate(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.AGGREGATING_FUNCTION, entityDetail.getProperties(), methodName)); - dataViewElement.setBusinessTerms(getAssignedBusinessTerms(entityDetail.getGUID())); - dataViewElement.setSources(getSources(entityDetail.getGUID())); - return dataViewElement; - } - } - - protected List getSources(String guid) { - return null; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ReportContextBuilder.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ReportContextBuilder.java deleted file mode 100644 index f004a0a7662..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/context/ReportContextBuilder.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.context; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DeployedReport; -import org.odpi.openmetadata.accessservices.informationview.events.ReportColumn; -import org.odpi.openmetadata.accessservices.informationview.events.ReportElement; -import org.odpi.openmetadata.accessservices.informationview.events.ReportSection; -import org.odpi.openmetadata.accessservices.informationview.events.ReportSource; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.lookup.ReportLookup; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; - -import java.util.Date; -import java.util.List; -import java.util.Optional; - -public class ReportContextBuilder extends ContextBuilder{ - - private ReportLookup reportLookup; - - public ReportContextBuilder(OMRSRepositoryConnector enterpriseConnector, OMEntityDao entityDao, OMRSAuditLog auditLog) { - super(enterpriseConnector, entityDao, auditLog); - this.reportLookup = new ReportLookup(enterpriseConnector, entityDao,null, auditLog); - } - - /** - * - * @param reportId id of the report to retrieve - * @return the bean representing the report - */ - public DeployedReport retrieveReport(String reportId) { - - ReportSource source = new ReportSource(); - source.setReportId(reportId); - EntityDetail reportEntity = Optional.ofNullable(reportLookup.lookupEntity(source)) - .orElseThrow(() -> ExceptionHandler.buildEntityNotFoundException(Constants.ID, reportId, Constants.DEPLOYED_REPORT, this.getClass().getName())); - return buildReport(reportEntity); - } - - /** - * - * @param reportEntity - entity describing the top level properties of the report - * @return the bean representing the report - */ - private DeployedReport buildReport( EntityDetail reportEntity) { - DeployedReport report = new DeployedReport(); - report.setGuid(reportEntity.getGUID()); - report.setAuthor(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.AUTHOR, reportEntity.getProperties(), "retrieveReport")); - report.setLastModifier(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.LAST_MODIFIER, reportEntity.getProperties(), "retrieveReport")); - Date lastModifiedDate = enterpriseConnector.getRepositoryHelper().getDateProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.LAST_MODIFIED_TIME, reportEntity.getProperties(), "retrieveReport"); - if(lastModifiedDate!=null) { - report.setLastModifiedTime(lastModifiedDate.getTime()); - } - Date createdTime = enterpriseConnector.getRepositoryHelper().getDateProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.CREATE_TIME, reportEntity.getProperties(), "retrieveReport"); - if(createdTime!=null) { - report.setCreatedTime(createdTime.getTime()); - } - report.setId(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.ID, reportEntity.getProperties(), "retrieveReport")); - report.setReportName(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, reportEntity.getProperties(), "retrieveReport")); - report.setReportUrl(enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, reportEntity.getProperties(), "retrieveReport")); - addReportStructure(report, reportEntity); - - return report; - } - - /** - * - * - * @param report - bean describing the report - * @param reportEntity - entity describing the top level properties of the report - */ - private void addReportStructure(DeployedReport report, EntityDetail reportEntity) { - List relationships = getAssetSchemaTypeRelationships(reportEntity.getGUID()); - - if(relationships == null || relationships.isEmpty()) - return; - EntityProxy assetSchemaType = relationships.get(0).getEntityTwoProxy(); - report.setReportElements(getChildrenElements(assetSchemaType.getGUID())); - } - - - /** - * - * @param entityDetail entity describing a report element - * @return - */ - protected ReportElement buildElement(EntityDetail entityDetail) { - - if(entityDetail.getType().getTypeDefName().equals(Constants.DOCUMENT_SCHEMA_ATTRIBUTE)){ - ReportSection reportElement = new ReportSection(); - reportElement.setName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, entityDetail.getProperties(), "buildElement")); - List schemaType = entityDao.getRelationships(Constants.SCHEMA_ATTRIBUTE_TYPE, - entityDetail.getGUID()); - if(schemaType != null && !schemaType.isEmpty()) { - reportElement.setElements(getChildrenElements(schemaType.get(0).getEntityTwoProxy().getGUID())); - } - - return reportElement; - }else{ - ReportColumn reportElement = new ReportColumn(); - reportElement.setName(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, entityDetail.getProperties(), "buildElement")); - reportElement.setAggregation(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.AGGREGATING_FUNCTION, entityDetail.getProperties(), "buildElement")); - reportElement.setFormula(omrsRepositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.FORMULA, entityDetail.getProperties(), "buildElement")); - reportElement.setBusinessTerms(getAssignedBusinessTerms(entityDetail.getGUID())); - reportElement.setSources(getSources(entityDetail.getGUID())); - return reportElement; - } - } - - protected List getSources(String guid) { - return null; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/eventprocessor/EventPublisher.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/eventprocessor/EventPublisher.java deleted file mode 100644 index fdfe74b13d5..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/eventprocessor/EventPublisher.java +++ /dev/null @@ -1,544 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.eventprocessor; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.accessservices.informationview.events.InformationViewHeader; -import org.odpi.openmetadata.accessservices.informationview.events.SemanticAssignment; -import org.odpi.openmetadata.accessservices.informationview.events.TableColumn; -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.accessservices.informationview.events.UpdatedEntityEvent; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.InformationViewExceptionBase; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.context.ColumnContextBuilder; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopic; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEvent; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEventProcessor; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - -import static org.odpi.openmetadata.accessservices.informationview.utils.Constants.RELATIONAL_COLUMN; -import static org.odpi.openmetadata.accessservices.informationview.utils.Constants.SEMANTIC_ASSIGNMENT; - - -public class EventPublisher extends OMRSInstanceEventProcessor { - - private static final Logger log = LoggerFactory.getLogger(EventPublisher.class); - private static final String eventPublisherName = "Information View OMAS Event Publisher"; - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private OpenMetadataTopic informationViewOutTopicConnector; - private OMRSRepositoryConnector enterpriseConnector; - private ColumnContextBuilder columnContextBuilder; - private OMRSRepositoryHelper helper; - private OMRSAuditLog auditLog; - private List zones; - - - public EventPublisher(OpenMetadataTopicConnector informationViewOutTopicConnector, OMRSRepositoryConnector enterpriseConnector, List zones, OMRSAuditLog auditLog) { - super (eventPublisherName); - - this.columnContextBuilder = new ColumnContextBuilder(enterpriseConnector); - this.informationViewOutTopicConnector = informationViewOutTopicConnector; - this.enterpriseConnector = enterpriseConnector; - this.helper = enterpriseConnector.getRepositoryHelper(); - this.zones = zones; - this.auditLog = auditLog; - } - - - @Override - public void sendInstanceEvent(String sourceName, OMRSInstanceEvent instanceEvent) { - - } - - public void processNewEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity) { - - } - - public void processUpdatedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail oldEntity, - EntityDetail entity) { - - UpdatedEntityEvent updatedEntityEvent = new UpdatedEntityEvent(); - updatedEntityEvent.setNewProperties(entity.getProperties()); - if(oldEntity != null) { - updatedEntityEvent.setOldProperties(oldEntity.getProperties()); - } - updatedEntityEvent.setType(entity.getType()); - updatedEntityEvent.setGuid(entity.getGUID()); - sendEvent(updatedEntityEvent); - - - if( (entity.getType().getTypeDefName().equals(Constants.BUSINESS_TERM) && isRename(oldEntity, entity))){ - log.info("Glossary term name was updated"); - String glossaryTermGuid = entity.getGUID(); - - try { - List assignedColumns = columnContextBuilder.getAssignedColumns(glossaryTermGuid); - if(assignedColumns != null && !assignedColumns.isEmpty()) { - assignedColumns.parallelStream().forEach(s -> publishColumnContextEvent(s.getGUID())); - } - } catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - } - } - - } - - private boolean isRename(EntityDetail oldEntity, EntityDetail entity) { - if(oldEntity != null && entity != null){ - String oldName = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.DISPLAY_NAME, oldEntity.getProperties(), "isRename"); - String newName = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.DISPLAY_NAME, entity.getProperties(), "isRename"); - return !newName.equals(oldName); - } - return false; - } - - public void processUndoneEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity) { - - } - - - @Override - public void processClassifiedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity, - Classification classification) { - - } - - - @Override - public void processDeclassifiedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity, - Classification originalClassification) { - - } - - - @Override - public void processReclassifiedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity, - Classification originalClassification, - Classification classification) { - - } - - @Override - public void processDeletedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity) { - - } - - public void processPurgedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String typeDefGUID, - String typeDefName, - String instanceGUID) { - - } - - public void processRestoredEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity) { - - } - - public void processReTypedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - TypeDefSummary originalTypeDef, - EntityDetail entity) { - - } - - public void processReHomedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String originalHomeMetadataCollectionId, - EntityDetail entity) { - - } - - public void processReIdentifiedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String originalEntityGUID, - EntityDetail entity) { - - } - - public void processRefreshEntityRequested(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String typeDefGUID, - String typeDefName, - String instanceGUID, - String homeMetadataCollectionId) { - - } - - public void processRefreshEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity) { - - } - - /** - * @param sourceName - name of the source of the event. It may be the cohort name for - * incoming events or the local repository, or event mapper name. - * @param originatorMetadataCollectionId - unique identifier for the metadata collection hosted by the server that - * sent the event. - * @param originatorServerName - name of the server that the event came from. - * @param originatorServerType - type of server that the event came from. - * @param originatorOrganizationName - name of the organization that owns the server that sent the event. - * @param relationship - details of the new relationship - */ - public void processNewRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - Relationship relationship) { - - //It should handle only semantic assignments for relational columns - if (!(relationship.getType().getTypeDefName().equals(SEMANTIC_ASSIGNMENT) && relationship.getEntityOneProxy().getType().getTypeDefName().equals(RELATIONAL_COLUMN))) { - log.info("Event is ignored as the relationship is not a semantic assignment for a column"); - - } else { - log.info("Processing semantic assignment relationship event for a column"); - try { - publishSemanticAssignment(relationship); - } catch (EntityProxyOnlyException | EntityNotKnownException | UserNotAuthorizedException | InvalidParameterException | RepositoryErrorException e) { - log.error("Exception building events", e); - InformationViewErrorCode auditCode = InformationViewErrorCode.PUBLISH_EVENT_EXCEPTION; - auditLog.logException("processNewRelationshipEvent", - auditCode.getErrorMessageId(), - OMRSAuditLogRecordSeverity.EXCEPTION, - auditCode.getFormattedErrorMessage(SemanticAssignment.class.getName(), e.getMessage()), - e.getMessage(), - auditCode.getSystemAction(), - auditCode.getUserAction(), - e); - } - publishColumnContextEvent(relationship.getEntityOneProxy().getGUID()); - } - } - - /** - * - * @param guid - - */ - private void publishColumnContextEvent(String guid) { - List events = null; - try { - events = columnContextBuilder.buildContexts(guid); - sendColumnContextEvents(events); - } - catch(InformationViewExceptionBase e){ - log.error(e.getMessage(), e); - } - } - - private void publishSemanticAssignment(Relationship relationship) throws RepositoryErrorException, - UserNotAuthorizedException, - EntityProxyOnlyException, - InvalidParameterException, - EntityNotKnownException { - SemanticAssignment semanticAssignment = new SemanticAssignment(); - EntityDetail businessTerm = enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, relationship.getEntityTwoProxy().getGUID()); - semanticAssignment.setBusinessTerm(columnContextBuilder.buildBusinessTerm(businessTerm)); - TableColumn databaseColumn = new TableColumn(); - EntityDetail columnEntity = enterpriseConnector.getMetadataCollection().getEntityDetail(Constants.INFORMATION_VIEW_USER_ID, relationship.getEntityOneProxy().getGUID()); - databaseColumn.setGuid(columnEntity.getGUID()); - databaseColumn.setName(helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, columnEntity.getProperties(), "publishSemanticAssignment")); - databaseColumn.setQualifiedName(helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, columnEntity.getProperties(), "publishSemanticAssignment")); - semanticAssignment.setTableColumn(databaseColumn); - sendEvent(semanticAssignment); - } - - - public void processUpdatedRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - Relationship relationship, - Relationship oldRelationship) { - - } - - public void processUndoneRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - Relationship relationship) { - - } - - @Override - public void processDeletedRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - Relationship relationship) { - - if (!(relationship.getType().getTypeDefName().equals(SEMANTIC_ASSIGNMENT) && relationship.getEntityOneProxy().getType().getTypeDefName().equals(RELATIONAL_COLUMN))) { - log.info("Event is ignored as the relationship is not a delete of semantic assignment for a column"); - } else { - log.info("Processing delete of semantic assignment for a column"); - publishColumnContextEvent(relationship.getEntityOneProxy().getGUID()); - } - } - - @Override - public void processDeletePurgedRelationshipEvent(String sourceName, String originatorMetadataCollectionId, - String originatorServerName, String originatorServerType, - String originatorOrganizationName, Relationship relationship) { - if (!(relationship.getType().getTypeDefName().equals(SEMANTIC_ASSIGNMENT) && relationship.getEntityOneProxy().getType().getTypeDefName().equals(RELATIONAL_COLUMN))) { - log.info("Event is ignored as the relationship is not a delete-purge of semantic assignment for a column"); - } else { - log.info("Processing delete-purge of semantic assignment for a column"); - publishColumnContextEvent(relationship.getEntityOneProxy().getGUID()); - } - } - - public void processPurgedRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String typeDefGUID, - String typeDefName, - String instanceGUID) { - - } - - public void processRestoredRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - Relationship relationship) { - - } - - public void processReTypedRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - TypeDefSummary originalTypeDef, - Relationship relationship) { - - } - - public void processReHomedRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String originalHomeMetadataCollectionId, - Relationship relationship) { - - } - - public void processReIdentifiedRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String originalRelationshipGUID, - Relationship relationship) { - - } - - public void processRefreshRelationshipRequest(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String typeDefGUID, - String typeDefName, - String instanceGUID, - String homeMetadataCollectionId) { - - } - - public void processRefreshRelationshipEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - Relationship relationship) { - - } - - public void processConflictingInstancesEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String targetMetadataCollectionId, - TypeDefSummary targetTypeDef, - String targetInstanceGUID, - String otherMetadataCollectionId, - InstanceProvenanceType otherOrigin, - TypeDefSummary otherTypeDef, - String otherInstanceGUID, - String errorMessage) { - - } - - public void processConflictingTypeEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - String targetMetadataCollectionId, - TypeDefSummary targetTypeDef, - String targetInstanceGUID, - TypeDefSummary otherTypeDef, - String errorMessage) { - - } - - - /** - * @param eventList - list of column context events - * @return true if all events were published, false otherwise - */ - private boolean sendColumnContextEvents(List eventList) { - boolean allSuccessful = true; - for (TableContextEvent event : eventList) { - if (!sendEvent(event)) allSuccessful = false; - } - return allSuccessful; - } - - /** - * Returns true if the event was published successfully, false otherwise - * - * @param event to be published - * @return true/false based on the success of the operation - */ - public boolean sendEvent(InformationViewHeader event) { - String actionDescription = "Send New Event"; - boolean successFlag = false; - - log.info("Sending event {} to information view out topic", event.getClass()); - if(log.isDebugEnabled()) { - log.debug("event: ", event); - } - - try { - - informationViewOutTopicConnector.sendEvent(OBJECT_MAPPER.writeValueAsString(event)); - successFlag = true; - - } catch (Throwable error) { - log.error("Exception publishing event", error); - InformationViewErrorCode auditCode = InformationViewErrorCode.PUBLISH_EVENT_EXCEPTION; - - auditLog.logException(actionDescription, - auditCode.getErrorMessageId(), - OMRSAuditLogRecordSeverity.EXCEPTION, - auditCode.getFormattedErrorMessage(event.getClass().getName(), error.getMessage()), - "event {" + event.toString() + "}", - auditCode.getSystemAction(), - auditCode.getUserAction(), - error); - - } - - return successFlag; - } - - /** - * An open metadata repository is passing information about a collection of entities and relationships - * with the other repositories in the cohort. - * - * @param sourceName name of the source of the event. It may be the cohort name for incoming events or the - * local repository, or event mapper name. - * @param originatorMetadataCollectionId unique identifier for the metadata collection hosted by the server that - * sent the event. - * @param originatorServerName name of the server that the event came from. - * @param originatorServerType type of server that the event came from. - * @param originatorOrganizationName name of the organization that owns the server that sent the event. - * @param instances multiple entities and relationships for sharing. - */ - public void processInstanceBatchEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - InstanceGraph instances) - { - - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/ExceptionHandler.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/ExceptionHandler.java deleted file mode 100644 index a248cf7a4ab..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/ExceptionHandler.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc; - -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.AddEntityException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.AddRelationshipException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.ContextLoadException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.DeleteRelationshipException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.EntityNotFoundException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.InformationViewExceptionBase; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.MultipleEntitiesMatching; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.NoMatchingEntityException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.NoRegistrationDetailsProvided; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.RetrieveEntityException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.RetrieveRelationshipException; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.SourceNotFoundException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSCheckedExceptionBase; - -public class ExceptionHandler { - - public static InformationViewExceptionBase buildEntityNotFoundException(String searchCriteriaPropertyName, - String searchCriteriaPropertyValue, - String entityType, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.ENTITY_NOT_FOUND_EXCEPTION; - return new EntityNotFoundException(errorCode.getHttpErrorCode(), reportingClassName, - errorCode.getFormattedErrorMessage(searchCriteriaPropertyName, searchCriteriaPropertyValue, entityType), - errorCode.getSystemAction(), - errorCode.getUserAction(), - null); - } - - - public static InformationViewExceptionBase buildAddEntityRelationship(String typeName, - OMRSCheckedExceptionBase e, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.ADD_ENTITY_EXCEPTION; - return new AddEntityException(errorCode.getHttpErrorCode(), reportingClassName, - errorCode.getFormattedErrorMessage(typeName, getBaseExceptionMessage(e)), - errorCode.getSystemAction(), - errorCode.getUserAction(), - null); - } - - public static InformationViewExceptionBase buildAddRelationshipException(String relationshipName, - String message, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.ADD_RELATIONSHIP_EXCEPTION; - return new AddRelationshipException(errorCode.getHttpErrorCode(), reportingClassName, - errorCode.getFormattedErrorMessage(relationshipName, message), - errorCode.getSystemAction(), - errorCode.getUserAction(), - null); - } - - public static InformationViewExceptionBase buildNoRegistrationDetailsProvided(Throwable exception, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.NO_REGISTRATION_DETAILS_PROVIDED; - return new NoRegistrationDetailsProvided(errorCode.getHttpErrorCode(), reportingClassName, - errorCode.getFormattedErrorMessage(), - errorCode.getSystemAction(), - errorCode.getUserAction(), - exception); - } - - public static InformationViewExceptionBase buildSourceNotFoundException(Source source, - Throwable exception, - String reportingClassName) { - InformationViewErrorCode code = InformationViewErrorCode.SOURCE_NOT_FOUND_EXCEPTION; - return new SourceNotFoundException(code.getHttpErrorCode(), - reportingClassName, - code.getFormattedErrorMessage(source.toString()), - code.getSystemAction(), - code.getUserAction(), - exception); - } - - public static InformationViewExceptionBase buildDeleteRelationshipException(Relationship relationship, - Throwable exception, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.DELETE_RELATIONSHIP_EXCEPTION; - return new DeleteRelationshipException(errorCode.getHttpErrorCode(), reportingClassName, - errorCode.getFormattedErrorMessage(relationship.getGUID(), - relationship.getType().getTypeDefName()), - errorCode.getSystemAction(), - errorCode.getUserAction(), - exception); - } - - public static InformationViewExceptionBase buildRetrieveEntityException(String searchCriteriaPropertyName, - String searchCriteriaPropertyValue, - Throwable exception, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.GET_ENTITY_EXCEPTION; - return new RetrieveEntityException(errorCode.getHttpErrorCode(), reportingClassName, - errorCode.getFormattedErrorMessage(searchCriteriaPropertyName, searchCriteriaPropertyValue), - errorCode.getSystemAction(), - errorCode.getUserAction(), - exception); - } - - public static InformationViewExceptionBase buildRetrieveRelationshipException(String entityGuid, - String relationshipTypeName, - OMRSCheckedExceptionBase e, - String reportingClassName) { - InformationViewErrorCode auditCode = InformationViewErrorCode.GET_RELATIONSHIP_EXCEPTION; - return new RetrieveRelationshipException(auditCode.getHttpErrorCode(), - reportingClassName, - auditCode.getFormattedErrorMessage(relationshipTypeName, entityGuid, getBaseExceptionMessage(e)), - auditCode.getSystemAction(), - auditCode.getUserAction(), - e); - } - - public static InformationViewExceptionBase buildMultipleEntitiesMatchingException(InstanceProperties matchingProperties, - Throwable reportedCaughtException, - String reportingClassName) { - return new MultipleEntitiesMatching(InformationViewErrorCode.MULTIPLE_MATCHING_ENTITIES_EXCEPTION.getHttpErrorCode(), - reportingClassName, - InformationViewErrorCode.MULTIPLE_MATCHING_ENTITIES_EXCEPTION.getFormattedErrorMessage(matchingProperties.toString()), - InformationViewErrorCode.MULTIPLE_MATCHING_ENTITIES_EXCEPTION.getSystemAction(), - InformationViewErrorCode.MULTIPLE_MATCHING_ENTITIES_EXCEPTION.getUserAction(), - reportedCaughtException); - } - - public static InformationViewExceptionBase buildNoMatchingEntityException(InstanceProperties matchingProperties, - Throwable reportedCaughtException, - String reportingClassName) { - return new NoMatchingEntityException(InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getHttpErrorCode(), - reportingClassName, - InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getFormattedErrorMessage(matchingProperties.toString()), - InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getSystemAction(), - InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getUserAction(), - reportedCaughtException); - } - - - public static InformationViewExceptionBase buildUpdateEntityException(String entityGuid, - Throwable reportedCaughtException, - String reportingClassName) { - return new NoMatchingEntityException(InformationViewErrorCode.UPDATE_ENTITY_EXCEPTION.getHttpErrorCode(), - reportingClassName, - InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getFormattedErrorMessage(entityGuid,reportedCaughtException.getMessage()), - InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getSystemAction(), - InformationViewErrorCode.NO_MATCHING_ENTITY_EXCEPTION.getUserAction(), - reportedCaughtException); - } - - - public static InformationViewExceptionBase buildRetrieveContextException(String entityGuid, OMRSCheckedExceptionBase e, String reportingClassName) { - InformationViewErrorCode code = InformationViewErrorCode.RETRIEVE_CONTEXT_EXCEPTION; - return new ContextLoadException(code.getHttpErrorCode(), reportingClassName, code.getFormattedErrorMessage(entityGuid, getBaseExceptionMessage(e)), code.getSystemAction(), code.getUserAction(), e); - } - - - public static InformationViewExceptionBase buildIllegalUpdateEntityException(Throwable exception, - String reportingClassName) { - InformationViewErrorCode errorCode = InformationViewErrorCode.ILLEGAL_UPDATE_EXCEPTION; - return new NoRegistrationDetailsProvided(errorCode.getHttpErrorCode(), - reportingClassName, - errorCode.getFormattedErrorMessage(), - errorCode.getSystemAction(), - errorCode.getUserAction(), - exception); - } - - - private static String getBaseExceptionMessage(OMRSCheckedExceptionBase e) { - return e != null ? e.getMessage() : ""; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/InformationViewErrorCode.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/InformationViewErrorCode.java deleted file mode 100644 index b6132ebdcf5..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/InformationViewErrorCode.java +++ /dev/null @@ -1,191 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.ffdc; - - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.text.MessageFormat; -import java.util.Arrays; - -public enum InformationViewErrorCode { - - - INVALID_EVENT_FORMAT("OMAS-INFORMATION-VIEW-001", - "Event{0} could not be parsed", - "The system is unable to process the request.", - "Verify the event published to the topic."), - PUBLISH_EVENT_EXCEPTION("OMAS-INFORMATION-VIEW-002", - "Event {0} could not be published: {1}", - "The system is unable to process the request.", - "Verify the topic configuration."), - PROCESS_EVENT_EXCEPTION("OMAS-INFORMATION-VIEW-003", - "Event {0} could not be consumed. Error: {1}", - "The system is unable to process the request.", - "Verify the topic configuration."), - ADD_ENTITY_EXCEPTION("OMAS-INFORMATION-VIEW-004", - "Entity {0} could not be added. Error: {1}", - "The system is unable to process the request.", - "Verify the topic event."), - ADD_RELATIONSHIP_EXCEPTION("OMAS-INFORMATION-VIEW-005", - "Relationship {0} could not be added. Error: {1}", - "The system is unable to process the request.", - "Verify the topic event."), - GET_ENTITY_EXCEPTION("OMAS-INFORMATION-VIEW-006", - "Entity matching criteria [{0}={1}] could not be fetched. Error: {2}", - "The system is unable to process the request.", - "Verify the topic event."), - GET_RELATIONSHIP_EXCEPTION("OMAS-INFORMATION-VIEW-007", - "Relationship {0} for entity {1} could not be fetched. Error: {2}", - "The system is unable to process the request.", - "Verify the topic event."), - RETRIEVE_CONTEXT_EXCEPTION(500,"OMAS-INFORMATION-VIEW-008", - "Context could not be retrieved for entity {0}. Error: {1}", - "The system is unable to process the request.", - "Verify the topic event."), - PARSE_EVENT("OMAS-INFORMATION-VIEW-009", - "Event could not be parsed", - "The system is unable to process the request.", - "Verify the topic event."), - ADD_CLASSIFICATION("OMAS-INFORMATION-VIEW-010", - "Unable to create classification {0} for entity of type {1}. Error: {2}", - "The system is unable to process the request.", - "Verify the topic event."), - REPORT_CREATION_EXCEPTION("OMAS-INFORMATION-VIEW-011", - "Unable to create report based on received json {0}. Error: {1}", - "The system is unable to process the request.", - "Verify the post request."), - SERVICE_NOT_INITIALIZED("OMAS-INFORMATION-VIEW-012", - "The access service has not been initialized for server {0} and can not support REST API calls", - "The server has received a call to one of its open metadata access services but is unable to process it because the access service is not active for the requested server.", - "If the server is supposed to have this access service activated, correct the server configuration and restart the server."), - BAD_CONFIG("OMAS-INFORMATION-VIEW-013", - "The Information View Open Metadata Access Service (OMAS) has been passed an invalid value of {0} in the {1} property. The resulting exception of {2} included the following message: {3}", - "The access service has not been passed valid configuration.", - "Correct the configuration and restart the service."), - ENTITY_NOT_FOUND_EXCEPTION(404, "OMAS-INFORMATION-VIEW-014", - "The entity matching criteria [{0}={1}] was not found.", - "The system is unable to process the request.", - "Correct the request payload submitted."), - INCORRECT_TYPE_EXCEPTION(500, "OMAS-INFORMATION-VIEW-015", - "The entity matching criteria [{0}={1}] is not of type {2}.", - "The system is unable to process the request.", - "Correct the request payload submitted."), - INCORRECT_MODEL_EXCEPTION(500, "OMAS-INFORMATION-VIEW-016", - "The model for entity {0} is not correct: {1}", - "The system is unable to process the request.", - "Correct the metadata model."), - REPORT_ELEMENT_CREATION_EXCEPTION(500, "OMAS-INFORMATION-VIEW-017", - "Element {0} could not be created because of error: {1}", - "The system is unable to process the request.", - "Check the error message on how to fix the error."), - REPORT_SUBMIT_EXCEPTION(500, "OMAS-INFORMATION-VIEW-018", - "Unable to create report because of error: {0}", - "The system is unable to process the request.", - "Check the error message on how to fix the error."), - INFORMATION_VIEW_SUBMIT_EXCEPTION(500, "OMAS-INFORMATION-VIEW-019", - "Unable to create information view because of error: {0}", - "The system is unable to process the request.", - "Check the error message on how to fix the error."), - NO_MATCHING_ENTITY_EXCEPTION(500, "OMAS-INFORMATION-VIEW-020", - "No entity matches the criteria: {0}", - "The system is unable to process the request.", - "Check the criteria used for matching."), - MULTIPLE_MATCHING_ENTITIES_EXCEPTION(500, "OMAS-INFORMATION-VIEW-021", - "More than one entity match the criteria: {0}", - "The system is unable to process the request.", - "Check the criteria used for matching."), - REGISTRATION_EXCEPTION(500, "OMAS-INFORMATION-VIEW-022", - "Tool registration failed because of error: {0}", - "The system is unable to process the request.", - "Check the error message for more details."), - SOURCE_NOT_FOUND_EXCEPTION(500, "OMAS-INFORMATION-VIEW-023", - "No entity was found based on source: {0}", - "The system is unable to process the request.", - "Check the error message for more details."), - ILLEGAL_UPDATE_EXCEPTION(403, "OMAS-INFORMATION-VIEW-024", - "Illegal update for entity: {0}", - "The system will not process the request.", - "This entity is owned by another tool."), - NO_REGISTRATION_DETAILS_PROVIDED(403, "OMAS-INFORMATION-VIEW-025", - "No registration details were provided in the request", - "The system will not process the request.", - "The request should contain guid or qualifiedName of the external tool registration."), - DELETE_ENTITY_EXCEPTION("OMAS-INFORMATION-VIEW-026", - "Entity matching criteria [{0}={1}] could not be deleted. Error: {2}", - "The system is unable to process the request.", - "Verify the topic event."), - DELETE_RELATIONSHIP_EXCEPTION("OMAS-INFORMATION-VIEW-027", - "Relationship {0} of type {1} could not be deleted. Error: {2}", - "The system is unable to process the request.", - "Verify the topic event."), - UPDATE_ENTITY_EXCEPTION(403,"OMAS-INFORMATION-VIEW-028", - "Entity {0} could not be updated. Error: {1}", - "The system is unable to process the request.", - "Verify the exception message."), - - NULL_TOPIC_CONNECTOR(400, "OMAS-INFORMATION-VIEW-400-001", - "Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize", - "The local server will not connect to the cohort.", - "The connection to the connector is configured in the server configuration. " + - "Review previous error messages to determine the precise error in the " + - "start up configuration. " + - "Correct the configuration and reconnect the server to the cohort. "); - - private static final Logger log = LoggerFactory.getLogger(InformationViewErrorCode.class); - private String errorMessageId; - private String errorMessage; - private String systemAction; - private String userAction; - private int httpErrorCode; - - InformationViewErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) { - this.httpErrorCode = httpErrorCode; - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = userAction; - } - - InformationViewErrorCode(String errorMessageId, String errorMessage, String systemAction, String userAction) { - this.errorMessageId = errorMessageId; - this.errorMessage = errorMessage; - this.systemAction = systemAction; - this.userAction = userAction; - } - - public String getErrorMessageId() { - return errorMessageId; - } - - public String getErrorMessage() { - return errorMessage; - } - - public String getSystemAction() { - return systemAction; - } - - public String getUserAction() { - return userAction; - } - - public int getHttpErrorCode() { - return httpErrorCode; - } - - public String getFormattedErrorMessage(String... params) {//TODO this should be moved to common code base - - log.debug(String.format("<== InformationViewErrorCode.getMessage(%s)", Arrays.toString(params))); - - - MessageFormat mf = new MessageFormat(errorMessage); - String result = mf.format(params); - - log.debug(String.format("==> InformationViewErrorCode.getMessage(%s): %s", Arrays.toString(params), result)); - - return result; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InformationViewCheckedExceptionBase.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InformationViewCheckedExceptionBase.java deleted file mode 100644 index 345fa915b48..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InformationViewCheckedExceptionBase.java +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions; - - - -public class InformationViewCheckedExceptionBase extends Exception { - - private String reportingClassName; - private String reportingActionDescription; - private String reportedErrorMessage; - private String reportedSystemAction; - private String reportedUserAction; - private Throwable reportedCaughtException = null; - - /** - * @param reportingClassName - name of class reporting error - * @param reportingActionDescription - description of function it was performing when error detected - * @param reportedErrorMessage - description of error - * @param reportedSystemAction - actions of the system as a result of the error - * @param reportedUserAction - instructions for correcting the error - */ - public InformationViewCheckedExceptionBase(String reportingClassName, String reportingActionDescription, String reportedErrorMessage, String reportedSystemAction, String reportedUserAction) { - super(reportedErrorMessage); - this.reportingClassName = reportingClassName; - this.reportingActionDescription = reportingActionDescription; - this.reportedErrorMessage = reportedErrorMessage; - this.reportedSystemAction = reportedSystemAction; - this.reportedUserAction = reportedUserAction; - } - - /** - * This is the constructor used for creating a InformationViewCheckedException that resulted from a previous error. - * - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - * @param caughtError - the error that resulted in this exception. - */ - public InformationViewCheckedExceptionBase( - String className, - String actionDescription, - String errorMessage, - String systemAction, - String userAction, - Throwable caughtError) { - super(errorMessage, caughtError); - this.reportingClassName = className; - this.reportingActionDescription = actionDescription; - this.reportedErrorMessage = errorMessage; - this.reportedSystemAction = systemAction; - this.reportedUserAction = userAction; - this.reportedCaughtException = caughtError; - } - - public String getReportingClassName() { - return reportingClassName; - } - - public String getReportingActionDescription() { - return reportingActionDescription; - } - - public String getReportedErrorMessage() { - return reportedErrorMessage; - } - - public String getReportedSystemAction() { - return reportedSystemAction; - } - - public String getReportedUserAction() { - return reportedUserAction; - } - - public Throwable getReportedCaughtException() { - return reportedCaughtException; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InvalidEventException.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InvalidEventException.java deleted file mode 100644 index 7847d0739f8..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/InvalidEventException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions; - - -public class InvalidEventException extends InformationViewCheckedExceptionBase { - - public InvalidEventException(String className, String actionDescription, String errorMessage, String systemAction, String userAction) { - super(className, actionDescription, errorMessage, systemAction, userAction); - } - - - /** - * This is the constructor used for creating a InvalidEventException that resulted from a previous error. - * - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - * @param caughtError - the error that resulted in this exception. - */ - public InvalidEventException(String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) { - super(className, actionDescription, errorMessage, systemAction, userAction, caughtError); - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/PublishEventException.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/PublishEventException.java deleted file mode 100644 index 11686259d51..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/ffdc/exceptions/PublishEventException.java +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions; - - -public class PublishEventException extends InformationViewCheckedExceptionBase { - - public PublishEventException(String reportingClassName, String reportingActionDescription, String reportedErrorMessage, String reportedSystemAction, String reportedUserAction) { - super(reportingClassName, reportingActionDescription, reportedErrorMessage, reportedSystemAction, reportedUserAction); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/listeners/InformationViewEnterpriseOmrsEventListener.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/listeners/InformationViewEnterpriseOmrsEventListener.java deleted file mode 100644 index d05770c2712..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/listeners/InformationViewEnterpriseOmrsEventListener.java +++ /dev/null @@ -1,157 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.listeners; - -import org.odpi.openmetadata.accessservices.informationview.auditlog.InformationViewAuditCode; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListener; -import org.odpi.openmetadata.repositoryservices.events.OMRSEventOriginator; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEvent; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEventProcessor; -import org.odpi.openmetadata.repositoryservices.events.OMRSInstanceEventType; -import org.odpi.openmetadata.repositoryservices.events.OMRSRegistryEvent; -import org.odpi.openmetadata.repositoryservices.events.OMRSTypeDefEvent; -import org.odpi.openmetadata.repositoryservices.events.beans.v1.OMRSEventV1; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class InformationViewEnterpriseOmrsEventListener implements OMRSTopicListener { - - - private static final Logger log = LoggerFactory.getLogger(InformationViewEnterpriseOmrsEventListener.class); - private OMRSInstanceEventProcessor instanceEventProcessor; - private OMRSAuditLog auditLog; - - /** - * - * @param instanceEventProcessor - * @param auditLog - */ - public InformationViewEnterpriseOmrsEventListener(OMRSInstanceEventProcessor instanceEventProcessor, OMRSAuditLog auditLog) { - - this.instanceEventProcessor = instanceEventProcessor; - this.auditLog = auditLog; - } - - - /** - * @param event - inbound event - */ - public void processEvent(OMRSEventV1 event) { - String actionDescription = "Process Incoming Event"; - - /* - * The event should not be null but worth checking. - */ - if (event != null) { - /* - * Determine the category of event to process. - */ - switch (event.getEventCategory()) { - - case INSTANCE: - this.processInstanceEvent(new OMRSInstanceEvent(event)); - break; - - default: - if(log.isDebugEnabled()) { - log.debug("This event should not be handled by iv omas:{0} ", event.getEventCategory()); - } - } - } else { - /* - * A null event was passed - probably should not happen so log audit record. - */ - InformationViewAuditCode auditCode = InformationViewAuditCode.NULL_OMRS_EVENT_RECEIVED; - - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - - log.debug("Null OMRS Event received "); - } - - } - - - @Override - public void processRegistryEvent(OMRSRegistryEvent event) { - - } - - @Override - public void processTypeDefEvent(OMRSTypeDefEvent event) { - - } - - /** - * @param instanceEvent - the event coming from enterprise topic - */ - public void processInstanceEvent(OMRSInstanceEvent instanceEvent) { - - if(log.isDebugEnabled()) { - log.debug("Processing instance event", instanceEvent); - } - - if (instanceEvent == null) { - log.debug("Null instance event - ignoring event"); - } else { - OMRSInstanceEventType instanceEventType = instanceEvent.getInstanceEventType(); - OMRSEventOriginator instanceEventOriginator = instanceEvent.getEventOriginator(); - - if ((instanceEventType != null) && (instanceEventOriginator != null)) { - switch (instanceEventType) { - - //More events will be added - case NEW_RELATIONSHIP_EVENT: - instanceEventProcessor.processNewRelationshipEvent("EnterpriseOMRSTopic", - instanceEventOriginator.getMetadataCollectionId(), - instanceEventOriginator.getServerName(), - instanceEventOriginator.getServerType(), - instanceEventOriginator.getOrganizationName(), - instanceEvent.getRelationship()); - break; - - case UPDATED_ENTITY_EVENT: - instanceEventProcessor.processUpdatedEntityEvent("EnterpriseOMRSTopic", - instanceEventOriginator.getMetadataCollectionId(), - instanceEventOriginator.getServerName(), - instanceEventOriginator.getServerType(), - instanceEventOriginator.getOrganizationName(), - instanceEvent.getOriginalEntity(), - instanceEvent.getEntity()); - break; - - case DELETED_RELATIONSHIP_EVENT: - instanceEventProcessor.processDeletedRelationshipEvent("EnterpriseOMRSTopic", - instanceEventOriginator.getMetadataCollectionId(), - instanceEventOriginator.getServerName(), - instanceEventOriginator.getServerType(), - instanceEventOriginator.getOrganizationName(), - instanceEvent.getRelationship()); - break; - - case DELETE_PURGED_RELATIONSHIP_EVENT: - instanceEventProcessor.processDeletePurgedRelationshipEvent("EnterpriseOMRSTopic", - instanceEventOriginator.getMetadataCollectionId(), - instanceEventOriginator.getServerName(), - instanceEventOriginator.getServerType(), - instanceEventOriginator.getOrganizationName(), - instanceEvent.getRelationship()); - break; - - } - } else { - log.debug("Ignored instance event - null type"); - } - } - - - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ColumnLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ColumnLookup.java deleted file mode 100644 index b8058c0eaaa..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ColumnLookup.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseColumnSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.InformationViewExceptionBase; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; - -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -public class ColumnLookup extends EntityLookup { - - private static final Logger log = LoggerFactory.getLogger(ColumnLookup.class); - - public ColumnLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.RELATIONAL_COLUMN); - } - - @Override - public EntityDetail lookupEntity(DatabaseColumnSource source){ - EntityDetail columnEntity = Optional.ofNullable(super.lookupEntity(source)) - .orElseGet(() -> lookupBasedOnHierarchy(source)); - if (log.isDebugEnabled()) { - log.debug("Column found [{}]", columnEntity); - } - return columnEntity; - } - - public EntityDetail lookupBasedOnHierarchy(DatabaseColumnSource source){ - Supplier exceptionBaseSupplier = - () -> ExceptionHandler.buildRetrieveEntityException(Constants.RELATIONAL_COLUMN, - source.toString(), null, this.getClass().getName()); - EntityDetail entityDetail = Optional.ofNullable(parentChain.lookupEntity(source.getTableSource())) - .orElseThrow(exceptionBaseSupplier); - return Optional.ofNullable(filterBasedOnMatchingProperties(source, entityDetail)) - .orElseThrow(exceptionBaseSupplier); - } - - private EntityDetail filterBasedOnMatchingProperties(DatabaseColumnSource source, EntityDetail tableEntity) { - List relatedEntities = omEntityDao.getRelatedEntities(Arrays.asList(tableEntity.getGUID()), - Constants.SCHEMA_ATTRIBUTE_TYPE, - r -> r.getEntityTwoProxy().getGUID()); - if (!CollectionUtils.isEmpty(relatedEntities)) { - List allColumns = omEntityDao.getRelatedEntities(relatedEntities.stream().map(InstanceHeader::getGUID).collect(Collectors.toList()), - Constants.ATTRIBUTE_FOR_SCHEMA, - r -> r.getEntityTwoProxy().getGUID()); - return filterEntities(Arrays.asList(Constants.RELATIONAL_COLUMN, - Constants.DERIVED_RELATIONAL_COLUMN), - source, - allColumns); - } - return null; - } - - protected InstanceProperties getMatchingProperties(DatabaseColumnSource source) { - String methodName = "getMatchingProperties"; - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String sourceNameRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getName()); - return enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance("", new InstanceProperties(), - Constants.NAME, sourceNameRegex, methodName); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DataViewLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DataViewLookup.java deleted file mode 100644 index 53e30607316..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DataViewLookup.java +++ /dev/null @@ -1,45 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewSource; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Optional; - -public class DataViewLookup extends EntityLookup { - - private static final Logger log = LoggerFactory.getLogger(DataViewLookup.class); - - public DataViewLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.INFORMATION_VIEW); - } - - @Override - public EntityDetail lookupEntity(DataViewSource source){ - EntityDetail entity = Optional.ofNullable(super.lookupEntity(source)) - .orElseGet(() -> findEntity(getMatchingProperties(source), Constants.INFORMATION_VIEW)); - - if(log.isDebugEnabled()) { - log.debug("DataView found [{}]", entity); - } - return entity; - } - - @Override - protected InstanceProperties getMatchingProperties(DataViewSource source) { - InstanceProperties matchProperties = new InstanceProperties(); - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String sourceIdRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getId()); - matchProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, matchProperties, - Constants.ID, sourceIdRegex, "getMatchingProperties"); - return matchProperties; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseLookup.java deleted file mode 100644 index fcc21b4e594..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseLookup.java +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - -public class DatabaseLookup extends EntityLookup { - - private static final Logger log = LoggerFactory.getLogger(DatabaseLookup.class); - - public DatabaseLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.DATABASE); - } - - - @Override - public EntityDetail lookupEntity(final DatabaseSource source){ - EntityDetail databaseEntity = Optional.ofNullable(super.lookupEntity(source)) - .orElseGet(() -> lookupBasedOnHierarchy(source)); - - if(log.isDebugEnabled()) { - log.debug("Database found [{}]", databaseEntity); - } - return databaseEntity; - } - - private EntityDetail lookupBasedOnHierarchy(final DatabaseSource source) { - EntityDetail optionalEndpointEntity = Optional.ofNullable(parentChain.lookupEntity(source.getEndpointSource())) - .orElseThrow(() -> ExceptionHandler.buildRetrieveEntityException(Constants.SOURCE, source.getEndpointSource().toString(), null, this.getClass().getName())); - return Optional.ofNullable(filterBasedOnMatchingProperties(source, optionalEndpointEntity)) - .orElseThrow(() -> ExceptionHandler.buildRetrieveEntityException(Constants.SOURCE, source.toString(), null, this.getClass().getName())); - } - - private EntityDetail filterBasedOnMatchingProperties(DatabaseSource source, EntityDetail endpointEntity) { - List allConnection = omEntityDao.getRelatedEntities(Arrays.asList(endpointEntity.getGUID()), Constants.CONNECTION_TO_ENDPOINT, r -> r.getEntityTwoProxy().getGUID()); - List allLinkedDatabasesList = omEntityDao.getRelatedEntities(allConnection.stream().map(InstanceHeader::getGUID).collect(Collectors.toList()), - Constants.CONNECTION_TO_ASSET, - r -> r.getEntityTwoProxy().getGUID()); - return filterEntities(Arrays.asList(Constants.DATABASE), source, allLinkedDatabasesList); - } - - - @Override - public void setParentChain(EntityLookup parentChain) { - this.parentChain = parentChain; - } - - @Override - protected InstanceProperties getMatchingProperties(DatabaseSource source) { - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String sourceNameRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getName()); - InstanceProperties matchProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance("", new InstanceProperties(), - Constants.NAME, sourceNameRegex, "findDEntity"); - return matchProperties; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseSchemaLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseSchemaLookup.java deleted file mode 100644 index e1039bef13d..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/DatabaseSchemaLookup.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.TableSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; -import java.util.List; -import java.util.Optional; - -public class DatabaseSchemaLookup extends EntityLookup { - - private static final Logger log = LoggerFactory.getLogger(DatabaseSchemaLookup.class); - - public DatabaseSchemaLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.DEPLOYED_DATABASE_SCHEMA); - } - - @Override - public EntityDetail lookupEntity(TableSource source){ - EntityDetail entity = Optional.ofNullable(super.lookupEntity(source)) - .orElseGet(() -> lookupBasedOnHierarchy(source)); - if (log.isDebugEnabled()) { - log.debug("DatabaseSchema found [{}]", entity); - } - return entity; - } - - private EntityDetail lookupBasedOnHierarchy(TableSource source) { - Optional optional = Optional.ofNullable(parentChain.lookupEntity(source.getDatabaseSource())); - return optional.ofNullable(filterBasedOnMatchingProperties(source, optional)) - .orElseThrow(() -> ExceptionHandler.buildRetrieveEntityException(Constants.SOURCE, source.toString(), null, this.getClass().getName())); - } - - private EntityDetail filterBasedOnMatchingProperties(TableSource source, Optional optional) { - List allSchemas = omEntityDao.getRelatedEntities(Arrays.asList(optional.get().getGUID()), Constants.DATA_CONTENT_FOR_DATASET, e -> e.getEntityTwoProxy().getGUID()); - return filterEntities(Arrays.asList(Constants.DEPLOYED_DATABASE_SCHEMA, Constants.INFORMATION_VIEW), source, allSchemas); - } - - @Override - protected InstanceProperties getMatchingProperties(TableSource source) { - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String sourceSchemaNameRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getSchemaName()); - return enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance("", new InstanceProperties(), - Constants.NAME, sourceSchemaNameRegex, "findDatabase"); - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EndpointLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EndpointLookup.java deleted file mode 100644 index aeaf147aaaf..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EndpointLookup.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.EndpointSource; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.StringUtils; - -import java.util.Optional; - -public class EndpointLookup extends EntityLookup { - - private static final Logger log = LoggerFactory.getLogger(EndpointLookup.class); - - public EndpointLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup chain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, chain, auditLog, Constants.ENDPOINT); - - } - - @Override - public EntityDetail lookupEntity(EndpointSource source) { - EntityDetail entity = Optional.ofNullable(super.lookupEntity(source)) - .orElseGet(() -> findEndpoint(source)); - - if(log.isDebugEnabled()) { - log.debug("Endpoint found [{}]", entity); - } - return entity; - - } - - public EntityDetail findEndpoint(EndpointSource source){ - return findEntity(getMatchingProperties(source), Constants.ENDPOINT); - } - - - @Override - protected InstanceProperties getMatchingProperties(EndpointSource source) { - InstanceProperties matchProperties = new InstanceProperties(); - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String sourceNetworkAddressRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getNetworkAddress()); - matchProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, matchProperties, - Constants.NETWORK_ADDRESS, sourceNetworkAddressRegex, "findEndpoint"); - if(!StringUtils.isEmpty(source.getProtocol())){ - String sourceProtocolRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getProtocol()); - matchProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, matchProperties, - Constants.PROTOCOL, sourceProtocolRegex, "findEndpoint"); - } - //matchProperties = enterpriseConnector.getRepositoryHelper().addStringArrayPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, matchProperties, Constants.ZONE_MEMBERSHIP, supportedZones, "addEntity"); - - return matchProperties; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EntityLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EntityLookup.java deleted file mode 100644 index c17de1fc1cf..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/EntityLookup.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.InformationViewExceptionBase; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; - -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildMultipleEntitiesMatchingException; -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildNoMatchingEntityException; - -public abstract class EntityLookup { - - private static final Integer PAGE_SIZE = 0; - private static final Logger log = LoggerFactory.getLogger(EntityLookup.class); - protected OMRSRepositoryConnector enterpriseConnector; - protected OMEntityDao omEntityDao; - protected OMRSAuditLog auditLog; - protected EntityLookup parentChain; - protected String equivalentOMType; - - public EntityLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog, String equivalentOMType) { - this.enterpriseConnector = enterpriseConnector; - this.omEntityDao = omEntityDao; - this.auditLog = auditLog; - this.parentChain = parentChain; - this.equivalentOMType = equivalentOMType; - } - - public void setParentChain(EntityLookup parentChain) { - this.parentChain = parentChain; - } - - public EntityDetail lookupEntity(T source){ - if(!StringUtils.isEmpty(source.getGuid())){ - return omEntityDao.getEntityByGuid(source.getGuid()); - } - if(!StringUtils.isEmpty(source.getQualifiedName())){ - return omEntityDao.getEntity(equivalentOMType, source.getQualifiedName(), false); - } - return null; - } - - /** - * Returns the entity matching the criteria or null if none matches - * @param typeNames - list of types to use for lookup - * @param source - the source against which we want to match - * @param list of entities in which to search - * @return entity matching type and source - */ - public EntityDetail filterEntities(List typeNames, T source, List list) { - List filteredList = list.stream().filter(e -> isTypeOf(typeNames, e)).collect(Collectors.toList()); - InstanceProperties matchProperties = getMatchingProperties(source); - return matchExactlyToUniqueEntity(filteredList, matchProperties); - } - - /** - * Return true if the entity type is among the list of types passed as argument - * @param typeNames list of types to check - * @param e entity to check - * @return true if the type is the expected one - */ - private boolean isTypeOf(List typeNames, EntityDetail e) { - return typeNames.stream().anyMatch(type -> enterpriseConnector.getRepositoryHelper().isTypeOf("lookupEntity", e.getType().getTypeDefName(), type)); - } - - /** - * - * @param source we want to match against - * @return the properties to use from source bean to match an entity against - */ - protected abstract InstanceProperties getMatchingProperties(T source); - - - /** - * Returns the entity matching the type and matchProperties - * @param matchProperties properties to use for querying the repositories - * @param typeDefName type name of the entities to search for - * @return the entity detail matching the type and properties - */ - public EntityDetail findEntity(InstanceProperties matchProperties, String typeDefName) { - // - // GDW - match properties passed to findEntities must be escaped for exact match but matchProperties for local filter match must be unescaped - // - return matchExactlyToUniqueEntity(omEntityDao.findEntities(matchProperties, typeDefName, 0, PAGE_SIZE), matchProperties); - } - - - /** - * Returns the unique entity matching the properties - * @param entities to search in - * @param matchingProperties properties used to match - * @return the entity matching the properties - * @throws InformationViewExceptionBase throws NoMatchingEntityException if no entity is found matching - * throws MultipleEntitiesMatching if multiple entities match - */ - public EntityDetail matchExactlyToUniqueEntity(List entities, final InstanceProperties matchingProperties){ - if (!CollectionUtils.isEmpty(entities)) { - List filteredEntities = entities.stream().filter(e -> matchProperties(e, matchingProperties)).collect(Collectors.toList()); - if (CollectionUtils.isEmpty(filteredEntities)) { - throw buildNoMatchingEntityException(matchingProperties, null, this.getClass().getName()); - } - if (filteredEntities.size() > 1) { - throw buildMultipleEntitiesMatchingException(matchingProperties, null, this.getClass().getName()); - } - return filteredEntities.get(0); - } - throw buildNoMatchingEntityException(matchingProperties, null, this.getClass().getName()); - } - - /** - * - * @param entityDetail entity we want to match against - * @param matchingProperties properties used for matching - * @return true if properties match, false otherwise - */ - public boolean matchProperties(EntityDetail entityDetail, InstanceProperties matchingProperties) { - InstanceProperties entityProperties = entityDetail.getProperties(); - for (Map.Entry property : matchingProperties.getInstanceProperties().entrySet()) { - String actualValue = enterpriseConnector.getRepositoryHelper().getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, property.getKey(), entityProperties, "matchProperties");//TODO only string supported for now - // GDW - need to unescape any strings that were converted to exactMatchRegexes earlier - String matchStringValue = (String)((PrimitivePropertyValue)property.getValue()).getPrimitiveValue(); - String literalMatchValue = enterpriseConnector.getRepositoryHelper().getUnqualifiedLiteralString(matchStringValue); - if (!literalMatchValue.equals(actualValue)) { - return false; - } - } - return true; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDataView.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDataView.java deleted file mode 100644 index fc1d4295832..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDataView.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewColumnSource; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewSource; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.StringUtils; - -public class LookupBasedOnDataView implements LookupStrategy{ - - private static final Logger log = LoggerFactory.getLogger(DataViewSource.class); - private OMEntityDao omEntityDao; - - - public LookupBasedOnDataView(OMEntityDao omEntityDao) { - this.omEntityDao = omEntityDao; - } - - @Override - public EntityDetail lookup(Source source) { - if (!(source instanceof DataViewColumnSource)) { - log.error("Source is not a DataViewSourceColumn"); - return null; - } else { - String qualifiedName; - if (StringUtils.isEmpty(source.getQualifiedName())) { - qualifiedName = buildQualifiedName((DataViewColumnSource) source); - } else { - qualifiedName = source.getQualifiedName(); - } - return omEntityDao.getEntity(Constants.DERIVED_SCHEMA_ATTRIBUTE, qualifiedName, false); - } - } - - private String buildQualifiedName(DataViewColumnSource source) { - DataViewSource dataViewSource = source.getDataViewSource(); - return QualifiedNameUtils.buildQualifiedNameForDataViewColumn(dataViewSource.getEndpointSource().getNetworkAddress(), dataViewSource.getId(), source.getId() ); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDatabaseColumn.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDatabaseColumn.java deleted file mode 100644 index a4d689877cf..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnDatabaseColumn.java +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseColumnSource; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.EntityNotFoundException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class LookupBasedOnDatabaseColumn implements LookupStrategy { - - private static final Logger log = LoggerFactory.getLogger(LookupBasedOnDatabaseColumn.class); - private LookupHelper lookupHelper; - - public LookupBasedOnDatabaseColumn(LookupHelper lookupHelper) { - this.lookupHelper = lookupHelper; - } - - @Override - public EntityDetail lookup(Source source) { - if(log.isDebugEnabled()) { - log.debug("Lookup based on source {0}", source); - } - return lookupHelper.lookupDatabaseColumn((DatabaseColumnSource) source); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnReportColumn.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnReportColumn.java deleted file mode 100644 index 8ec4af65f94..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupBasedOnReportColumn.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.ReportColumnSource; -import org.odpi.openmetadata.accessservices.informationview.events.ReportSectionSource; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.StringUtils; - -public class LookupBasedOnReportColumn implements LookupStrategy { - - private static final Logger log = LoggerFactory.getLogger(ReportColumnSource.class); - public static final String SEPARATOR = "::"; - private OMEntityDao omEntityDao; - - - public LookupBasedOnReportColumn(OMEntityDao omEntityDao) { - this.omEntityDao = omEntityDao; - } - - @Override - public EntityDetail lookup(Source source) { - if (!(source instanceof ReportColumnSource)) { - log.error("Source is not a ReportColumnSource"); - return null; - } else { - String qualifiedName; - if (!StringUtils.isEmpty(source.getQualifiedName())) { - qualifiedName = buildQualifiedName((ReportColumnSource) source); - } else { - qualifiedName = source.getQualifiedName(); - } - return omEntityDao.getEntity(Constants.DERIVED_SCHEMA_ATTRIBUTE, qualifiedName, false); - } - } - - private String buildQualifiedName(ReportColumnSource source) { - ReportSectionSource parentReportSection = source.getParentReportSection(); - StringBuilder builder = new StringBuilder(); - while (parentReportSection != null) { - builder.insert(0, parentReportSection.getName() + SEPARATOR); - if (parentReportSection.getParentReportSection() == null) { - builder.insert(0, parentReportSection.getReportSource().getEndpointSource().getNetworkAddress() + SEPARATOR + parentReportSection.getReportSource().getReportId() + SEPARATOR); - } - parentReportSection = parentReportSection.getParentReportSection(); - } - - builder.append(source.getName()); - return builder.toString(); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupHelper.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupHelper.java deleted file mode 100644 index d42f45aec84..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupHelper.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseColumnSource; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.text.MessageFormat; - -public class LookupHelper { - - private static final Logger log = LoggerFactory.getLogger(LookupHelper.class); - private OMRSRepositoryConnector enterpriseConnector; - private OMEntityDao omEntityDao; - private OMRSAuditLog auditLog; - private EndpointLookup endpointLookup; - private DatabaseLookup databaseLookup; - private DatabaseSchemaLookup databaseSchemaLookup; - private TableLookup tableLookup; - private ColumnLookup columnLookup; - - public LookupHelper(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, OMRSAuditLog auditLog) { - this.enterpriseConnector = enterpriseConnector; - this.auditLog = auditLog; - this.omEntityDao = omEntityDao; - endpointLookup = new EndpointLookup(enterpriseConnector, omEntityDao, null, auditLog); - databaseLookup = new DatabaseLookup(enterpriseConnector, omEntityDao, endpointLookup, auditLog); - databaseSchemaLookup = new DatabaseSchemaLookup(enterpriseConnector, omEntityDao, databaseLookup, auditLog); - tableLookup = new TableLookup(enterpriseConnector, omEntityDao, databaseSchemaLookup, auditLog); - columnLookup = new ColumnLookup(enterpriseConnector, omEntityDao, tableLookup, auditLog); - } - - public EntityDetail lookupDatabaseColumn(DatabaseColumnSource source) { - if(log.isDebugEnabled()) { - log.debug(MessageFormat.format("lookup database column {0}", source)); - } - return columnLookup.lookupEntity(source); - } - - -} - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupStrategy.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupStrategy.java deleted file mode 100644 index 000c559f653..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/LookupStrategy.java +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; - -public interface LookupStrategy { - - EntityDetail lookup(Source source); -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ReportLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ReportLookup.java deleted file mode 100644 index 916a692eda6..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/ReportLookup.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.ReportSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Optional; - - -public class ReportLookup extends EntityLookup { - - - private static final Logger log = LoggerFactory.getLogger(ReportLookup.class); - - public ReportLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.DEPLOYED_DATABASE_SCHEMA); - } - - @Override - public EntityDetail lookupEntity(ReportSource source){ - EntityDetail entity = Optional.ofNullable(findEntity(getMatchingProperties(source), Constants.DEPLOYED_REPORT)) - .orElseThrow(() -> ExceptionHandler.buildEntityNotFoundException(Constants.SOURCE, - source.toString(), - Constants.DEPLOYED_REPORT, - this.getClass().getName())); - if(log.isDebugEnabled()) { - log.debug("Report found [{}]", entity); - } - return entity; - } - - @Override - protected InstanceProperties getMatchingProperties(ReportSource source) { - InstanceProperties matchProperties = new InstanceProperties(); - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String sourceReportIdRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getReportId()); - matchProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, matchProperties, - Constants.ID, sourceReportIdRegex, "getMatchingProperties"); - return matchProperties; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/SoftwareServerCapabilityLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/SoftwareServerCapabilityLookup.java deleted file mode 100644 index b959bef16a1..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/SoftwareServerCapabilityLookup.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Optional; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildEntityNotFoundException; - -public class SoftwareServerCapabilityLookup extends EntityLookup{ - - private static final Logger log = LoggerFactory.getLogger(EndpointLookup.class); - - public SoftwareServerCapabilityLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, - EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.SOFTWARE_SERVER_CAPABILITY); - } - - @Override - public EntityDetail lookupEntity(SoftwareServerCapabilitySource source) { - EntityDetail entity = Optional.ofNullable(super.lookupEntity(source)) - .orElseThrow(() -> buildEntityNotFoundException(Constants.QUALIFIED_NAME, - source.getQualifiedName(), - Constants.SOFTWARE_SERVER_CAPABILITY, - SoftwareServerCapabilityLookup.class.getName())); - if (log.isDebugEnabled()) { - log.debug("SoftwareServerCapability found [{}]", entity); - } - return entity; - } - - @Override - protected InstanceProperties getMatchingProperties(SoftwareServerCapabilitySource softwareServerCapabilitySource) { - InstanceProperties matchProperties = new InstanceProperties(); - // GDW - each string property added to matchProperties shoudl be converted to exact match regex - String softwareServerCapabilitySourceQualifiedNameRegex = - enterpriseConnector.getRepositoryHelper().getExactMatchRegex(softwareServerCapabilitySource.getQualifiedName()); - matchProperties = enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, matchProperties, - Constants.QUALIFIED_NAME, softwareServerCapabilitySourceQualifiedNameRegex, "getMatchingProperties"); - return matchProperties; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/TableLookup.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/TableLookup.java deleted file mode 100644 index 8fbb166314e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/lookup/TableLookup.java +++ /dev/null @@ -1,75 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.lookup; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.TableSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.InformationViewExceptionBase; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; - -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -public class TableLookup extends EntityLookup { - - private static final Logger log = LoggerFactory.getLogger(TableLookup.class); - - public TableLookup(OMRSRepositoryConnector enterpriseConnector, OMEntityDao omEntityDao, EntityLookup parentChain, OMRSAuditLog auditLog) { - super(enterpriseConnector, omEntityDao, parentChain, auditLog, Constants.RELATIONAL_TABLE); - } - - @Override - public EntityDetail lookupEntity(TableSource source){ - EntityDetail entity = Optional.ofNullable(super.lookupEntity(source)) - .orElseGet(() -> lookupStartingFromParent(source)); - if(log.isDebugEnabled()) { - log.debug("Table found [{}]", entity); - } - return entity; - } - - public EntityDetail lookupStartingFromParent(TableSource source){ - Supplier exceptionBaseSupplier = - () -> ExceptionHandler.buildRetrieveEntityException(Constants.SOURCE, source.toString(), null, - this.getClass().getName()); - EntityDetail entityDetail = Optional.ofNullable(parentChain.lookupEntity(source)) - .orElseThrow(exceptionBaseSupplier) ; - - return Optional.ofNullable(lookup(source, entityDetail)) - .orElseThrow(exceptionBaseSupplier); - } - - private EntityDetail lookup(TableSource source, EntityDetail schemaDatabase) { - List allSchemaType = omEntityDao.getRelatedEntities(Arrays.asList(schemaDatabase.getGUID()), - Constants.ASSET_SCHEMA_TYPE, - r -> r.getEntityTwoProxy().getGUID()); - if (!CollectionUtils.isEmpty(allSchemaType)) { - List allLinkedTablesList = - omEntityDao.getRelatedEntities(allSchemaType.stream().map(InstanceHeader::getGUID).collect(Collectors.toList()), - Constants.ATTRIBUTE_FOR_SCHEMA, - r -> r.getEntityTwoProxy().getGUID()); - return filterEntities(Arrays.asList(Constants.RELATIONAL_TABLE), source, allLinkedTablesList); - } - return null; - } - - @Override - protected InstanceProperties getMatchingProperties(TableSource source) { - // GDW - each string property added to matchProperties should be converted to exact match regex - String sourceNameRegex = enterpriseConnector.getRepositoryHelper().getExactMatchRegex(source.getName()); - return enterpriseConnector.getRepositoryHelper().addStringPropertyToInstance("", new InstanceProperties(), - Constants.NAME, sourceNameRegex, "lookupEntity"); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/registration/RegistrationHandler.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/registration/RegistrationHandler.java deleted file mode 100644 index 56b643d8b20..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/registration/RegistrationHandler.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.registration; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityWrapper; -import org.odpi.openmetadata.accessservices.informationview.events.RegistrationRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.RegistrationException; -import org.odpi.openmetadata.accessservices.informationview.lookup.SoftwareServerCapabilityLookup; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.ClassificationErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.StatusNotSupportedException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.StringUtils; - -import java.util.Optional; - -public class RegistrationHandler { - - - private static final Logger log = LoggerFactory.getLogger(RegistrationHandler.class); - private org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao; - private OMRSRepositoryHelper repositoryHelper; - private OMRSAuditLog auditLog; - private SoftwareServerCapabilityLookup lookup; - - public RegistrationHandler(OMEntityDao omEntityDao, OMRSRepositoryConnector enterpriseConnector, - OMRSAuditLog auditLog) { - this.omEntityDao = omEntityDao; - this.repositoryHelper = enterpriseConnector.getRepositoryHelper(); - this.auditLog = auditLog; - this.lookup = new SoftwareServerCapabilityLookup(enterpriseConnector,omEntityDao,null,auditLog); - } - - - public SoftwareServerCapabilitySource registerTool(RegistrationRequestBody requestBody) { - - SoftwareServerCapabilitySource softwareServerCapability = requestBody.getSoftwareServerCapability(); - if(StringUtils.isEmpty(softwareServerCapability.getQualifiedName())){ - throw new RegistrationException( - InformationViewErrorCode.REGISTRATION_EXCEPTION.getHttpErrorCode(), - RegistrationHandler.class.getName(), - InformationViewErrorCode.REGISTRATION_EXCEPTION.getFormattedErrorMessage("No qualified name was provided. This is mandatory."), - InformationViewErrorCode.REGISTRATION_EXCEPTION.getSystemAction(), - InformationViewErrorCode.REGISTRATION_EXCEPTION.getUserAction(), - null); - } - - String qualifiedNameForSoftwareServer = softwareServerCapability.getQualifiedName(); - InstanceProperties softwareServerProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForSoftwareServer) - .withStringProperty(Constants.PATCH_LEVEL, softwareServerCapability.getPatchLevel()) - .withStringProperty(Constants.TYPE, softwareServerCapability.getType()) - .withStringProperty(Constants.VERSION, softwareServerCapability.getVersion()) - .withStringProperty(Constants.SOURCE, softwareServerCapability.getSource()) - .withStringProperty(Constants.NAME, softwareServerCapability.getName()) - .withStringProperty(Constants.DESCRIPTION, softwareServerCapability.getDescription()) - .build(); - - OMEntityWrapper registration; - try { - registration = omEntityDao.createOrUpdateEntity(Constants.SOFTWARE_SERVER_CAPABILITY, - qualifiedNameForSoftwareServer, - softwareServerProperties, - null, - true, - true); - - return buildSoftwareServerCapabilitySource(registration.getEntityDetail()); - } catch (InvalidParameterException | StatusNotSupportedException | PropertyErrorException | EntityNotKnownException | TypeErrorException | FunctionNotSupportedException | PagingErrorException | ClassificationErrorException | UserNotAuthorizedException | RepositoryErrorException e) { - throw new RegistrationException( - InformationViewErrorCode.REGISTRATION_EXCEPTION.getHttpErrorCode(), - RegistrationHandler.class.getName(), - InformationViewErrorCode.REGISTRATION_EXCEPTION.getFormattedErrorMessage(e.getMessage()), - InformationViewErrorCode.REGISTRATION_EXCEPTION.getSystemAction(), - InformationViewErrorCode.REGISTRATION_EXCEPTION.getUserAction(), - null); - } - } - - - public SoftwareServerCapabilitySource lookupSoftwareServerCapability(RegistrationRequestBody requestBody) { - EntityDetail entity = - Optional.ofNullable(lookup.lookupEntity(requestBody.getSoftwareServerCapability())) - .orElseThrow(() -> ExceptionHandler.buildEntityNotFoundException(Constants.SOURCE, - requestBody.getSoftwareServerCapability().toString(), - Constants.SOFTWARE_SERVER_CAPABILITY, - this.getClass().getName())); - return buildSoftwareServerCapabilitySource(entity); - } - - private SoftwareServerCapabilitySource buildSoftwareServerCapabilitySource(EntityDetail entity) { - SoftwareServerCapabilitySource source = new SoftwareServerCapabilitySource(); - source.setName(repositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, entity.getProperties(), "")); - source.setQualifiedName(repositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, entity.getProperties(), "")); - source.setVersion(repositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.VERSION, entity.getProperties(), "")); - source.setPatchLevel(repositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.PATCH_LEVEL, entity.getProperties(), "")); - source.setType(repositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.TYPE, entity.getProperties(), "")); - source.setDescription(repositoryHelper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.DESCRIPTION, entity.getProperties(), "")); - source.setGuid(entity.getGUID()); - return source; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/BasicOperation.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/BasicOperation.java deleted file mode 100644 index 31af7a46227..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/BasicOperation.java +++ /dev/null @@ -1,372 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.BusinessTerm; -import org.odpi.openmetadata.accessservices.informationview.events.ReportElement; -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; -import org.odpi.openmetadata.accessservices.informationview.events.Source; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; - -import java.text.MessageFormat; -import java.util.Collection; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.*; - -public abstract class BasicOperation { - - private static final Logger log = LoggerFactory.getLogger(BasicOperation.class); - protected final OMEntityDao omEntityDao; - protected final OMRSAuditLog auditLog; - protected final OMRSRepositoryHelper helper; - public static final String SEPARATOR = "::"; - protected final EntityReferenceResolver entityReferenceResolver; - - public BasicOperation(OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - this.omEntityDao = omEntityDao; - this.auditLog = auditLog; - this.helper = helper; - this.entityReferenceResolver = new EntityReferenceResolver(lookupHelper, omEntityDao); - } - - /** - * @param registrationGuid guid of the softwareServerCapability - * @param registrationQualifiedName qualifiedName of the softwareServerCapability - * @return entity of type SoftwareServerCapability retrieved by provided identifiers - */ - public SoftwareServerCapabilitySource retrieveSoftwareServerCapability(String registrationGuid, String registrationQualifiedName) { - EntityDetail softwareServerCapability; - if (StringUtils.isEmpty(registrationGuid) && StringUtils.isEmpty(registrationQualifiedName)) { - throw buildNoRegistrationDetailsProvided(null, ReportBasicOperation.class.getName()); - } - if (!StringUtils.isEmpty(registrationGuid)) { - softwareServerCapability = Optional.ofNullable(omEntityDao.getEntityByGuid(registrationGuid)) - .orElseThrow(() -> buildEntityNotFoundException(Constants.GUID, registrationGuid, - Constants.SOFTWARE_SERVER_CAPABILITY, - ReportBasicOperation.class.getName())); - }else { - softwareServerCapability = Optional.ofNullable(omEntityDao.getEntity(Constants.SOFTWARE_SERVER_CAPABILITY, - registrationQualifiedName, - false)) - .orElseThrow(() -> buildEntityNotFoundException(Constants.QUALIFIED_NAME, - registrationQualifiedName, - Constants.SOFTWARE_SERVER_CAPABILITY, - ReportBasicOperation.class.getName())); - } - return buildSoftwareServerCapabilitySource(softwareServerCapability); - } - - private SoftwareServerCapabilitySource buildSoftwareServerCapabilitySource(EntityDetail softwareServerCapability) { - SoftwareServerCapabilitySource softwareServerCapabilitySource = new SoftwareServerCapabilitySource(); - softwareServerCapabilitySource.setGuid(softwareServerCapability.getGUID()); - softwareServerCapabilitySource.setQualifiedName(helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.QUALIFIED_NAME, softwareServerCapability.getProperties(), - "retrieveSoftwareServerCapability")); - return softwareServerCapabilitySource; - } - - - /** - * - * @param userId id of user submitting the request - * @param schemaAttributeTypeName - type name for the actual schema type entity to be created - * @param qualifiedNameForSchemaType - qualifiedName for schema type entity - * @param registrationGuid - guid of softwareServerCapability - * @param registrationQualifiedName - qualified name of software server capability - * @param schemaAttributeTypeProperties - instance properties for schema attribute - * @param schemaTypeRelationshipName - type name for the actual schema type entity to be created - * @param schemaAttributeGuid - guid of the schema attribute for which the schema type was created - * @return entity representing schema type - */ - protected EntityDetail createSchemaType(String userId, String schemaAttributeTypeName, - String qualifiedNameForSchemaType, - String registrationGuid, - String registrationQualifiedName, - InstanceProperties schemaAttributeTypeProperties, - String schemaTypeRelationshipName, - String schemaAttributeGuid) { - EntityDetail schemaTypeEntity; - schemaTypeEntity = omEntityDao.addExternalEntity(userId, - schemaAttributeTypeName, - qualifiedNameForSchemaType, - registrationGuid, - registrationQualifiedName, - schemaAttributeTypeProperties, - null, - false); - omEntityDao.addExternalRelationship(userId, - schemaTypeRelationshipName, - registrationGuid, - registrationQualifiedName, - schemaAttributeGuid, - schemaTypeEntity.getGUID(), - new InstanceProperties()); - return schemaTypeEntity; - } - - - /** - * @param userId id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param referenceableEntityGuid guid of the entity representing the derived column - * @param businessTermGuid guid of businessTerm - */ - protected void addBusinessTerm(String userId, String registrationGuid, String registrationQualifiedName, String referenceableEntityGuid, String businessTermGuid) { - if (!StringUtils.isEmpty(businessTermGuid)) { - omEntityDao.addExternalRelationship(userId, - Constants.SEMANTIC_ASSIGNMENT, - registrationGuid, - registrationQualifiedName, - referenceableEntityGuid, - businessTermGuid, - new InstanceProperties()); - - } - } - - /** - * @param userId id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param derivedColumnEntityGuid the guid of the entity representing the derived column - * @param sourceColumnGuid identifier of the source column entity - * @param queryValue - */ - protected void addQueryTarget(String userId, String registrationGuid, String registrationQualifiedName, String derivedColumnEntityGuid, String sourceColumnGuid, String queryValue) { - - InstanceProperties schemaQueryImplProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUERY, queryValue) - .build(); - omEntityDao.addExternalRelationship(userId, - Constants.SCHEMA_QUERY_IMPLEMENTATION, - registrationGuid, - registrationQualifiedName, - derivedColumnEntityGuid, - sourceColumnGuid, - schemaQueryImplProperties); - - } - - /** - * - * @param userId - id of user submitting the request - * @param qualifiedNameForType - qualified name of the schema attribute - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param schemaAttributeGuid schema attribute entity guid - * @param schemaAttributeType schema attribute type entity - * @param properties properties for the type entity - * @return entity describing the schema type - */ - protected EntityDetail addSchemaType(String userId, String qualifiedNameForType, String registrationGuid, - String registrationQualifiedName, String schemaAttributeGuid, - String schemaAttributeType, InstanceProperties properties) { - - InstanceProperties typeProperties; - typeProperties = helper.addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, properties, Constants.QUALIFIED_NAME, qualifiedNameForType, "addSchemaType"); - EntityDetail schemaTypeEntity = createSchemaType(userId, schemaAttributeType, qualifiedNameForType, registrationGuid, registrationQualifiedName, typeProperties, - Constants.SCHEMA_ATTRIBUTE_TYPE, schemaAttributeGuid); - return schemaTypeEntity; - } - - - /** - * - * @param userId id of user submitting the request - userId of the user submitting the request - * @param assetGuid - guid of the entity describing the asset - * @param qualifiedNameForComplexSchemaType qualified name for complex schema type - * @param registrationGuid - guid of softwareServerCapability - * @param registrationQualifiedName - qualified name of software server capability - * @param schemaTypeName - name os schema type - * @param complexSchemaTypeProperties properties of the complex schema type - * @return entity describing the asset schema type - */ - protected EntityDetail addAssetSchemaType(String userId, String assetGuid, String qualifiedNameForComplexSchemaType, - String registrationGuid, String registrationQualifiedName, String schemaTypeName, InstanceProperties complexSchemaTypeProperties) { - EntityDetail complexSchemaTypeEntity = omEntityDao.addExternalEntity(userId, - schemaTypeName, - qualifiedNameForComplexSchemaType, - registrationGuid, - registrationQualifiedName, - complexSchemaTypeProperties, - null, - false); - - omEntityDao.addExternalRelationship(userId, - Constants.ASSET_SCHEMA_TYPE, - registrationGuid, - registrationQualifiedName, - assetGuid, - complexSchemaTypeEntity.getGUID(), - new InstanceProperties()); - - return complexSchemaTypeEntity; - } - - - - /** - * Create relationships of type SEMANTIC_ASSIGNMENT between the business terms and the entity representing the - * column - * @param userId - id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param businessTerms - list of business terms - * @param derivedColumnEntity - entity describing the derived column - */ - public void addSemanticAssignments(String userId, String registrationGuid, String registrationQualifiedName, List businessTerms, EntityDetail derivedColumnEntity){ - if(!CollectionUtils.isEmpty(businessTerms)) { - businessTerms.forEach(bt -> addSemanticAssignment(userId, registrationGuid, registrationQualifiedName, bt, derivedColumnEntity)); - } - } - - /** - * - * @param userId - id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param bt - business term to link to derived column - * @param derivedColumnEntity - entity describing the column - */ - public void addSemanticAssignment(String userId, String registrationGuid, String registrationQualifiedName, BusinessTerm bt, EntityDetail derivedColumnEntity) { - String businessTermGuid; - businessTermGuid = entityReferenceResolver.getBusinessTermGuid(bt); - omEntityDao.addExternalRelationship(userId, - Constants.SEMANTIC_ASSIGNMENT, - registrationGuid, - registrationQualifiedName, - derivedColumnEntity.getGUID(), - businessTermGuid, - new InstanceProperties()); - } - - - /** - * @param userId id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param sources list of sources describing the report column - * @param derivedColumnEntity entity describing the derived column - */ - public void addQueryTargets(String userId, String registrationGuid, String registrationQualifiedName, List sources, EntityDetail derivedColumnEntity) { - Optional.ofNullable(sources) - .map(Collection::stream) - .orElseGet(Stream::empty) - .forEach(s -> {String sourceColumnGUID = entityReferenceResolver.resolveSourceGuid(s); - addQueryTarget(userId, registrationGuid, registrationQualifiedName, derivedColumnEntity.getGUID(), sourceColumnGUID, "");}); - - } - - - /** - * @param userId - id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param columnGuid guid of the column - * @param businessTerm business term to link or update to column - * @param existingAssignments list of existing relationships of type semantic assignment - */ - protected Relationship createOrUpdateSemanticAssignment(String userId, String registrationGuid, - String registrationQualifiedName, - String columnGuid, - BusinessTerm businessTerm, - List existingAssignments) { - String businessTermAssignedToColumnGuid = entityReferenceResolver.getBusinessTermGuid(businessTerm); - return Optional.ofNullable(existingAssignments).map(Collection::stream) - .orElseGet(Stream::empty) - .filter(e -> e.getEntityTwoProxy().getGUID().equals(businessTermAssignedToColumnGuid)) - .findFirst() - .orElseGet(() -> omEntityDao.addExternalRelationship(userId, - Constants.SEMANTIC_ASSIGNMENT, - registrationGuid, - registrationQualifiedName, - columnGuid, - businessTermAssignedToColumnGuid, - new InstanceProperties())); - } - - - protected String buildQualifiedNameForSchemaType(String qualifiedNameForParent, String schemaType, - ReportElement element) { - return QualifiedNameUtils.buildQualifiedName(qualifiedNameForParent, schemaType, element.getName() + Constants.TYPE_SUFFIX); - } - - - /** - * - * @param sources list of sources to be linked to column - * @param columnGuid guid of column - */ - protected void createOrUpdateSchemaQueryImplementation(List sources, String columnGuid) { - - List existingRelationships = omEntityDao.getRelationships(Constants.SCHEMA_QUERY_IMPLEMENTATION, columnGuid); - List validRelationships = sources.stream().map(source -> addQueryTarget(columnGuid, source, - existingRelationships).getGUID()).collect(Collectors.toList()); - if (!CollectionUtils.isEmpty(existingRelationships) ) { - existingRelationships.stream().filter(r -> !validRelationships.contains(r.getGUID())).forEach(omEntityDao::purgeRelationship); - } - } - - private Relationship addQueryTarget(String columnGuid, Source source, List existingRelationships) { - String sourceColumnGuid = entityReferenceResolver.resolveSourceGuid(source); - if (!StringUtils.isEmpty(sourceColumnGuid)) { - log.debug("source {} found.", source); - return Optional.ofNullable(existingRelationships) - .map(Collection::stream) - .orElseGet(Stream::empty) - .filter(r -> r.getEntityTwoProxy().getGUID().equals(sourceColumnGuid) || - r.getEntityOneProxy().getGUID().equals(sourceColumnGuid)) - .findFirst() - .orElseGet(() ->{ - InstanceProperties schemaQueryImplProperties = - new EntityPropertiesBuilder().withStringProperty(Constants.QUERY, "") - .build(); - return omEntityDao.addRelationship(Constants.SCHEMA_QUERY_IMPLEMENTATION, - columnGuid, - sourceColumnGuid, - schemaQueryImplProperties);}); - } - log.error(MessageFormat.format("source column not found, unable to add relationship {0} between column " + - "{1} and source {2}", Constants.SCHEMA_QUERY_IMPLEMENTATION, columnGuid, source.toString())); - throw buildAddRelationshipException(Constants.SCHEMA_QUERY_IMPLEMENTATION, null, this.getClass().getName()); - } - - /** - * - * - * @param userId - id of user submitting the request - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param businessTerms list of business terms to link to column - * @param columnGuid guid of column - */ - protected void createOrUpdateSemanticAssignments(String userId, String registrationGuid, - String registrationQualifiedName, - List businessTerms, - String columnGuid) { - List existingAssignments = omEntityDao.getRelationships(Constants.SEMANTIC_ASSIGNMENT, columnGuid); - if (CollectionUtils.isEmpty(businessTerms)) { - omEntityDao.purgeRelationships(existingAssignments); - } else { - businessTerms.forEach( bt -> createOrUpdateSemanticAssignment(userId, registrationGuid, registrationQualifiedName, columnGuid, bt, existingAssignments)); - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewBasicOperation.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewBasicOperation.java deleted file mode 100644 index b87ad67351f..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewBasicOperation.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewColumn; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewElement; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewModel; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - - -public abstract class DataViewBasicOperation extends BasicOperation{ - - private static final Logger log = LoggerFactory.getLogger(DataViewBasicOperation.class); - - protected DataViewBasicOperation(OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - super(omEntityDao, lookupHelper, helper, auditLog); - } - - - /** - * @param userId id of user submitting the request - * @param parentQualifiedName qualified name for the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param dataViewElements the list of all nested elements - */ - protected void addElements(String userId, String parentQualifiedName, String parentGuid, String registrationGuid, - String registrationQualifiedName, List dataViewElements) { - if (dataViewElements == null || dataViewElements.isEmpty()) - return; - dataViewElements.parallelStream().forEach(e -> addDataViewElement(userId, parentQualifiedName, parentGuid, registrationGuid, registrationQualifiedName, e)); - } - - - /** - * @param userId id of user submitting the request - * @param qualifiedNameForParent qualified name for the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param element element to be added - */ - public void addDataViewElement(String userId, String qualifiedNameForParent, String parentGuid, - String registrationGuid, String registrationQualifiedName, DataViewElement element) { - if (element instanceof DataViewModel) { - addDataViewModel(userId, qualifiedNameForParent, registrationGuid, registrationQualifiedName, parentGuid, (DataViewModel) element); - } else if (element instanceof DataViewColumn) { - addDataViewColumn(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, (DataViewColumn) element); - } - } - - - /** - * @param userId id of user submitting the request - * @param qualifiedNameForParent qualified name for the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param parentGuid guid of the parent element - * @param dataViewModel current element - */ - private void addDataViewModel(String userId, String qualifiedNameForParent, String registrationGuid, - String registrationQualifiedName, String parentGuid, DataViewModel dataViewModel) { - - String qualifiedNameForDataViewModel = QualifiedNameUtils.buildQualifiedName( qualifiedNameForParent, Constants.SCHEMA_ATTRIBUTE, dataViewModel.getId()); - InstanceProperties sectionProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForDataViewModel) - .withStringProperty(Constants.ATTRIBUTE_NAME, dataViewModel.getName()) - - .withStringProperty(Constants.NATIVE_CLASS, dataViewModel.getNativeClass()) - .withStringProperty(Constants.DESCRIPTION, dataViewModel.getDescription()) - .build(); - InstanceProperties additionalInstanceProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.ID, dataViewModel.getId()) - .withStringProperty(Constants.COMMENT, dataViewModel.getComment()) - .build(); - MapPropertyValue additionalProperties= new MapPropertyValue(); - additionalProperties.setMapValues(additionalInstanceProperties); - sectionProperties.setProperty(Constants.ADDITIONAL_PROPERTIES, additionalProperties); - EntityDetail dataViewModelEntity = createSchemaType(userId, Constants.SCHEMA_ATTRIBUTE, qualifiedNameForDataViewModel, - registrationGuid, registrationQualifiedName, sectionProperties, Constants.ATTRIBUTE_FOR_SCHEMA, parentGuid); - - String qualifiedNameForDataViewModelType = QualifiedNameUtils.buildQualifiedName( qualifiedNameForParent, Constants.COMPLEX_SCHEMA_TYPE, dataViewModel.getId() + Constants.TYPE_SUFFIX); - EntityDetail schemaTypeEntity = addSchemaType(userId, qualifiedNameForDataViewModelType, registrationGuid, registrationQualifiedName, dataViewModelEntity.getGUID(), Constants.COMPLEX_SCHEMA_TYPE, null); - addElements(userId, qualifiedNameForParent, schemaTypeEntity.getGUID(), registrationGuid, registrationQualifiedName, dataViewModel.getElements()); - } - - - /** - * - * - * @param userId id of user submitting the request - * @param parentQualifiedName qualified name for the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param dataViewColumn element to be created - * @return entity describing the column - */ - protected EntityDetail addDataViewColumn(String userId, String parentQualifiedName, String parentGuid, - String registrationGuid, String registrationQualifiedName, DataViewColumn dataViewColumn) { - - String qualifiedNameForColumn = QualifiedNameUtils.buildQualifiedName(parentQualifiedName, Constants.DERIVED_SCHEMA_ATTRIBUTE, dataViewColumn.getId()); - InstanceProperties columnProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForColumn) - .withStringProperty(Constants.ATTRIBUTE_NAME, dataViewColumn.getName()) - .withStringProperty(Constants.DESCRIPTION, dataViewColumn.getDescription()) - .withStringProperty(Constants.COMMENT, dataViewColumn.getComment()) - .withStringProperty(Constants.FORMULA, dataViewColumn.getExpression()) - .withStringProperty(Constants.ID, dataViewColumn.getId()) - .withStringProperty(Constants.NATIVE_CLASS, dataViewColumn.getNativeClass()) - .withStringProperty(Constants.AGGREGATING_FUNCTION, dataViewColumn.getRegularAggregate()) - .build(); - - EntityDetail dataViewColumnEntity = createSchemaType(userId, Constants.DERIVED_SCHEMA_ATTRIBUTE, qualifiedNameForColumn, registrationGuid, registrationQualifiedName, columnProperties, Constants.ATTRIBUTE_FOR_SCHEMA, parentGuid); - - addSemanticAssignments(userId, registrationGuid, registrationQualifiedName, dataViewColumn.getBusinessTerms(), dataViewColumnEntity); - addQueryTargets(userId, registrationGuid, registrationQualifiedName, dataViewColumn.getSources(), dataViewColumnEntity); - - InstanceProperties typeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.DATA_TYPE, dataViewColumn.getDataType()) - .build(); - String qualifiedNameForColumnType = QualifiedNameUtils.buildQualifiedName(parentQualifiedName, Constants.PRIMITIVE_SCHEMA_TYPE,dataViewColumn.getId() + Constants.TYPE_SUFFIX ); - addSchemaType(userId, qualifiedNameForColumnType, registrationGuid, registrationQualifiedName, dataViewColumnEntity.getGUID(), Constants.PRIMITIVE_SCHEMA_TYPE, typeProperties); - - return dataViewColumnEntity; - } - - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewCreator.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewCreator.java deleted file mode 100644 index fb6837fa6c0..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewCreator.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityWrapper; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewRequestBody; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DataViewCreator extends DataViewBasicOperation{ - - private static final Logger log = LoggerFactory.getLogger(DataViewCreator.class); - - protected DataViewCreator(org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - super(omEntityDao, lookupHelper, helper, auditLog); - } - - - /** - * - * - * @param userId - * @param requestBody json describing the data view - * @param dataViewEntity the entity describing the data view - */ - public void createDataView(String userId, DataViewRequestBody requestBody, EntityDetail dataViewEntity) { - String methodName = "createDataView"; - String qualifiedNameForComplexSchemaType = QualifiedNameUtils.buildQualifiedName(requestBody.getDataView().getEndpointAddress(), Constants.COMPLEX_SCHEMA_TYPE, requestBody.getDataView().getId() + Constants.TYPE_SUFFIX); - InstanceProperties complexSchemaTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForComplexSchemaType) - .build(); - OMEntityWrapper complexSchemaTypeEntityWrapper = omEntityDao.createOrUpdateExternalEntity(userId, - Constants.COMPLEX_SCHEMA_TYPE, - qualifiedNameForComplexSchemaType, - requestBody.getRegistrationGuid(), - requestBody.getRegistrationQualifiedName(), - complexSchemaTypeProperties, - null, - false, - false); - - log.debug("Created data view schema type {}", complexSchemaTypeEntityWrapper.getEntityDetail().getGUID()); - omEntityDao.addRelationship(Constants.ASSET_SCHEMA_TYPE, - dataViewEntity.getGUID(), - complexSchemaTypeEntityWrapper.getEntityDetail().getGUID(), - new InstanceProperties()); - - String qualifiedNameForDataView = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, dataViewEntity.getProperties(), methodName); - addElements(userId, qualifiedNameForDataView, complexSchemaTypeEntityWrapper.getEntityDetail().getGUID(), requestBody.getRegistrationGuid(), requestBody.getRegistrationQualifiedName(), requestBody.getDataView().getElements()); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewHandler.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewHandler.java deleted file mode 100644 index 5fdc16af731..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewHandler.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityWrapper; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.DataViewCreationException; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DataViewHandler { - - - private static final Logger log = LoggerFactory.getLogger(DataViewHandler.class); - private org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao; - private OMRSAuditLog auditLog; - private DataViewCreator dataViewCreator; - private DataViewUpdater dataViewUpdater; - - - public DataViewHandler(OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - this.omEntityDao = omEntityDao; - dataViewCreator = new DataViewCreator(omEntityDao,lookupHelper, helper, auditLog); - dataViewUpdater = new DataViewUpdater(omEntityDao, lookupHelper, helper, auditLog); - this.auditLog = auditLog; - } - - - /** - * Creating data view based on payload - * - * @param userId calling user - * @param requestBody json describing the data view - * @return unique identifier for the guid - * @throws DataViewCreationException unable to create view - */ - public String createDataView(String userId, DataViewRequestBody requestBody) throws DataViewCreationException { - - log.debug("Creating data view based on payload {}", requestBody); - SoftwareServerCapabilitySource softwareServerCapabilitySource = dataViewCreator.retrieveSoftwareServerCapability(requestBody.getRegistrationGuid(), requestBody.getRegistrationQualifiedName()); - requestBody.setRegistrationGuid(softwareServerCapabilitySource.getGuid()); - requestBody.setRegistrationQualifiedName(softwareServerCapabilitySource.getQualifiedName()); - - String qualifiedNameForDataView = QualifiedNameUtils.buildQualifiedName("", Constants.INFORMATION_VIEW, requestBody.getDataView().getId()); - InstanceProperties dataViewProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForDataView) - .withStringProperty(Constants.NAME, requestBody.getDataView().getName()) - .withStringProperty(Constants.OWNER, requestBody.getDataView().getAuthor()) - .withStringProperty(Constants.ID, requestBody.getDataView().getId()) - .withStringProperty(Constants.LAST_MODIFIER, requestBody.getDataView().getLastModifier()) - .withDateProperty(Constants.LAST_MODIFIED_TIME, requestBody.getDataView().getLastModifiedTime()) - .withDateProperty(Constants.CREATE_TIME, requestBody.getDataView().getCreatedTime()) - .withStringProperty(Constants.NATIVE_CLASS, requestBody.getDataView().getNativeClass()) - .build(); - - - OMEntityWrapper dataViewWrapper = omEntityDao.createOrUpdateExternalEntity(userId, - Constants.INFORMATION_VIEW, - qualifiedNameForDataView, - requestBody.getRegistrationGuid(), - requestBody.getRegistrationQualifiedName(), - dataViewProperties, - null, - true, - true); - - - dataViewCreator.createDataView(userId, requestBody, dataViewWrapper.getEntityDetail()); - -// if (dataViewWrapper.getEntityStatus().equals(OMEntityWrapper.EntityStatus.NEW)) { -// dataViewCreator.createDataView(requestBody, dataViewWrapper.getEntityDetail()); -// } else { -// dataViewUpdater.updateDataView(requestBody, dataViewWrapper.getEntityDetail()); -// } TODO update not implemented yet - return dataViewWrapper.getEntityDetail().getGUID(); - } - } \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewUpdater.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewUpdater.java deleted file mode 100644 index 4be467e7271..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/DataViewUpdater.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.events.DataViewRequestBody; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DataViewUpdater extends DataViewBasicOperation { - - private static final Logger log = LoggerFactory.getLogger(DataViewUpdater.class); - - protected DataViewUpdater(org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - super(omEntityDao, lookupHelper, helper, auditLog); - } - - public void updateDataView(DataViewRequestBody requestBody, EntityDetail entityDetail) { - //TODO - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/EntityReferenceResolver.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/EntityReferenceResolver.java deleted file mode 100644 index a25ee558a38..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/EntityReferenceResolver.java +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.*; -import org.odpi.openmetadata.accessservices.informationview.lookup.*; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.springframework.util.StringUtils; - -import java.util.HashMap; -import java.util.Map; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.ExceptionHandler.buildRetrieveEntityException; - -public class EntityReferenceResolver { - - - private OMEntityDao omEntityDao; - private Map strategies = new HashMap<>(); - private LookupBasedOnDatabaseColumn lookupBasedOnDatabaseColumn; - private LookupBasedOnReportColumn lookupBasedOnReportColumn; - private LookupBasedOnDataView lookupBasedOnDataView; - - public EntityReferenceResolver(LookupHelper lookupHelper, OMEntityDao omEntityDao) { - lookupBasedOnDatabaseColumn = new LookupBasedOnDatabaseColumn(lookupHelper); - lookupBasedOnReportColumn = new LookupBasedOnReportColumn(omEntityDao); - lookupBasedOnDataView = new LookupBasedOnDataView(omEntityDao); - this.omEntityDao = omEntityDao; - buildStrategies(); - } - - private void buildStrategies() { - strategies.put(DatabaseColumnSource.class.getName(), lookupBasedOnDatabaseColumn); - strategies.put(ReportColumnSource.class.getName(), lookupBasedOnReportColumn); - strategies.put(DataViewColumnSource.class.getName(), lookupBasedOnDataView); - } - - - /** - * - * @param source - object used to describe the source of the report column - * @return - */ - public String resolveSourceGuid(Source source) { - if (source == null) - return null; - if (!StringUtils.isEmpty(source.getGuid())) { - return source.getGuid(); - } - if (!StringUtils.isEmpty(source.getQualifiedName())) { - return omEntityDao.getEntity(source.getClass().getName(), source.getQualifiedName(), false).getGUID(); - } - LookupStrategy strategy = strategies.get(source.getClass().getName()); - if (strategy != null) { - EntityDetail entity = strategy.lookup(source); - if (entity != null) - return entity.getGUID(); - } - return null; - } - - - /** - * - * @param businessTerm - object describing the business term - * @return - */ - public String getBusinessTermGuid(BusinessTerm businessTerm) { - if (businessTerm == null) - return null; - if (!StringUtils.isEmpty(businessTerm.getGuid())) { - return businessTerm.getGuid(); - } - if (!StringUtils.isEmpty(businessTerm.getQualifiedName())) { - EntityDetail entity = omEntityDao.getEntity(Constants.BUSINESS_TERM, businessTerm.getQualifiedName(), - false); - return entity.getGUID(); - } - throw buildRetrieveEntityException(Constants.GUID, businessTerm.getGuid(), null, this.getClass().getName()); - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportBasicOperation.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportBasicOperation.java deleted file mode 100644 index 0d1525a7dc3..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportBasicOperation.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.events.ReportColumn; -import org.odpi.openmetadata.accessservices.informationview.events.ReportElement; -import org.odpi.openmetadata.accessservices.informationview.events.ReportSection; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - -public abstract class ReportBasicOperation extends BasicOperation{ - - private static final Logger log = LoggerFactory.getLogger(ReportBasicOperation.class); - - public ReportBasicOperation(OMEntityDao omEntityDao,LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - super(omEntityDao,lookupHelper, helper, auditLog); - - } - - - /** - * @param userId user id of user submitting the request - * @param qualifiedNameForParent qualified name of the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param allElements all elements linked to the current element - */ - public void addElements(String userId, String qualifiedNameForParent, String parentGuid, String registrationGuid, - String registrationQualifiedName, List allElements) { - if (allElements == null || allElements.isEmpty()) - return; - allElements.parallelStream().forEach(e -> addReportElement(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, e)); - } - - - /** - * @param userId user id of user submitting the request - * @param qualifiedNameForParent qualified name of the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param element object describing the current element - */ - public void addReportElement(String userId, String qualifiedNameForParent, String parentGuid, String registrationGuid, String registrationQualifiedName, ReportElement element) { - if (element instanceof ReportSection) { - addReportSection(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, (ReportSection) element); - } else if (element instanceof ReportColumn) { - addReportColumn(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, (ReportColumn) element); - } - } - - /** - * - * - * @param userId user id of user submitting the request* @param qualifiedNameForParent qualified name of the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param reportSection object describing the current section in the report - */ - private void addReportSection(String userId, String qualifiedNameForParent, String parentGuid, String registrationGuid, String registrationQualifiedName, ReportSection reportSection){ - EntityDetail typeEntity = addSectionAndSectionType(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, reportSection); - String qualifiedNameForSection = QualifiedNameUtils.buildQualifiedName(qualifiedNameForParent, Constants.DOCUMENT_SCHEMA_ATTRIBUTE, reportSection.getName()); - addElements(userId, qualifiedNameForSection, typeEntity.getGUID(), registrationGuid, registrationQualifiedName, reportSection.getElements()); - } - - - /** - * - * - * @param userId user id of user submitting the request* @param qualifiedNameForParent qualified name of the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid guid of software server capability source - * @param registrationQualifiedName qualified name of software server capability source - * @param reportSection object describing the current section in the report - * @return - */ - protected EntityDetail addSectionAndSectionType(String userId, String qualifiedNameForParent, String parentGuid, - String registrationGuid, String registrationQualifiedName, ReportSection reportSection) { - - String qualifiedNameForSection = QualifiedNameUtils.buildQualifiedName(qualifiedNameForParent, Constants.DOCUMENT_SCHEMA_ATTRIBUTE, reportSection.getName()); - InstanceProperties sectionProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForSection) - .withStringProperty(Constants.ATTRIBUTE_NAME, reportSection.getName()) - .build(); - EntityDetail sectionEntity = omEntityDao.addExternalEntity(userId, - Constants.DOCUMENT_SCHEMA_ATTRIBUTE, - qualifiedNameForSection, - registrationGuid, - registrationQualifiedName, - sectionProperties, - null, - false); - - omEntityDao.addExternalRelationship(userId, - Constants.ATTRIBUTE_FOR_SCHEMA, - registrationGuid, - registrationQualifiedName, - parentGuid, - sectionEntity.getGUID(), - new InstanceProperties()); - - String qualifiedNameForSectionType = buildQualifiedNameForSchemaType(qualifiedNameForParent, Constants.DOCUMENT_SCHEMA_TYPE, reportSection); - InstanceProperties schemaAttributeTypeProperties = new InstanceProperties(); - schemaAttributeTypeProperties = helper.addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, schemaAttributeTypeProperties, Constants.QUALIFIED_NAME, qualifiedNameForSectionType, "addSchemaType"); - return createSchemaType(userId, Constants.DOCUMENT_SCHEMA_TYPE, qualifiedNameForSectionType, registrationGuid, registrationQualifiedName, schemaAttributeTypeProperties, Constants.SCHEMA_ATTRIBUTE_TYPE, sectionEntity.getGUID() ); - } - - - /** - * - * - * @param userId user id of user submitting the request* @param qualifiedNameForParent qualified name of the parent element - * @param parentGuid guid of the parent element - * @param registrationGuid - guid of software server capability - * @param registrationQualifiedName - qualified name of software server capability - * @param reportColumn object describing the current column in the report - * @return entity representing column - */ - protected EntityDetail addReportColumn(String userId, - String qualifiedNameForParent, - String parentGuid, - String registrationGuid, - String registrationQualifiedName, - ReportColumn reportColumn) { - - String qualifiedNameForColumn = QualifiedNameUtils.buildQualifiedName(qualifiedNameForParent, Constants.DERIVED_SCHEMA_ATTRIBUTE, reportColumn.getName()); - InstanceProperties columnProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForColumn) - .withStringProperty(Constants.ATTRIBUTE_NAME, reportColumn.getName()) - .withStringProperty(Constants.FORMULA, reportColumn.getFormula()) - .build(); - EntityDetail derivedColumnEntity = omEntityDao.addExternalEntity(userId, - Constants.DERIVED_SCHEMA_ATTRIBUTE, - qualifiedNameForColumn, - registrationGuid, - registrationQualifiedName, - columnProperties, - null, - false); - - omEntityDao.addExternalRelationship(userId, - Constants.ATTRIBUTE_FOR_SCHEMA, - registrationGuid, - registrationQualifiedName, - parentGuid, - derivedColumnEntity.getGUID(), - new InstanceProperties()); - - - addQueryTargets(userId, registrationGuid, registrationQualifiedName, reportColumn.getSources(), derivedColumnEntity); - addSemanticAssignments(userId, registrationGuid, registrationQualifiedName, reportColumn.getBusinessTerms(), derivedColumnEntity); - String qualifiedNameForColumnType = buildQualifiedNameForSchemaType(qualifiedNameForParent, Constants.SCHEMA_TYPE, reportColumn); - InstanceProperties schemaAttributeTypeProperties = new InstanceProperties(); - schemaAttributeTypeProperties = helper.addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, schemaAttributeTypeProperties, Constants.QUALIFIED_NAME, qualifiedNameForColumnType, "addReportColumn"); - createSchemaType(userId, Constants.SCHEMA_TYPE, qualifiedNameForColumnType, registrationGuid, registrationQualifiedName, schemaAttributeTypeProperties, Constants.SCHEMA_ATTRIBUTE_TYPE, derivedColumnEntity.getGUID() ); - - return derivedColumnEntity; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportCreator.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportCreator.java deleted file mode 100644 index 12671de66ac..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportCreator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityWrapper; -import org.odpi.openmetadata.accessservices.informationview.events.ReportRequestBody; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class ReportCreator extends ReportBasicOperation { - - private static final Logger log = LoggerFactory.getLogger(ReportCreator.class); - - public ReportCreator(org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - super(omEntityDao, lookupHelper, helper, auditLog); - } - - - /** - * - * - * @param userId - * @param payload object describing the report - * @param reportEntity entity describing the report - */ - public void createReport(String userId, ReportRequestBody payload, EntityDetail reportEntity) { - String qualifiedNameForComplexSchemaType = QualifiedNameUtils.buildQualifiedName("", Constants.ASSET_SCHEMA_TYPE, payload.getReport().getId() + Constants.TYPE_SUFFIX); - InstanceProperties complexSchemaTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForComplexSchemaType) - .build(); - OMEntityWrapper complexSchemaTypeEntityWrapper = omEntityDao.createOrUpdateExternalEntity(userId, - Constants.COMPLEX_SCHEMA_TYPE, - qualifiedNameForComplexSchemaType, - payload.getRegistrationGuid(), - payload.getRegistrationQualifiedName(), - complexSchemaTypeProperties, - null, - true, - false); - - log.debug("Created report schema type {}", complexSchemaTypeEntityWrapper.getEntityDetail().getGUID()); - omEntityDao.addExternalRelationship(userId, - Constants.ASSET_SCHEMA_TYPE, - payload.getRegistrationGuid(), - payload.getRegistrationQualifiedName(), - reportEntity.getGUID(), - complexSchemaTypeEntityWrapper.getEntityDetail().getGUID(), - new InstanceProperties()); - - addElements(userId, helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, reportEntity.getProperties(), "createReport"), complexSchemaTypeEntityWrapper.getEntityDetail().getGUID(), payload.getRegistrationGuid(), payload.getRegistrationQualifiedName(), payload.getReport().getReportElements()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportHandler.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportHandler.java deleted file mode 100644 index 273b30082dd..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportHandler.java +++ /dev/null @@ -1,94 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.reports; - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityWrapper; -import org.odpi.openmetadata.accessservices.informationview.events.ReportRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.ReportSubmitException; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode.REPORT_SUBMIT_EXCEPTION; - - -public class ReportHandler { - - private static final Logger log = LoggerFactory.getLogger(ReportHandler.class); - private ReportCreator reportCreator; - private ReportUpdater reportUpdater; - private org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao omEntityDao; - private OMRSAuditLog auditLog; - - public ReportHandler(OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper repositoryHelper, OMRSAuditLog auditLog) { - reportCreator = new ReportCreator(omEntityDao, lookupHelper, repositoryHelper, auditLog); - reportUpdater = new ReportUpdater(omEntityDao, lookupHelper, repositoryHelper, auditLog); - this.omEntityDao = omEntityDao; - this.auditLog = auditLog; - } - - - /** - * @param userId - * @param payload - object describing the report - * @throws ReportSubmitException - */ - public String submitReportModel(String userId, ReportRequestBody payload) throws ReportSubmitException { - try { - if (log.isDebugEnabled()) { - log.debug("Creating report based on payload {}", payload); - } - SoftwareServerCapabilitySource softwareServerCapabilitySource = - reportCreator.retrieveSoftwareServerCapability(payload.getRegistrationGuid(), - payload.getRegistrationQualifiedName()); - payload.setRegistrationGuid(softwareServerCapabilitySource.getGuid()); - payload.setRegistrationQualifiedName(softwareServerCapabilitySource.getQualifiedName()); - - String qualifiedNameForReport = QualifiedNameUtils.buildQualifiedName("", Constants.DEPLOYED_REPORT, payload.getRegistrationQualifiedName() + BasicOperation.SEPARATOR + payload.getReport().getId()); - InstanceProperties reportProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForReport) - .withStringProperty(Constants.NAME, payload.getReport().getReportName()) - .withStringProperty(Constants.AUTHOR, payload.getReport().getAuthor()) - .withStringProperty(Constants.ID, payload.getReport().getId()) - .withStringProperty(Constants.URL, payload.getReport().getReportUrl()) - .withStringProperty(Constants.LAST_MODIFIER, payload.getReport().getLastModifier()) - .withDateProperty(Constants.LAST_MODIFIED_TIME, payload.getReport().getLastModifiedTime()) - .withDateProperty(Constants.CREATE_TIME, payload.getReport().getCreatedTime()) - .build(); - - OMEntityWrapper reportWrapper = omEntityDao.createOrUpdateExternalEntity(userId, - Constants.DEPLOYED_REPORT, - qualifiedNameForReport, - payload.getRegistrationGuid(), - payload.getRegistrationQualifiedName(), - reportProperties, - null, - true, - true); - - if (reportWrapper.getEntityStatus().equals(OMEntityWrapper.EntityStatus.NEW)) { - reportCreator.createReport(userId, payload, reportWrapper.getEntityDetail()); - } else { - reportUpdater.updateReport(userId, payload, payload.getRegistrationGuid(), payload.getRegistrationQualifiedName(), reportWrapper.getEntityDetail()); - } - return reportWrapper.getEntityDetail().getGUID(); - } catch (EntityNotKnownException | UserNotAuthorizedException | InvalidParameterException | FunctionNotSupportedException | RepositoryErrorException | EntityNotDeletedException e) { - throw new ReportSubmitException(500, - ReportHandler.class.getName(), - REPORT_SUBMIT_EXCEPTION.getFormattedErrorMessage(e.getMessage()), - REPORT_SUBMIT_EXCEPTION.getUserAction(), - REPORT_SUBMIT_EXCEPTION.getSystemAction(), - e, - payload.getReport().getReportName()); - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportUpdater.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportUpdater.java deleted file mode 100644 index 9e830f9f05e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/reports/ReportUpdater.java +++ /dev/null @@ -1,324 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.reports; - - -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityWrapper; -import org.odpi.openmetadata.accessservices.informationview.events.ReportColumn; -import org.odpi.openmetadata.accessservices.informationview.events.ReportElement; -import org.odpi.openmetadata.accessservices.informationview.events.ReportRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.ReportSection; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.ReportElementCreationException; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesUtils; -import org.odpi.openmetadata.accessservices.informationview.utils.QualifiedNameUtils; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class ReportUpdater extends ReportBasicOperation { - - - private static final Logger log = LoggerFactory.getLogger(ReportUpdater.class); - - - public ReportUpdater(OMEntityDao omEntityDao, LookupHelper lookupHelper, OMRSRepositoryHelper helper, OMRSAuditLog auditLog) { - super(omEntityDao, lookupHelper, helper, auditLog); - } - - /** - * - * - * @param userId id of user submitting the request - * @param payload - object describing the report - * @param registrationGuid guid of software server capability source - * @param registrationQualifiedName qualified name of software server capability source - * @param reportEntity - entity describing the report - */ - public void updateReport(String userId, - ReportRequestBody payload, - String registrationGuid, - String registrationQualifiedName, - EntityDetail reportEntity) throws UserNotAuthorizedException, - EntityNotKnownException, - EntityNotDeletedException, - InvalidParameterException, - RepositoryErrorException, - FunctionNotSupportedException { - String qualifiedNameForComplexSchemaType = QualifiedNameUtils.buildQualifiedName("", Constants.ASSET_SCHEMA_TYPE, payload.getReport().getId() + Constants.TYPE_SUFFIX); - - List relationships = omEntityDao.getRelationships(Constants.ASSET_SCHEMA_TYPE, reportEntity.getGUID()); - //ASSET Schema type relationship can have 1 at max for reports - Relationship schemaTypeRelationship = relationships != null && !relationships.isEmpty() ? relationships.get(0) : null; - InstanceProperties complexSchemaTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForComplexSchemaType) - .build(); - - String schemaTypeGuid; - EntityDetail schemaTypeEntity; - if (schemaTypeRelationship != null) { - schemaTypeGuid = schemaTypeRelationship.getEntityTwoProxy().getGUID(); - InstanceProperties proxyProperties = schemaTypeRelationship.getEntityTwoProxy().getUniqueProperties(); - if (EntityPropertiesUtils.matchExactlyInstanceProperties(proxyProperties, complexSchemaTypeProperties)) { - log.info("Entity {} already exists", qualifiedNameForComplexSchemaType); - } else { - omEntityDao.purgeEntity(schemaTypeRelationship.getEntityTwoProxy()); - schemaTypeEntity = addAssetSchemaType(userId, reportEntity.getGUID(), qualifiedNameForComplexSchemaType, registrationGuid, registrationQualifiedName, Constants.COMPLEX_SCHEMA_TYPE, complexSchemaTypeProperties); - schemaTypeGuid = schemaTypeEntity.getGUID(); - } - } else { - schemaTypeEntity = addAssetSchemaType(userId, reportEntity.getGUID(), qualifiedNameForComplexSchemaType, registrationGuid, registrationQualifiedName, Constants.COMPLEX_SCHEMA_TYPE, complexSchemaTypeProperties); - schemaTypeGuid = schemaTypeEntity.getGUID(); - } - - String qualifiedNameForReport = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, reportEntity.getProperties(), "updateReport"); - createOrUpdateElements(userId, qualifiedNameForReport, registrationGuid, registrationQualifiedName, schemaTypeGuid, payload.getReport().getReportElements()); - - } - - /** - * - * - * @param userId - * @param qualifiedNameForParent - qualified name of the parent element - * @param registrationGuid - * @param registrationQualifiedName - * @param parentGuid - guid of the parent element - * @param reportElements - elements describing the report - */ - private void createOrUpdateElements(String userId, - String qualifiedNameForParent, - String registrationGuid, - String registrationQualifiedName, - String parentGuid, - List reportElements) throws InvalidParameterException, - EntityNotDeletedException, - EntityNotKnownException, - FunctionNotSupportedException, - UserNotAuthorizedException, - RepositoryErrorException { - - List relationships = omEntityDao.getRelationships(Constants.ATTRIBUTE_FOR_SCHEMA, parentGuid); - List matchingEntities = filterMatchingEntities(relationships, reportElements); - if (reportElements != null && !reportElements.isEmpty()) { - reportElements.forEach(e -> createOrUpdateReportElement(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, matchingEntities, e)); - } - } - - /** - * - * @param relationships - list of existing relationships linking to report elements - * @param reportElements - list of report elements - * @return - list of entities matching the report elements - */ - private List filterMatchingEntities(List relationships, - List reportElements) throws UserNotAuthorizedException, - FunctionNotSupportedException, - InvalidParameterException, - RepositoryErrorException, - EntityNotKnownException, - EntityNotDeletedException { - List matchingEntities = new ArrayList<>(); - if (relationships != null && !relationships.isEmpty()) { - for (Relationship relationship : relationships) { - String entity2Guid = relationship.getEntityTwoProxy().getGUID(); - EntityDetail entity = omEntityDao.getEntityByGuid(entity2Guid); - if (isReportElementDeleted(reportElements, entity.getProperties())) { - omEntityDao.purgeRelationship(relationship); - deleteSection(entity); - } else { - matchingEntities.add(entity); - } - } - } - return matchingEntities; - } - - /** - * - * @param entity - entity describing the section that no longer exists - * @throws RepositoryErrorException - * @throws UserNotAuthorizedException - * @throws InvalidParameterException - * @throws FunctionNotSupportedException - * @throws EntityNotKnownException - * @throws EntityNotDeletedException - */ - private void deleteSection(EntitySummary entity) throws RepositoryErrorException, UserNotAuthorizedException, - InvalidParameterException, FunctionNotSupportedException, - EntityNotKnownException, EntityNotDeletedException { - - List typeRelationships = omEntityDao.getRelationships(Constants.COMPLEX_SCHEMA_TYPE, entity.getGUID()); - if(typeRelationships != null && !typeRelationships.isEmpty()){ - EntityProxy typeProxy = typeRelationships.get(0).getEntityOneProxy(); - List childrenRelationships = omEntityDao.getRelationships(Constants.ATTRIBUTE_FOR_SCHEMA, typeProxy.getGUID()); - if(childrenRelationships != null && !childrenRelationships.isEmpty()){ - for(Relationship relationship : childrenRelationships) - deleteSection(relationship.getEntityTwoProxy()); - } - omEntityDao.purgeEntity(typeProxy); - } - omEntityDao.purgeEntity(entity); - - - } - - /** - * - * @param reportElements - list of defined report elements - * @param properties - properties of the report element to be checked - * @return - */ - private boolean isReportElementDeleted(List reportElements, InstanceProperties properties) { - String elementName = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, properties, "isReportElementDeleted"); - return reportElements != null && !reportElements.isEmpty() && reportElements.stream().noneMatch((e -> e.getName().equals(elementName))); - } - - - /** - * @param userId - * @param qualifiedNameForParent qualified name for the parent - * @param parentGuid guid of the report element - * @param registrationGuid - * @param registrationQualifiedName - * @param existingElements entities already defined - * @param element element in the report - */ - private void createOrUpdateReportElement(String userId, String qualifiedNameForParent, String parentGuid, - String registrationGuid, String registrationQualifiedName, - List existingElements, ReportElement element) { - try { - if (element instanceof ReportSection) { - createOrUpdateReportSection(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, (ReportSection) element, existingElements); - } else if (element instanceof ReportColumn) { - createOrUpdateReportColumn(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, (ReportColumn) element, existingElements); - } - } catch (InvalidParameterException | FunctionNotSupportedException | EntityNotDeletedException | PagingErrorException | ClassificationErrorException | UserNotAuthorizedException | TypeErrorException | EntityNotKnownException | RepositoryErrorException | StatusNotSupportedException | PropertyErrorException e) { - throw new ReportElementCreationException(ReportUpdater.class.getName(), - InformationViewErrorCode.REPORT_ELEMENT_CREATION_EXCEPTION.getFormattedErrorMessage(element.getName(), e.getMessage()), - InformationViewErrorCode.REPORT_ELEMENT_CREATION_EXCEPTION.getSystemAction(), - InformationViewErrorCode.REPORT_ELEMENT_CREATION_EXCEPTION.getUserAction(), - e); - } - } - - - /** - * - * - * @param userId - * @param qualifiedNameForParent qualified name for the parent - * @param parentGuid guid of the report element - * @param registrationGuid - * @param registrationQualifiedName - * @param reportSection section in the report - * @param existingElements entities already defined - */ - private void createOrUpdateReportSection(String userId, String qualifiedNameForParent, String parentGuid, - String registrationGuid, - String registrationQualifiedName, - ReportSection reportSection, - List existingElements) throws InvalidParameterException, - EntityNotKnownException, - FunctionNotSupportedException, - UserNotAuthorizedException, - RepositoryErrorException, - EntityNotDeletedException { - - EntityDetail matchingSection = findMatchingEntityForElements(reportSection, existingElements); - if (matchingSection != null) { - List sectionTypeRelationships; - String sectionTypeGuid; - String methodName = "createOrUpdateReportSection"; - String qualifiedNameForSection = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.QUALIFIED_NAME, matchingSection.getProperties(), methodName); - String qualifiedNameForSectionType = QualifiedNameUtils.buildQualifiedName(qualifiedNameForParent, Constants.DOCUMENT_SCHEMA_TYPE, reportSection.getName() + Constants.TYPE_SUFFIX); - sectionTypeRelationships = omEntityDao.getRelationships(Constants.SCHEMA_ATTRIBUTE_TYPE, matchingSection.getGUID()); - if (sectionTypeRelationships == null || sectionTypeRelationships.isEmpty()) { - EntityDetail schemaType = createSchemaType(userId, Constants.DOCUMENT_SCHEMA_TYPE, qualifiedNameForSectionType, registrationGuid, registrationQualifiedName, helper.addStringPropertyToInstance(Constants.INFORMATION_VIEW_OMAS_NAME, new InstanceProperties(), Constants.QUALIFIED_NAME, qualifiedNameForSectionType, "addSchemaType"), Constants.SCHEMA_ATTRIBUTE_TYPE, matchingSection.getGUID() ); - sectionTypeGuid = schemaType.getGUID(); - } else { - sectionTypeGuid = sectionTypeRelationships.get(0).getEntityTwoProxy().getGUID(); - } - createOrUpdateElements(userId, qualifiedNameForSection, registrationGuid, registrationQualifiedName, sectionTypeGuid, reportSection.getElements()); - } else { - EntityDetail sectionTypeEntity = addSectionAndSectionType(userId, qualifiedNameForParent, parentGuid, registrationGuid, registrationQualifiedName, reportSection); - String qualifiedNameForSection = QualifiedNameUtils.buildQualifiedName(qualifiedNameForParent,Constants.DOCUMENT_SCHEMA_ATTRIBUTE, reportSection.getName()); - createOrUpdateElements(userId, qualifiedNameForSection, registrationGuid, registrationQualifiedName, sectionTypeEntity.getGUID(), reportSection.getElements()); - } - } - - - /** - * @param reportElement - * @param existingElements - * @return entity matching element - */ - private EntityDetail findMatchingEntityForElements(ReportElement reportElement, List existingElements) { - List matchingElements = existingElements.stream().filter(e -> { - String methodName = "findMatchingEntityForElements"; - return helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, Constants.NAME, e.getProperties(), methodName).contains(reportElement.getName()); - }).collect(Collectors.toList()); - if (matchingElements != null && !matchingElements.isEmpty()) { - return matchingElements.get(0); - } - return null; - } - - - private void createOrUpdateReportColumn(String userId, String parentQualifiedName, - String parentGuid, - String registrationGuid, - String registrationQualifiedName, - ReportColumn reportColumn, - List existingElements) throws InvalidParameterException, - StatusNotSupportedException, - PropertyErrorException, - EntityNotKnownException, - TypeErrorException, - FunctionNotSupportedException, - PagingErrorException, - ClassificationErrorException, - UserNotAuthorizedException, - RepositoryErrorException { - - EntityDetail matchingColumn = findMatchingEntityForElements(reportColumn, existingElements); - List columnType; - if (matchingColumn != null) { - String qualifiedNameForColumn = helper.getStringProperty(Constants.INFORMATION_VIEW_OMAS_NAME, - Constants.QUALIFIED_NAME, - matchingColumn.getProperties(), - "createOrUpdateReportColumn"); - - InstanceProperties columnProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForColumn) - .withStringProperty(Constants.ATTRIBUTE_NAME, reportColumn.getName()) - .withStringProperty(Constants.FORMULA, reportColumn.getFormula()) - .build(); - - OMEntityWrapper wrapper = omEntityDao.createOrUpdateEntity(Constants.DERIVED_SCHEMA_ATTRIBUTE, qualifiedNameForColumn, columnProperties, null, true, false); - createOrUpdateSemanticAssignments(userId, registrationGuid, registrationQualifiedName, reportColumn.getBusinessTerms(), wrapper.getEntityDetail().getGUID()); - createOrUpdateSchemaQueryImplementation(reportColumn.getSources(), wrapper.getEntityDetail().getGUID()); - - columnType = omEntityDao.getRelationships(Constants.SCHEMA_ATTRIBUTE_TYPE, matchingColumn.getGUID()); - if (columnType == null || columnType.isEmpty()) { - String qualifiedNameForColumnType = QualifiedNameUtils.buildQualifiedName(parentQualifiedName, Constants.SCHEMA_TYPE, reportColumn.getName()); - InstanceProperties schemaAttributeTypeProperties = new EntityPropertiesBuilder().withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForColumnType) - .build(); - createSchemaType(userId, Constants.SCHEMA_TYPE, qualifiedNameForColumnType, registrationGuid, registrationQualifiedName, schemaAttributeTypeProperties, Constants.SCHEMA_ATTRIBUTE_TYPE, wrapper.getEntityDetail().getGUID() ); - } - } else { - addReportColumn(userId, parentQualifiedName, parentGuid, registrationGuid, registrationQualifiedName, reportColumn); - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewInstanceHandler.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewInstanceHandler.java deleted file mode 100644 index 307cf891249..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewInstanceHandler.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache 2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.server; - -import org.odpi.openmetadata.accessservices.informationview.assets.DatabaseContextHandler; -import org.odpi.openmetadata.accessservices.informationview.context.DataViewContextBuilder; -import org.odpi.openmetadata.accessservices.informationview.context.ReportContextBuilder; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.PropertyServerException; -import org.odpi.openmetadata.accessservices.informationview.registration.RegistrationHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.DataViewHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.ReportHandler; -import org.odpi.openmetadata.accessservices.informationview.ffdc.InformationViewErrorCode; - -/** - * InformationViewInstanceHandler retrieves information from the instance map for the - * access service instances. The instance map is thread-safe. Instances are added - * and removed by the InformationViewAdmin class. - */ -class InformationViewInstanceHandler -{ - private static InformationViewServicesInstanceMap instanceMap = new InformationViewServicesInstanceMap(); - - /** - * Default constructor registers the access service - */ - InformationViewInstanceHandler() { - new InformationViewOMASRegistration(); - } - - - /** - * Retrieve the report creator for the access service. - * - * @param serverName name of the server tied to the request - * @return reportCreator for exclusive use by the requested instance - * @throws PropertyServerException no instance for this server - */ - ReportHandler getReportCreator(String serverName) throws PropertyServerException { - InformationViewServicesInstance instance = instanceMap.getInstance(serverName); - - if (instance != null) { - return instance.getReportHandler(); - } else { - final String methodName = "getReportCreator"; - throwError(serverName, methodName); - return null; - } - } - - - /** - * Retrieve the report data view creator for the access service. - * - * @param serverName name of the server tied to the request - * @return reportCreator for exclusive use by the requested instance - * @throws PropertyServerException no instance for this server - */ - DataViewHandler getDataViewHandler(String serverName) throws PropertyServerException { - InformationViewServicesInstance instance = instanceMap.getInstance(serverName); - - if (instance != null) { - return instance.getDataViewHandler(); - } else { - final String methodName = "getDataViewHandler"; - throwError(serverName, methodName); - return null; - } - } - /** - * Retrieve the handler for retrieving assets details for the access service. - * - * @param serverName name of the server tied to the request - * @return assetsHandler for exclusive use by the requested instance - * @throws PropertyServerException no instance for this server - */ - DatabaseContextHandler getAssetContextHandler(String serverName) throws PropertyServerException { - InformationViewServicesInstance instance = instanceMap.getInstance(serverName); - - if (instance != null) { - return instance.getContextBuilders().getDatabaseContextHandler(); - } else { - final String methodName = "getDatabaseContextHandler"; - throwError(serverName, methodName); - return null; - } - } - - /** - * - * @param serverName name of the server tied to the request - * @return registration handler for exclusive use by the requested instance - * @throws PropertyServerException - */ - RegistrationHandler getRegistrationHandler(String serverName) throws PropertyServerException { - InformationViewServicesInstance instance = instanceMap.getInstance(serverName); - - if (instance != null) { - return instance.getRegistrationHandler(); - } else { - final String methodName = "getRegistrationHandler"; - throwError(serverName, methodName); - return null; - } - } - - - ReportContextBuilder getReportContextBuilder(String serverName){ - InformationViewServicesInstance instance = instanceMap.getInstance(serverName); - - if (instance != null) { - return instance.getContextBuilders().getReportContextBuilder(); - } else { - final String methodName = "getReportContextBuilder"; - throwError(serverName, methodName); - return null; - } - } - - - DataViewContextBuilder getDataViewContextBuilder(String serverName){ - InformationViewServicesInstance instance = instanceMap.getInstance(serverName); - - if (instance != null) { - return instance.getContextBuilders().getDataViewContextBuilder(); - } else { - final String methodName = "getReportContextBuilder"; - throwError(serverName, methodName); - return null; - } - } - - - private void throwError(String serverName, String methodName) throws PropertyServerException { - InformationViewErrorCode errorCode = InformationViewErrorCode.SERVICE_NOT_INITIALIZED; - String errorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(serverName); - - throw new PropertyServerException(this.getClass().getName(), - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction()); - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewOMASRegistration.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewOMASRegistration.java deleted file mode 100644 index 7bf754e7319..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewOMASRegistration.java +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.server; - - -import org.odpi.openmetadata.accessservices.informationview.admin.InformationViewAdmin; -import org.odpi.openmetadata.adminservices.configuration.OMAGAccessServiceRegistration; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; -import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceRegistration; - -class InformationViewOMASRegistration { - - InformationViewOMASRegistration() { - - AccessServiceDescription myDescription = AccessServiceDescription.INFORMATION_VIEW_OMAS; - AccessServiceRegistration myRegistration = new AccessServiceRegistration(myDescription, - ServiceOperationalStatus.DISABLED, - InformationViewAdmin.class.getName() - - ); - OMAGAccessServiceRegistration.registerAccessService(myRegistration); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewRestServices.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewRestServices.java deleted file mode 100644 index c9c75357ddb..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewRestServices.java +++ /dev/null @@ -1,291 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.server; - -import org.odpi.openmetadata.accessservices.informationview.assets.DatabaseContextHandler; -import org.odpi.openmetadata.accessservices.informationview.context.DataViewContextBuilder; -import org.odpi.openmetadata.accessservices.informationview.context.ReportContextBuilder; -import org.odpi.openmetadata.accessservices.informationview.events.DataView; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseSource; -import org.odpi.openmetadata.accessservices.informationview.events.DeployedReport; -import org.odpi.openmetadata.accessservices.informationview.events.RegistrationRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.ReportRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.SoftwareServerCapabilitySource; -import org.odpi.openmetadata.accessservices.informationview.events.TableColumn; -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.accessservices.informationview.events.TableSource; -import org.odpi.openmetadata.accessservices.informationview.ffdc.exceptions.runtime.InformationViewExceptionBase; -import org.odpi.openmetadata.accessservices.informationview.registration.RegistrationHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.DataViewHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.ReportHandler; -import org.odpi.openmetadata.accessservices.informationview.responses.DataViewResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.DatabaseListResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.GuidResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.InformationViewOMASAPIResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.RegistrationResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.ReportResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.TableColumnsResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.TableContextResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.TableListResponse; -import org.odpi.openmetadata.accessservices.informationview.responses.VoidResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - - -public class InformationViewRestServices { - - InformationViewInstanceHandler instanceHandler = new InformationViewInstanceHandler(); - - - private static final Logger log = LoggerFactory.getLogger(InformationViewRestServices.class); - - - /** - * - * @param serverName - * @param userId - * @param requestBody - metadata representation of the report - * @return - */ - public InformationViewOMASAPIResponse submitReport(String serverName, - String userId, - ReportRequestBody requestBody) { - - GuidResponse response = new GuidResponse(); - - try { - ReportHandler reportCreator = instanceHandler.getReportCreator(serverName); - String guid = reportCreator.submitReportModel(userId, requestBody); - response.setGuid(guid); - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - - return response; - } - - /** - * - * @param serverName - * @param userId - * @param requestBody - representation of data view - * @return - */ - public InformationViewOMASAPIResponse submitDataView(String serverName, - String userId, - DataViewRequestBody requestBody) { - - GuidResponse response = new GuidResponse(); - - try { - DataViewHandler dataViewHandler = instanceHandler.getDataViewHandler(serverName); - String guid = dataViewHandler.createDataView(userId, requestBody); - response.setGuid(guid); - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - return response; - } - - /** - * - * @param serverName - * @param userId - * @param startFrom - * @param pageSize - * @return - */ - public InformationViewOMASAPIResponse getDatabases(String serverName, - String userId, - int startFrom, - int pageSize) { - - DatabaseListResponse response = new DatabaseListResponse(); - try { - DatabaseContextHandler databaseContextHandler = instanceHandler.getAssetContextHandler(serverName); - List databases = databaseContextHandler.getDatabases(startFrom, pageSize); - response.setDatabasesList(databases); - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - return response; - } - - /** - * - * @param serverName - * @param userId - * @param databaseGuid - guid of the database entity - * @param startFrom - * @param pageSize - * @return - */ - public InformationViewOMASAPIResponse getTablesForDatabase(String serverName, - String userId, - String databaseGuid, - int startFrom, - int pageSize) { - - TableListResponse response = new TableListResponse(); - - try { - DatabaseContextHandler databaseContextHandler = instanceHandler.getAssetContextHandler(serverName); - List tables = databaseContextHandler.getTables(databaseGuid, startFrom, pageSize); - response.setTableList(tables); - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - - return response; - } - - public InformationViewOMASAPIResponse getTableContext(String serverName, - String userId, - String tableGuid) { - - TableContextResponse response = new TableContextResponse(); - try { - DatabaseContextHandler databaseContextHandler = instanceHandler.getAssetContextHandler(serverName); - List tables = databaseContextHandler.getTableContext(tableGuid); - response.setTableContexts(tables); - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - return response; - } - - public InformationViewOMASAPIResponse getTableColumns(String serverName, - String userId, - String tableGuid, - int startFrom, - int pageSize) { - TableColumnsResponse response = new TableColumnsResponse(); - - try { - DatabaseContextHandler databaseContextHandler = instanceHandler.getAssetContextHandler(serverName); - List columns = databaseContextHandler.getTableColumns(tableGuid, startFrom, pageSize); - response.setTableColumns(columns); - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - - return response; - } - - public InformationViewOMASAPIResponse registerExternalTool(String serverName, - String userId, - RegistrationRequestBody requestBody) { - RegistrationResponse response = new RegistrationResponse(); - RegistrationHandler registrationHandler = instanceHandler.getRegistrationHandler(serverName); - try { - SoftwareServerCapabilitySource softwareServerCapabilitySource = registrationHandler.registerTool(requestBody); - response.setSoftwareServerCapabilitySource(softwareServerCapabilitySource); - } catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - return response; - } - - - /** - * - * @param serverName - * @param userId - * @param requestBody payload containing the properties describing the external tool - * @return - */ - public InformationViewOMASAPIResponse lookupRegistration(String serverName, - String userId, - RegistrationRequestBody requestBody) { - RegistrationResponse response = new RegistrationResponse(); - RegistrationHandler registrationHandler = instanceHandler.getRegistrationHandler(serverName); - try { - SoftwareServerCapabilitySource softwareServerCapabilitySource = registrationHandler.lookupSoftwareServerCapability(requestBody); - response.setSoftwareServerCapabilitySource(softwareServerCapabilitySource); - } catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - return response; - } - - - /** - * - * @param serverName - * @param userId - * @param reportId unique identifier in the owner tool of the report - * @return - */ - public InformationViewOMASAPIResponse retrieveReport(String serverName, - String userId, - String reportId) { - - - try { - ReportContextBuilder reportContextBuilder = instanceHandler.getReportContextBuilder(serverName); - DeployedReport report = reportContextBuilder.retrieveReport(reportId); - ReportResponse reportResponse = new ReportResponse(); - reportResponse.setReport(report); - return reportResponse; - - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - - } - - /** - * - * @param serverName - * @param userId - * @param dataViewId external unique identifier of the data view - * @return - */ - public InformationViewOMASAPIResponse retrieveDataView(String serverName, - String userId, - String dataViewId) { - try { - DataViewContextBuilder dataViewContextHandler = instanceHandler.getDataViewContextBuilder(serverName); - DataView report = dataViewContextHandler.retrieveDataView(dataViewId); - DataViewResponse reportResponse = new DataViewResponse(); - reportResponse.setDataView(report); - return reportResponse; - - } - catch (InformationViewExceptionBase e) { - log.error(e.getMessage(), e); - return handleErrorResponse(e); - } - - } - - private InformationViewOMASAPIResponse handleErrorResponse(InformationViewExceptionBase e) { - VoidResponse response = new VoidResponse(); - response.setExceptionClassName(e.getReportingClassName()); - response.setExceptionErrorMessage(e.getReportedErrorMessage()); - response.setRelatedHTTPCode(e.getHttpErrorCode()); - response.setExceptionUserAction(e.getReportedUserAction()); - return response; - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstance.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstance.java deleted file mode 100644 index b0bb0292a33..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstance.java +++ /dev/null @@ -1,68 +0,0 @@ -/* SPDX-License-Identifier: Apache 2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.server; - - -import org.odpi.openmetadata.accessservices.informationview.context.ContextBuilders; -import org.odpi.openmetadata.accessservices.informationview.registration.RegistrationHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.DataViewHandler; -import org.odpi.openmetadata.accessservices.informationview.reports.ReportHandler; - - -/** - * InformationViewServicesInstance caches references to OMRS objects for a specific server. - * It is also responsible for registering itself in the instance map. - */ -public class InformationViewServicesInstance -{ - private ReportHandler reportHandler; - private DataViewHandler dataViewHandler; - private ContextBuilders contextBuilders; - private RegistrationHandler registrationHandler; - private String serverName; - - - /** - * Set up the local repository connector that will service the REST Calls. - * - * @param reportHandler link to the repository responsible for servicing the REST calls. - */ - public InformationViewServicesInstance(ReportHandler reportHandler, DataViewHandler dataViewHandler, RegistrationHandler registrationHandler, ContextBuilders contextBuilders, String serverName) { - this.reportHandler = reportHandler; - this.dataViewHandler = dataViewHandler; - this.registrationHandler = registrationHandler; - this.contextBuilders = contextBuilders; - this.serverName = serverName; - - InformationViewServicesInstanceMap.setNewInstanceForJVM(serverName, this); - } - - - /** - * Return the report creator for this server. - * - * @return ReportCreator object - */ - public ReportHandler getReportHandler() { - return this.reportHandler; - } - - - public DataViewHandler getDataViewHandler(){ - return this.dataViewHandler; - } - - - public RegistrationHandler getRegistrationHandler(){return registrationHandler;} - - public ContextBuilders getContextBuilders() { - return contextBuilders; - } - - /** - * Unregister this instance from the instance map. - */ - public void shutdown() { - InformationViewServicesInstanceMap.removeInstanceForJVM(serverName); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstanceMap.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstanceMap.java deleted file mode 100644 index 6009a85d3a6..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/InformationViewServicesInstanceMap.java +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache 2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.server; - - -import java.util.HashMap; -import java.util.Map; - -/** - * InformationViewServicesInstanceMap provides the mapping for inbound REST requests to the appropriate instances - * for the requested server. The map is maintained in a static so it is scoped to the class loader. - * - * Instances of this class call the synchronized static methods to work with the map. - */ -public class InformationViewServicesInstanceMap -{ - private static Map instanceMap = new HashMap<>(); - - - /** - * Add a new server instance to the server map. - * - * @param serverName name of the server - * @param instance instance object - */ - static synchronized void setNewInstanceForJVM(String serverName, - InformationViewServicesInstance instance) - { - instanceMap.put(serverName, instance); - } - - - /** - * Return the instance for this server. - * - * @param serverName name of the server - * @return OMRSRepositoryServicesInstance object - */ - private static synchronized InformationViewServicesInstance getInstanceForJVM(String serverName) - { - InformationViewServicesInstance instance = instanceMap.get(serverName); - - return instance; - } - - - /** - * Remove the instance for this server. - * - * @param serverName name of the server - */ - static synchronized void removeInstanceForJVM(String serverName) - { - instanceMap.remove(serverName); - } - - - /** - * Constructor - */ - public InformationViewServicesInstanceMap() - { - } - - - /** - * Return the instance for this server. - * - * @param serverName name of the server - * @return OMRSRepositoryServicesInstance object - */ - public InformationViewServicesInstance getInstance(String serverName) - { - return InformationViewServicesInstanceMap.getInstanceForJVM(serverName); - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/Constants.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/Constants.java deleted file mode 100644 index 3506a2f2b93..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/Constants.java +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.utils; - -public class Constants { - - - public static final String INFORMATION_VIEW_OMAS_NAME = "InformationViewOmas"; - public static final String INFORMATION_VIEW = "InformationView"; - public static final String RELATIONAL_TABLE = "RelationalTable"; - public static final String RELATIONAL_COLUMN = "RelationalColumn"; - public static final String BUSINESS_TERM = "GlossaryTerm"; - public static final String RELATIONAL_DB_SCHEMA_TYPE = "RelationalDBSchemaType"; - public static final String DERIVED_RELATIONAL_COLUMN = "DerivedRelationalColumn"; - public static final String DERIVED_SCHEMA_ATTRIBUTE = "DerivedSchemaAttributeProperties"; - public static final String DATA_STORE = "DataStoreProperties"; - public static final String QUALIFIED_NAME = "qualifiedName"; - public static final String OWNER = "owner"; - public static final String DESCRIPTION = "description"; - public static final String ATTRIBUTE_FOR_SCHEMA = "AttributeForSchema"; - public static final String SCHEMA_ATTRIBUTE_TYPE = "SchemaAttributeType"; - public static final String CONNECTION_TO_ASSET = "ConnectionToAsset"; - public static final String DATA_CONTENT_FOR_DATASET = "DataContentForDataSet"; - public static final String CONNECTION_TO_ENDPOINT = "ConnectionEndpoint"; - public static final String ASSET_SCHEMA_TYPE = "AssetSchemaType"; - public static final String ASSET = "Asset"; - public static final String NAME = "name"; - public static final String ATTRIBUTE_NAME = "name"; - public static final String DISPLAY_NAME = "displayName"; - public static final String AUTHOR = "author"; - public static final String USAGE = "usage"; - public static final String SUMMARY = "summary"; - public static final String ABBREVIATION = "abbreviation"; - public static final String ENCODING_STANDARD = "encodingStandard"; - public static final String DATA_TYPE = "dataType"; - public static final String ELEMENT_POSITION_NAME = "position"; - public static final String IS_NULLABLE = "isNullable"; - public static final String IS_UNIQUE = "isUnique"; - public static final String QUERY = "query"; - public static final String FORMULA = "formula"; - public static final String INFO_VIEW_PREFIX = "iv_"; - public static final String TYPE_SUFFIX = "_type"; - public static final String CONNECTION_CONNECTOR_TYPE = "ConnectionConnectorType"; - public static final String RELATIONAL_COLUMN_TYPE = "RelationalColumnType"; - public static final String SCHEMA_QUERY_IMPLEMENTATION = "SchemaQueryImplementation"; - public static final String SEMANTIC_ASSIGNMENT = "SemanticAssignment"; - public static final String RELATIONAL_TABLE_TYPE = "RelationalTableType"; - public static final String URL = "url"; - public static final String EXAMPLES = "examples"; - public static final String PROTOCOL = "protocol"; - public static final String ENCRYPTION_METHOD = "encryptionMethod"; - public static final String NETWORK_ADDRESS = "networkAddress"; - public static final String ADDITIONAL_PROPERTIES = "additionalProperties"; - public static final String CONNECTOR_PROVIDER_CLASSNAME = "connectorProviderClassName"; - public static final String GAIAN_DB_NODE_NAME = "GDName"; - public static final String INFORMATION_VIEW_USER_ID = "informationViewOmas"; - public static final String CONNECTOR_TYPE = "ConnectorType"; - public static final String DEPLOYED_DATABASE_SCHEMA = "DeployedDatabaseSchema"; - public static final String ENDPOINT = "Endpoint"; - public static final String CONNECTION = "Connection"; - public static final String SOFTWARE_SERVER = "SoftwareServer"; - public static final String DATABASE_SERVER = "DatabaseServer"; - public static final String SERVER_ENDPOINT = "ServerEndpoint"; - public static final String SOFTWARE_SERVER_CAPABILITY = "SoftwareServerCapability"; - public static final String ENGINE = "Engine"; - public static final String REPORTING_ENGINE = "ReportingEngine"; - public static final String PRIMARY_KEY = "PrimaryKey"; - public static final String FOREIGN_KEY = "ForeignKey"; - public static final String DEPLOYED_REPORT = "DeployedReport"; - public static final String ID = "id"; - public static final String DOCUMENT_SCHEMA_TYPE = "DocumentSchemaType"; - public static final String DOCUMENT_SCHEMA_ATTRIBUTE = "DocumentSchemaAttribute"; - public static final String COMPLEX_SCHEMA_TYPE = "ComplexSchemaType"; - public static final String LAST_MODIFIER = "lastModifier"; - public static final String LAST_MODIFIED_TIME = "lastModifiedTime"; - public static final String CREATE_TIME = "createdTime"; - public static final String SCHEMA_ATTRIBUTE = "SchemaAttribute"; - public static final String SCHEMA_TYPE = "SchemaType"; - public static final String NATIVE_CLASS = "nativeClass"; - public static final String AGGREGATING_FUNCTION = "aggregatingFunction"; - public static final String COMMENT = "comment"; - public static final String PRIMITIVE_SCHEMA_TYPE = "PrimitiveSchemaType"; - public static final String ZONE_MEMBERSHIP = "zoneMembership"; - public static final Integer PAGE_SIZE = 100; - public static final int START_FROM = 0; - public static final String GUID = "guid"; - public static final String TYPE = "type"; - public static final String VERSION = "version"; - public static final String PATCH_LEVEL = "patchLevel"; - public static final String SOURCE = "source"; - public static final String USER_ID = "userId"; - public static final String OWNER_TYPE = "ownerType"; - public static final String DATABASE = "Database"; -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesBuilder.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesBuilder.java deleted file mode 100644 index eeabea98131..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.informationview.utils; - - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; - - -public class EntityPropertiesBuilder { - - private InstanceProperties instanceProperties; - - - /** - * default constructor - */ - public EntityPropertiesBuilder() { - instanceProperties = new InstanceProperties(); - } - - /** - * Returns the same builder - * - * @param key - name of the property - * @param value - value of the property - * @return the builder to use to return - */ - public EntityPropertiesBuilder withStringProperty(String key, String value) { - instanceProperties.setProperty(key, EntityPropertiesUtils.createPrimitiveStringPropertyValue(value)); - return this; - } - - /** - * Returns the same builder - * - * @param key - name of the property - * @param value - value of the property - * @return the builder to use to return - */ - public EntityPropertiesBuilder withIntegerProperty(String key, Integer value) { - instanceProperties.setProperty(key, EntityPropertiesUtils.createPrimitiveIntPropertyValue(value)); - return this; - } - /** - * Returns the same builder - * - * @param key - name of the property - * @param timestamp - timestamp to be formatted as date - * @return the builder to use to return - */ - public EntityPropertiesBuilder withDateProperty(String key, Long timestamp) { - instanceProperties.setProperty(key, EntityPropertiesUtils.createPrimitiveDatePropertyValue(timestamp)); - return this; - } - - - - /** - * Returns the instance properties object - * - * @return properties - */ - public InstanceProperties build() { - return instanceProperties; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesUtils.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesUtils.java deleted file mode 100644 index 582de527c58..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/EntityPropertiesUtils.java +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.utils; - -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.MapPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Map; - -public class EntityPropertiesUtils { - - private static final Logger log = LoggerFactory.getLogger(EntityPropertiesUtils.class); - - - public static PrimitivePropertyValue createPrimitiveStringPropertyValue(String value) { - PrimitivePropertyValue propertyValue = new PrimitivePropertyValue(); - propertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - propertyValue.setPrimitiveValue(value); - propertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID()); - propertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName()); - - return propertyValue; - } - - public static PrimitivePropertyValue createPrimitiveIntPropertyValue(Integer value) { - PrimitivePropertyValue propertyValue = new PrimitivePropertyValue(); - propertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT); - propertyValue.setPrimitiveValue(value); - propertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT.getGUID()); - propertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_INT.getName()); - return propertyValue; - } - - public static PrimitivePropertyValue createPrimitiveDatePropertyValue(Long timestamp) { - PrimitivePropertyValue propertyValue = new PrimitivePropertyValue(); - propertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_DATE); - propertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_DATE.getGUID()); - propertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_DATE.getName()); - propertyValue.setPrimitiveValue(timestamp); - return propertyValue; - } - - public static boolean matchExactlyInstanceProperties(InstanceProperties properties1, InstanceProperties properties2) { - //TODO change logic for this as it is not complete - if (properties1.getInstanceProperties().size() != properties2.getInstanceProperties().size()) { - return false; - } - for (Map.Entry property : properties2.getInstanceProperties().entrySet()) { - - if (!matchExactlyPropertiesValues(property.getValue(), properties1.getPropertyValue(property.getKey()))) { - log.info("ElementProperties don't match"); - return false; - } - } - log.info("ElementProperties match"); - return true; - } - - - public static boolean matchExactlyPropertiesValues(InstancePropertyValue value1, InstancePropertyValue value2) { - - if (value1 == null && value2 == null) - return true; - if (value1 == value2) - return true; - if(value1 == null || value2 == null){ - return false; - } - if (value1 instanceof PrimitivePropertyValue && value2 instanceof PrimitivePropertyValue) { - if (((PrimitivePropertyValue) value1).getPrimitiveDefCategory() == ((PrimitivePropertyValue) value2).getPrimitiveDefCategory()) { - Object primitiveValue1 = ((PrimitivePropertyValue) value1).getPrimitiveValue(); - Object primitiveValue2 = ((PrimitivePropertyValue) value2).getPrimitiveValue(); - - if(primitiveValue1 == null && primitiveValue2 == null){ - return true; - } - if(primitiveValue1 == null && primitiveValue2 != null){ - return false; - } - - return primitiveValue1.equals(primitiveValue2); - - - } - } - return false; - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/QualifiedNameUtils.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/QualifiedNameUtils.java deleted file mode 100644 index b7fbfe9c79e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/main/java/org/odpi/openmetadata/accessservices/informationview/utils/QualifiedNameUtils.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.utils; - -import org.springframework.util.StringUtils; - -public class QualifiedNameUtils { - - - public static final String SEPARATOR = "::"; - public static final String EQUALS = "="; - public static final String OPEN_BRACKET = "("; - public static final String CLOSE_BRACKET = ")"; - - - public static String buildQualifiedName(String parentQualifiedName, String typeName, String value) { - if (!StringUtils.isEmpty(parentQualifiedName)) { - return parentQualifiedName + SEPARATOR + OPEN_BRACKET + typeName + CLOSE_BRACKET + EQUALS + value; - } else { - return OPEN_BRACKET + typeName + CLOSE_BRACKET + EQUALS + value; - } - } - - - public static String buildQualifiedNameForInformationView(String hostAddress, String databaseName, String schemaName){ - String endpointQualifiedName = QualifiedNameUtils.buildQualifiedName("", Constants.SOFTWARE_SERVER, hostAddress); - String databaseQualifiedName = QualifiedNameUtils.buildQualifiedName(endpointQualifiedName, Constants.DATA_STORE, databaseName); - return QualifiedNameUtils.buildQualifiedName(databaseQualifiedName, Constants.INFORMATION_VIEW, schemaName); - } - - - public static String buildQualifiedNameForRelationalDbSchemaType(String hostAddress, String databaseName, String schemaName){ - String endpointQualifiedName = QualifiedNameUtils.buildQualifiedName("", Constants.SOFTWARE_SERVER, hostAddress); - String databaseQualifiedName = QualifiedNameUtils.buildQualifiedName(endpointQualifiedName, Constants.DATA_STORE, databaseName); - return QualifiedNameUtils.buildQualifiedName(databaseQualifiedName, Constants.RELATIONAL_DB_SCHEMA_TYPE, schemaName + Constants.TYPE_SUFFIX); - } - - - public static String buildQualifiedNameForDataViewColumn(String hostAddress, String informationViewId, String columnName){ - String endpointQualifiedName = ""; - if(!StringUtils.isEmpty(hostAddress)){ - endpointQualifiedName = QualifiedNameUtils.buildQualifiedName("", Constants.SOFTWARE_SERVER, hostAddress); - } - String informationViewQualifiedName = QualifiedNameUtils.buildQualifiedName(endpointQualifiedName, Constants.INFORMATION_VIEW, informationViewId); - return QualifiedNameUtils.buildQualifiedName(informationViewQualifiedName, Constants.DERIVED_SCHEMA_ATTRIBUTE, columnName); - - } - - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ColumnContextBuilderTest.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ColumnContextBuilderTest.java deleted file mode 100644 index 1f85ea7a37e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ColumnContextBuilderTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview; - - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.informationview.context.ColumnContextBuilder; -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentHelper; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.AdditionalMatchers.or; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.odpi.openmetadata.accessservices.informationview.TestDataHelper.*; -import static org.mockito.Mockito.when; - -public class ColumnContextBuilderTest { - - @Mock - private OMRSRepositoryConnector omrsRepositoryConnector; - @Mock - private OMRSMetadataCollection omrsMetadataCollection; - @Mock - private OMRSRepositoryContentHelper omrsRepositoryHelper; - - private ColumnContextBuilder builder; - - private TestDataHelper helper; - - @Before - public void setup() throws Exception { - MockitoAnnotations.initMocks(this); - - helper = new TestDataHelper(); - when(omrsRepositoryConnector.getMetadataCollection()).thenReturn(omrsMetadataCollection); - when(omrsRepositoryConnector.getRepositoryHelper()).thenReturn(omrsRepositoryHelper); - when(omrsRepositoryHelper.getStringProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getBooleanProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getIntProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getStringArrayProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - buildEntitiesAndRelationships(); - buildRelationshipsTypes(); - builder = new ColumnContextBuilder(omrsRepositoryConnector); - } - - private void buildEntitiesAndRelationships() throws Exception { - EntityDetail columnEntityDetail = helper.createColumnEntity(); - EntityDetail columnEntityTypeEntity = helper.createColumnTypeEntity(); - EntityDetail tableEntityDetail = helper.createTableEntity(); - EntityDetail tableTypeEntityDetail = helper.createTableTypeEntity(); - EntityDetail dbSchemaTypeEntityDetail = helper.createRelationalDBSchemaTypeEntity(); - EntityDetail deployedDatabaseSchemaEntityDetail = helper.createDeployedDatabaseSchemaEntity(); - EntityDetail databaseEntityDetail = helper.createDatabaseEntity(); - EntityDetail endpointEntityDetail = helper.createEndpointEntity(); - EntityDetail connectionEntity = helper.createConnectionEntity(); - EntityDetail connectorTypeEntity = helper.createConnectorTypeEntity(); - - - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(columnEntityDetail.getGUID()))).thenReturn(columnEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(columnEntityTypeEntity.getGUID()))).thenReturn(columnEntityTypeEntity); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(tableEntityDetail.getGUID()))).thenReturn(tableEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(tableTypeEntityDetail.getGUID()))).thenReturn(tableTypeEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(dbSchemaTypeEntityDetail.getGUID()))).thenReturn(dbSchemaTypeEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(deployedDatabaseSchemaEntityDetail.getGUID()))).thenReturn(deployedDatabaseSchemaEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(databaseEntityDetail.getGUID()))).thenReturn(databaseEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(endpointEntityDetail.getGUID()))).thenReturn(endpointEntityDetail); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(connectionEntity.getGUID()))).thenReturn(connectionEntity); - when(omrsMetadataCollection.getEntityDetail(eq(Constants.INFORMATION_VIEW_USER_ID), eq(connectorTypeEntity.getGUID()))).thenReturn(connectorTypeEntity); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(columnEntityDetail.getGUID()),eq(tableTypeEntityDetail.getGUID())), eq(ATTRIBUTE_FOR_SCHEMA_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipToParentSchemaType(columnEntityDetail.getGUID(), tableTypeEntityDetail.getGUID()))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(columnEntityDetail.getGUID()), eq(columnEntityTypeEntity.getGUID())), eq(SCHEMA_ATTRIBUTE_TYPE_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipToSchemaType(columnEntityDetail.getGUID(), columnEntityTypeEntity.getGUID()))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(tableEntityDetail.getGUID()), eq(dbSchemaTypeEntityDetail.getGUID())), eq(ATTRIBUTE_FOR_SCHEMA_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipToParentSchemaType(tableEntityDetail.getGUID(), dbSchemaTypeEntityDetail.getGUID()))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(tableEntityDetail.getGUID()), eq(tableTypeEntityDetail.getGUID())), eq(SCHEMA_ATTRIBUTE_TYPE_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipToSchemaType(tableEntityDetail.getGUID(), tableTypeEntityDetail.getGUID()))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(dbSchemaTypeEntityDetail.getGUID()), eq(deployedDatabaseSchemaEntityDetail.getGUID())), eq(ASSET_SCHEMA_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipAssetSchemaType(GUID_DB_SCHEMA_TYPE, GUID_DEPLOYED_DATABASE_SCHEMA))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(deployedDatabaseSchemaEntityDetail.getGUID()),eq(databaseEntityDetail.getGUID())), eq(DATA_CONTENT_DATASET_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipDataContentForDataSet(GUID_DEPLOYED_DATABASE_SCHEMA, GUID_DATABASE))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(databaseEntityDetail.getGUID()), eq(connectionEntity.getGUID())), eq(CONNECTION_ASSET_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationshipConnectionToAsset(GUID_DATABASE, GUID_CONNECTION))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), eq(endpointEntityDetail.getGUID()), any(String.class), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(new ArrayList<>()); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(connectionEntity.getGUID()), eq(deployedDatabaseSchemaEntityDetail.getGUID())), eq(CONNECTION_ASSET_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationship(Constants.CONNECTION_TO_ASSET, GUID_CONNECTION, GUID_DEPLOYED_DATABASE_SCHEMA))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(connectionEntity.getGUID()), eq(endpointEntityDetail.getGUID())), eq(CONNECTION_ENDPOINT_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationship(Constants.CONNECTION_TO_ENDPOINT, GUID_ENDPOINT, GUID_CONNECTION))); - when(omrsMetadataCollection.getRelationshipsForEntity(eq(Constants.INFORMATION_VIEW_USER_ID), or(eq(connectionEntity.getGUID()), eq(connectorTypeEntity.getGUID())), eq(CONNECTION_CONNECTOR_REL_TYPE_GUID), eq(0), any(List.class), eq(null), eq(null), eq(null), any(Integer.class))).thenReturn(Collections.singletonList(helper.createRelationship(Constants.CONNECTION_CONNECTOR_TYPE, GUID_CONNECTION, GUID_CONNECTOR_TYPE))); - } - - - private void buildRelationshipsTypes() { - - TypeDef typeDef = helper.buildRelationshipType(Constants.CONNECTION_TO_ENDPOINT, CONNECTION_ENDPOINT_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.CONNECTION_CONNECTOR_TYPE, CONNECTION_CONNECTOR_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.CONNECTION_TO_ASSET, CONNECTION_ASSET_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.DATA_CONTENT_FOR_DATASET, DATA_CONTENT_DATASET_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.ASSET_SCHEMA_TYPE, ASSET_SCHEMA_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.SCHEMA_ATTRIBUTE_TYPE, SCHEMA_ATTRIBUTE_TYPE_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.ATTRIBUTE_FOR_SCHEMA, ATTRIBUTE_FOR_SCHEMA_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.SCHEMA_QUERY_IMPLEMENTATION, SCHEMA_QUERY_IMPLEMENTATION_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.SEMANTIC_ASSIGNMENT, SEMANTIC_ASSIGNMENT_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - typeDef = helper.buildRelationshipType(Constants.FOREIGN_KEY, FOREIGN_KEY_REL_TYPE_GUID); - when(omrsRepositoryHelper.getTypeDefByName(Constants.INFORMATION_VIEW_USER_ID, typeDef.getName())).thenReturn(typeDef); - } - - @Test - public void testColumnContext() { - List events = builder.buildContexts(GUID_COLUMN); - assertNotNull(events); - assertEquals(events.size(), 1); - TableContextEvent event = events.get(0); - assertEquals(event.getTableSource().getName(), TABLE_NAME); - assertEquals(event.getTableSource().getSchemaName(), RELATIONAL_DB_SCHEMA_NAME); - assertEquals(event.getTableSource().getDatabaseSource().getEndpointSource().getNetworkAddress(), HOSTNAME_VALUE + ":" + PORT_VALUE); - assertEquals(event.getTableSource().getDatabaseSource().getEndpointSource().getProtocol(), PROTOCOL_VALUE); - assertEquals(event.getTableColumns().get(0).getName(), COLUMN_NAME); - - - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/DatabaseContextHandlerTest.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/DatabaseContextHandlerTest.java deleted file mode 100644 index 6a2c59f427e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/DatabaseContextHandlerTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview; - -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.jupiter.api.Assertions; -import org.odpi.openmetadata.accessservices.informationview.assets.DatabaseContextHandler; -import org.odpi.openmetadata.accessservices.informationview.events.DatabaseSource; -import org.odpi.openmetadata.accessservices.informationview.events.TableColumn; -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.accessservices.informationview.events.TableSource; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -public class DatabaseContextHandlerTest extends InMemoryRepositoryTest{ - - private DatabaseContextHandler databaseContextHandler; - - @Before - public void setup() throws Exception { - super.setup(); - databaseContextHandler = new DatabaseContextHandler(enterpriseConnector, omEntityDao, auditLog); - } - - @Ignore - @Test - public void testDatabaseContextServices() { - List databases = databaseContextHandler.getDatabases(0, 10); - assertNotNull(databases); - Assertions.assertEquals(1, databases.size(), "Database was not retrieved"); - - List tables = databaseContextHandler.getTables(databases.get(0).getGuid(), 0, 10); - - assertNotNull(tables); - assertEquals("EMPLOYEE", tables.get(0).getName()); - assertEquals("HR", tables.get(0).getSchemaName()); - - List contexts = databaseContextHandler.getTableContext(tables.get(0).getGuid()); - assertNotNull(contexts); - assertEquals("EMPLOYEE", contexts.get(0).getTableSource().getName()); - assertEquals("HR", contexts.get(0).getTableSource().getSchemaName()); - assertEquals("XE", contexts.get(0).getTableSource().getDatabaseSource().getName()); - assertEquals("host", contexts.get(0).getTableSource().getDatabaseSource().getEndpointSource().getNetworkAddress()); - assertNotNull(contexts.get(0).getTableColumns()); - assertEquals(3, contexts.get(0).getTableColumns().size()); - List columnNames = contexts.get(0).getTableColumns().stream().map(TableColumn::getName).collect(Collectors.toList()); - List expectedNames = new ArrayList<>(); - expectedNames.add("ROLE"); - expectedNames.add("FNAME"); - expectedNames.add("LNAME"); - Collections.sort(columnNames); - Collections.sort(expectedNames); - assertEquals(expectedNames, columnNames); - } - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/InMemoryRepositoryTest.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/InMemoryRepositoryTest.java deleted file mode 100644 index f68da68ca64..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/InMemoryRepositoryTest.java +++ /dev/null @@ -1,327 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview; - -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.odpi.openmetadata.accessservices.informationview.contentmanager.OMEntityDao; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.accessservices.informationview.utils.EntityPropertiesBuilder; -import org.odpi.openmetadata.adapters.repositoryservices.inmemory.repositoryconnector.InMemoryOMRSRepositoryConnectorProvider; -import org.odpi.openmetadata.adminservices.configuration.properties.OpenMetadataExchangeRule; -import org.odpi.openmetadata.frameworks.connectors.Connector; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; -import org.odpi.openmetadata.repositoryservices.archivemanager.OMRSArchiveManager; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSRepositoryEventExchangeRule; -import org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSRepositoryEventManager; -import org.odpi.openmetadata.repositoryservices.localrepository.repositoryconnector.LocalOMRSConnectorProvider; -import org.odpi.openmetadata.repositoryservices.localrepository.repositoryconnector.LocalOMRSRepositoryConnector; -import org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentHelper; -import org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentManager; -import org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentValidator; - - -import java.util.Collections; - -import static org.mockito.ArgumentMatchers.*; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.when; - -public class InMemoryRepositoryTest { - - @Mock - protected OMRSRepositoryConnector enterpriseConnector; - @Mock - protected OMRSRepositoryContentHelper omrsRepositoryHelper; - @Mock - protected OMRSAuditLog auditLog; - private OMRSRepositoryContentManager localRepositoryContentManager = null; - protected OMEntityDao omEntityDao; - - - public void setup() throws Exception { - MockitoAnnotations.initMocks(this); - omEntityDao = new OMEntityDao(enterpriseConnector, Collections.emptyList(), auditLog); - - OMRSRepositoryConnector repositoryConnector = initializeInMemoryRepositoryConnector(); - when(enterpriseConnector.getMetadataCollection()).thenReturn(repositoryConnector.getMetadataCollection()); - when(enterpriseConnector.getRepositoryHelper()).thenReturn(repositoryConnector.getRepositoryHelper()); - populateRepository(); - when(omrsRepositoryHelper.getStringProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getBooleanProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getIntProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getStringArrayProperty(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(String.class), - any(InstanceProperties.class), - any(String.class))).thenCallRealMethod(); - - - when(omrsRepositoryHelper.addStringArrayPropertyToInstance(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(InstanceProperties.class), - any(String.class), - anyList(), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.addStringPropertyToInstance(eq(Constants.INFORMATION_VIEW_OMAS_NAME), - any(InstanceProperties.class), - any(String.class), - any(String.class), - any(String.class))).thenCallRealMethod(); - when(omrsRepositoryHelper.getExactMatchRegex(any(String.class))).thenCallRealMethod(); - - } - - - private OMRSRepositoryConnector initializeInMemoryRepositoryConnector() throws ConnectorCheckedException, - ConnectionCheckedException { - - Connection connection = new Connection(); - ConnectorType connectorType = new ConnectorType(); - connection.setConnectorType(connectorType); - connectorType.setConnectorProviderClassName(InMemoryOMRSRepositoryConnectorProvider.class.getName()); - ConnectorBroker connectorBroker = new ConnectorBroker(); - Connector connector = connectorBroker.getConnector(connection); - OMRSRepositoryConnector repositoryConnector = (OMRSRepositoryConnector) connector; - - localRepositoryContentManager = new OMRSRepositoryContentManager("userID", auditLog); - - - OMRSRepositoryEventManager localRepositoryEventManager = new OMRSRepositoryEventManager("local repository outbound", - new OMRSRepositoryEventExchangeRule(OpenMetadataExchangeRule.ALL, - null), - new OMRSRepositoryContentValidator(localRepositoryContentManager), - auditLog); - - LocalOMRSRepositoryConnector localOMRSRepositoryConnector = (LocalOMRSRepositoryConnector) new LocalOMRSConnectorProvider("testLocalMetadataCollectionId", - connection, - null, - localRepositoryEventManager, - localRepositoryContentManager, - new OMRSRepositoryEventExchangeRule(OpenMetadataExchangeRule.ALL, - null)) - .getConnector(connection); - - - localOMRSRepositoryConnector.setRepositoryHelper(new OMRSRepositoryContentHelper(localRepositoryContentManager)); - localOMRSRepositoryConnector.setRepositoryValidator(new OMRSRepositoryContentValidator(localRepositoryContentManager)); - localOMRSRepositoryConnector.setAuditLog(auditLog); - localOMRSRepositoryConnector.setMetadataCollectionId("1234"); - localRepositoryContentManager.setupEventProcessor(localOMRSRepositoryConnector, localRepositoryEventManager); - - - repositoryConnector.setRepositoryHelper(new OMRSRepositoryContentHelper(localRepositoryContentManager)); - repositoryConnector.setRepositoryValidator(new OMRSRepositoryContentValidator(localRepositoryContentManager)); - repositoryConnector.setMetadataCollectionId("testMetadataCollectionId"); - repositoryConnector.start(); - localRepositoryEventManager.start(); - localOMRSRepositoryConnector.start(); - new OMRSArchiveManager(null, auditLog).setLocalRepository(localRepositoryContentManager, localRepositoryEventManager); - - return localOMRSRepositoryConnector; - } - - private void populateRepository() throws Exception { - - String qualifiedNameForSoftwareServerCapability = "registration-qualified-name"; - InstanceProperties softwareServerProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForSoftwareServerCapability) - .withStringProperty(Constants.NAME, "test-1234") - .withStringProperty(Constants.PATCH_LEVEL, "1") - .withStringProperty(Constants.VERSION, "1.1.1") - .build(); - omEntityDao.addEntity(Constants.SOFTWARE_SERVER_CAPABILITY, - qualifiedNameForSoftwareServerCapability, - softwareServerProperties, - false); - - String qualifiedNameForEndpoint = "host"; - InstanceProperties endpointProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForEndpoint) - .withStringProperty(Constants.NAME, qualifiedNameForEndpoint) - .withStringProperty(Constants.NETWORK_ADDRESS, "host") - .withStringProperty(Constants.PROTOCOL, "") - .build(); - EntityDetail endpointEntity = omEntityDao.addEntity(Constants.ENDPOINT, - qualifiedNameForEndpoint, - endpointProperties, - false); - - String qualifiedNameForConnection = qualifiedNameForEndpoint + "::" ; - InstanceProperties connectionProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForConnection) - .withStringProperty(Constants.DESCRIPTION, "Connection to " + qualifiedNameForConnection) - .build(); - EntityDetail connectionEntity = omEntityDao.addEntity(Constants.CONNECTION, - qualifiedNameForConnection, connectionProperties, false); - - omEntityDao.addRelationship(Constants.CONNECTION_TO_ENDPOINT, - endpointEntity.getGUID(), - connectionEntity.getGUID(), - new InstanceProperties()); - - String qualifiedNameForConnectorType = qualifiedNameForConnection + "::" ; - InstanceProperties connectorTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForConnectorType) - .withStringProperty(Constants.DESCRIPTION, "Connection to " + qualifiedNameForConnection) - .build(); - EntityDetail connectorType = omEntityDao.addEntity(Constants.CONNECTOR_TYPE, - qualifiedNameForConnectorType, connectorTypeProperties, false); - - omEntityDao.addRelationship(Constants.CONNECTION_CONNECTOR_TYPE, - connectionEntity.getGUID(), - connectorType.getGUID(), - new InstanceProperties()); - - - String qualifiedNameForDataStore = qualifiedNameForConnection + "::" + "XE"; - InstanceProperties dataStoreProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForDataStore) - .withStringProperty(Constants.NAME, "XE") - .build(); - EntityDetail dataStore = omEntityDao.addEntity(Constants.DATABASE, - qualifiedNameForDataStore, dataStoreProperties, true); - - - omEntityDao.addRelationship(Constants.CONNECTION_TO_ASSET, - connectionEntity.getGUID(), - dataStore.getGUID(), - new InstanceProperties()); - - - String qualifiedNameForInformationView = qualifiedNameForDataStore + "::" + "HR"; - InstanceProperties ivProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForInformationView) - .withStringProperty(Constants.NAME, "HR") - .withStringProperty(Constants.OWNER, "") - .withStringProperty(Constants.DESCRIPTION, "This asset is an " + "information " + "view") - .build(); - EntityDetail informationViewEntity = omEntityDao.addEntity(Constants.INFORMATION_VIEW, - qualifiedNameForInformationView, ivProperties, true); - - omEntityDao.addRelationship(Constants.DATA_CONTENT_FOR_DATASET, - dataStore.getGUID(), - informationViewEntity.getGUID(), - new InstanceProperties()); - - - String qualifiedNameForDbSchemaType = qualifiedNameForInformationView + Constants.TYPE_SUFFIX; - InstanceProperties dbSchemaTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForDbSchemaType) - .withStringProperty(Constants.DISPLAY_NAME, "HR" + Constants.TYPE_SUFFIX) - .withStringProperty(Constants.AUTHOR, "") - .withStringProperty(Constants.USAGE, "") - .withStringProperty(Constants.ENCODING_STANDARD, "").build(); - EntityDetail relationalDbSchemaType = omEntityDao.addEntity(Constants.RELATIONAL_DB_SCHEMA_TYPE, - qualifiedNameForDbSchemaType, - dbSchemaTypeProperties, - false); - - omEntityDao.addRelationship(Constants.ASSET_SCHEMA_TYPE, - informationViewEntity.getGUID(), - relationalDbSchemaType.getGUID(), - new InstanceProperties()); - - - String qualifiedNameForTableType = qualifiedNameForInformationView + "::" + "EMPLOYEE" + Constants.TYPE_SUFFIX; - InstanceProperties tableTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForTableType) - .withStringProperty(Constants.DISPLAY_NAME, "EMPLOYEE" + Constants.TYPE_SUFFIX) - .withStringProperty(Constants.AUTHOR, "") - .withStringProperty(Constants.USAGE, "") - .withStringProperty(Constants.ENCODING_STANDARD, "") - .build(); - EntityDetail tableTypeEntity = omEntityDao.addEntity(Constants.RELATIONAL_TABLE_TYPE, - qualifiedNameForTableType, - tableTypeProperties, - false); - - String qualifiedNameForTable = qualifiedNameForInformationView + "::" + "EMPLOYEE"; - InstanceProperties tableProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForTable) - .withStringProperty(Constants.ATTRIBUTE_NAME, "EMPLOYEE") - .build(); - EntityDetail tableEntity = omEntityDao.addEntity(Constants.RELATIONAL_TABLE, - qualifiedNameForTable, - tableProperties, - false); - - omEntityDao.addRelationship(Constants.SCHEMA_ATTRIBUTE_TYPE, - tableEntity.getGUID(), - tableTypeEntity.getGUID(), - new InstanceProperties()); - omEntityDao.addRelationship(Constants.ATTRIBUTE_FOR_SCHEMA, - relationalDbSchemaType.getGUID(), - tableEntity.getGUID(), - new InstanceProperties()); - - - addColumn(tableTypeEntity, qualifiedNameForTable, "FNAME"); - addColumn(tableTypeEntity, qualifiedNameForTable, "LNAME"); - addColumn(tableTypeEntity, qualifiedNameForTable, "ROLE"); - - - } - - private EntityDetail addColumn(EntityDetail tableTypeEntity, String qualifiedNameForTable, String columnName) throws Exception { - String qualifiedNameColumnType = qualifiedNameForTable + "::" + columnName + Constants.TYPE_SUFFIX; - InstanceProperties columnTypeProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameColumnType) - .withStringProperty(Constants.DISPLAY_NAME, columnName + Constants.TYPE_SUFFIX) - .withStringProperty(Constants.AUTHOR, "") - .withStringProperty(Constants.USAGE, "") - .withStringProperty(Constants.ENCODING_STANDARD, "") - .withStringProperty(Constants.DATA_TYPE, "VARCHAR2") - .build(); - EntityDetail columnTypeEntity = omEntityDao.addEntity(Constants.RELATIONAL_COLUMN_TYPE, - qualifiedNameColumnType, - columnTypeProperties, - false); - - String qualifiedNameForColumn = qualifiedNameForTable + "::" + columnName; - InstanceProperties columnProperties = new EntityPropertiesBuilder() - .withStringProperty(Constants.QUALIFIED_NAME, qualifiedNameForColumn) - .withStringProperty(Constants.ATTRIBUTE_NAME, columnName) - .withStringProperty(Constants.FORMULA, "") - .withIntegerProperty(Constants.ELEMENT_POSITION_NAME, 0) - .build(); - EntityDetail derivedColumnEntity = omEntityDao.addEntity(Constants.DERIVED_RELATIONAL_COLUMN, - qualifiedNameForColumn, - columnProperties, - false); - - omEntityDao.addRelationship(Constants.SCHEMA_ATTRIBUTE_TYPE, - derivedColumnEntity.getGUID(), - columnTypeEntity.getGUID(), - new InstanceProperties()); -// omEntityDao.addRelationship(Constants.SEMANTIC_ASSIGNMENT, -// derivedColumnEntity.getGUID(), -// derivedColumn.getSourceColumn().getBusinessTerms().getGuid(), -// Constants.INFORMATION_VIEW_OMAS_NAME, -// new ElementProperties()); - omEntityDao.addRelationship(Constants.ATTRIBUTE_FOR_SCHEMA, - tableTypeEntity.getGUID(), - derivedColumnEntity.getGUID(), - new InstanceProperties()); - return derivedColumnEntity; - } - - - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ReportCreationTest.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ReportCreationTest.java deleted file mode 100644 index 3b063060f80..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/ReportCreationTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.io.FileUtils; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.jupiter.api.Disabled; -import org.odpi.openmetadata.accessservices.informationview.reports.ReportHandler; -import org.odpi.openmetadata.accessservices.informationview.events.*; -import org.odpi.openmetadata.accessservices.informationview.lookup.LookupHelper; -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; - -import java.io.File; -import java.util.List; - -import static org.junit.Assert.*; - - -public class ReportCreationTest extends InMemoryRepositoryTest{ - - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private static final String TEST_USER_ID = "userId"; - private ReportHandler reportHandler; - private LookupHelper lookupHelper; - - @Before - public void setup() throws Exception { - super.setup(); - lookupHelper = new LookupHelper(enterpriseConnector, omEntityDao, auditLog); - reportHandler = new ReportHandler(omEntityDao, lookupHelper, omrsRepositoryHelper, auditLog); - } - - - @Ignore - @Test - public void testReportCreation() throws Exception { - - String payload = FileUtils.readFileToString(new File("./src/test/resources/report1.json"), "UTF-8"); - ReportRequestBody request = OBJECT_MAPPER.readValue(payload, ReportRequestBody.class); - reportHandler.submitReportModel(TEST_USER_ID, request); - EntityDetail reportEntity = omEntityDao.getEntity(Constants.DEPLOYED_REPORT, "(DeployedReport)=registration-qualified-name::report_number_35", true); - assertNotNull("Report was not created", reportEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("report_number_35", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.ID)).getPrimitiveValue()); - assertEquals("Employee35", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - assertEquals("John Martin", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.LAST_MODIFIER)).getPrimitiveValue()); - assertEquals("http://powerbi-server/reports/rep35", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.URL)).getPrimitiveValue()); - assertEquals("John Martin", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.AUTHOR)).getPrimitiveValue()); - - EntityDetail reportTypeEntity = omEntityDao.getEntity(Constants.COMPLEX_SCHEMA_TYPE, "(AssetSchemaType)=report_number_35_type", false); - assertNotNull("Report type was not created", reportTypeEntity); - List relationships = omEntityDao.getRelationships(Constants.ASSET_SCHEMA_TYPE, reportTypeEntity.getGUID()); - assertNotNull(relationships); - assertTrue("Relationship between reports and reports type was not created", !relationships.isEmpty() && relationships.size() == 1); - - - EntityDetail reportSectionEntity = omEntityDao.getEntity(Constants.DOCUMENT_SCHEMA_ATTRIBUTE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1", false); - assertNotNull("Report section was not created", reportSectionEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1", ((PrimitivePropertyValue) reportSectionEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("section1", ((PrimitivePropertyValue) reportSectionEntity.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - - EntityDetail reportNestedSectionEntity = omEntityDao.getEntity(Constants.DOCUMENT_SCHEMA_ATTRIBUTE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaAttribute)=section1.1", false); - assertNotNull("Nested Report section was not created", reportNestedSectionEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaAttribute)=section1.1", ((PrimitivePropertyValue) reportNestedSectionEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("section1.1", ((PrimitivePropertyValue) reportNestedSectionEntity.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - - EntityDetail reportNestedSectionTypeEntity = omEntityDao.getEntity(Constants.DOCUMENT_SCHEMA_TYPE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaType)=section1.1_type", false); - assertNotNull("Nested Report section type was not created", reportNestedSectionTypeEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaType)=section1.1_type", ((PrimitivePropertyValue) reportNestedSectionTypeEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - - - relationships = omEntityDao.getRelationships(Constants.SCHEMA_ATTRIBUTE_TYPE, reportNestedSectionTypeEntity.getGUID()); - assertNotNull(relationships); - assertTrue("Relationship between section and section type was not created", !relationships.isEmpty() && relationships.size() == 1); - - - relationships = omEntityDao.getRelationships(Constants.ATTRIBUTE_FOR_SCHEMA, reportNestedSectionTypeEntity.getGUID()); - assertNotNull(relationships); - assertTrue("columns for section 1.1 were not created", !relationships.isEmpty() && relationships.size() == 2); - - - EntityDetail fullNameColumnEntity = omEntityDao.getEntity(Constants.DERIVED_SCHEMA_ATTRIBUTE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaAttribute)=section1.1::(DerivedSchemaAttributeProperties)=Full Name", false); - assertNotNull("Report column was not created", fullNameColumnEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaAttribute)=section1.1::(DerivedSchemaAttributeProperties)=Full Name", ((PrimitivePropertyValue) fullNameColumnEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("Full Name", ((PrimitivePropertyValue) fullNameColumnEntity.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - assertEquals("concat", ((PrimitivePropertyValue) fullNameColumnEntity.getProperties().getPropertyValue(Constants.FORMULA)).getPrimitiveValue()); - - EntityDetail roleOfTheEmployee = omEntityDao.getEntity(Constants.DERIVED_SCHEMA_ATTRIBUTE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaAttribute)=section1.1::(DerivedSchemaAttributeProperties)=Role of the employee", false); - assertNotNull("Report column was not created", roleOfTheEmployee); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DocumentSchemaAttribute)=section1.1::(DerivedSchemaAttributeProperties)=Role of the employee", ((PrimitivePropertyValue) roleOfTheEmployee.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("Role of the employee", ((PrimitivePropertyValue) roleOfTheEmployee.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - assertEquals("upper", ((PrimitivePropertyValue) roleOfTheEmployee.getProperties().getPropertyValue(Constants.FORMULA)).getPrimitiveValue()); - - } - - @Ignore - @Test - public void testReportBasicPropertiesUpdate() throws Exception { - String payload = FileUtils.readFileToString(new File("./src/test/resources/report1.json"), "UTF-8"); - ReportRequestBody request = OBJECT_MAPPER.readValue(payload, ReportRequestBody.class); - reportHandler.submitReportModel(TEST_USER_ID, request); - EntityDetail reportEntity = omEntityDao.getEntity(Constants.DEPLOYED_REPORT, "(DeployedReport)=registration-qualified-name::report_number_35", true); - assertNotNull("Report was not created", reportEntity); - assertEquals("John Martin", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.AUTHOR)).getPrimitiveValue()); - request.getReport().setAuthor("test_author"); - reportHandler.submitReportModel(TEST_USER_ID, request); - reportEntity = omEntityDao.getEntity(Constants.DEPLOYED_REPORT, "(DeployedReport)=registration-qualified-name::report_number_35", true); - assertNotNull("Report was not created", reportEntity); - assertEquals("test_author", ((PrimitivePropertyValue) reportEntity.getProperties().getPropertyValue(Constants.AUTHOR)).getPrimitiveValue()); - } - - @Ignore - @Test - public void testReportSectionUpdate() throws Exception { - String payload = FileUtils.readFileToString(new File("./src/test/resources/report1.json"), "UTF-8"); - ReportRequestBody request = OBJECT_MAPPER.readValue(payload, ReportRequestBody.class); - request.getReport().getReportElements().get(0).setName("SectionA"); - reportHandler.submitReportModel(TEST_USER_ID, request); - EntityDetail reportEntity = omEntityDao.getEntity(Constants.DEPLOYED_REPORT, "(DeployedReport)=registration-qualified-name::report_number_35", true); - assertNotNull("Report was not created", reportEntity); - EntityDetail reportTypeEntity = omEntityDao.getEntity(Constants.COMPLEX_SCHEMA_TYPE, "(AssetSchemaType)=report_number_35_type", false); - assertNotNull("Report type was not created", reportTypeEntity); - List relationships = omEntityDao.getRelationships(Constants.ASSET_SCHEMA_TYPE, reportTypeEntity.getGUID()); - assertNotNull(relationships); - assertTrue("Relationship between reports and reports type was not created", !relationships.isEmpty() && relationships.size() == 1); - - - EntityDetail reportSectionEntity = omEntityDao.getEntity(Constants.DOCUMENT_SCHEMA_ATTRIBUTE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=SectionA", false); - assertNotNull("Report section was not created", reportSectionEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=SectionA", ((PrimitivePropertyValue) reportSectionEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("SectionA", ((PrimitivePropertyValue) reportSectionEntity.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - } - - @Ignore - @Test - public void testReportColumnUpdate() throws Exception { - String payload = FileUtils.readFileToString(new File("./src/test/resources/report1.json"), "UTF-8"); - ReportRequestBody request = OBJECT_MAPPER.readValue(payload, ReportRequestBody.class); - ReportColumn column = new ReportColumn(); - column.setName("test_column"); - column.setSources(((ReportColumn)((ReportSection)((ReportSection)request.getReport().getReportElements().get(0)).getElements().get(0)).getElements().get(0)).getSources()); - ((ReportSection)request.getReport().getReportElements().get(0)).getElements().add(column); - reportHandler.submitReportModel(TEST_USER_ID, request); - EntityDetail reportEntity = omEntityDao.getEntity(Constants.DEPLOYED_REPORT, "(DeployedReport)=registration-qualified-name::report_number_35", true); - assertNotNull("Report was not created", reportEntity); - EntityDetail reportTypeEntity = omEntityDao.getEntity(Constants.COMPLEX_SCHEMA_TYPE, "(AssetSchemaType)=report_number_35_type", false); - assertNotNull("Report type was not created", reportTypeEntity); - List relationships = omEntityDao.getRelationships(Constants.ASSET_SCHEMA_TYPE, reportTypeEntity.getGUID()); - assertNotNull(relationships); - assertTrue("Relationship between reports and reports type was not created", !relationships.isEmpty() && relationships.size() == 1); - - EntityDetail reportColumnEntity = omEntityDao.getEntity(Constants.DERIVED_SCHEMA_ATTRIBUTE, "(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DerivedSchemaAttributeProperties)=test_column", false);//registration-qualified-name::report_number_35::section1::test_column - assertNotNull("Report column was not created", reportColumnEntity); - assertEquals("(DeployedReport)=registration-qualified-name::report_number_35::(DocumentSchemaAttribute)=section1::(DerivedSchemaAttributeProperties)=test_column", ((PrimitivePropertyValue) reportColumnEntity.getProperties().getPropertyValue(Constants.QUALIFIED_NAME)).getPrimitiveValue()); - assertEquals("test_column", ((PrimitivePropertyValue) reportColumnEntity.getProperties().getPropertyValue(Constants.NAME)).getPrimitiveValue()); - } - - -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/TestDataHelper.java b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/TestDataHelper.java deleted file mode 100644 index ef6c8257005..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/java/org/odpi/openmetadata/accessservices/informationview/TestDataHelper.java +++ /dev/null @@ -1,392 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview; - - -import org.odpi.openmetadata.accessservices.informationview.utils.Constants; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.PrimitivePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; - -import java.util.ArrayList; -import java.util.List; - -import static org.odpi.openmetadata.accessservices.informationview.utils.Constants.RELATIONAL_DB_SCHEMA_TYPE; - -public class TestDataHelper { - - public static final String COLUMN_NAME = "customer_name"; - public static final String TABLE_NAME = "customer_table"; - public static final String RELATIONAL_DB_SCHEMA_NAME = "db-schema"; - public static final String DATABASE_NAME = "databaseTest"; - public static final String HOSTNAME_VALUE = "localhost"; - public static final String PORT_VALUE = "9393"; - public static final String PROTOCOL_VALUE = "jdbc:derby://"; - public static final String SCHEMA_NAME = "schema"; - public static final String PROVIDER_CLASS_NAME = "GaianConnectorProvider"; - public static final String BUSINESS_TERM_GUID = "businessTermGuid"; - public static final String REAL_COLUMN_GUID = "realColumnGuid"; - public static final String CONNECTION_ENDPOINT_REL_TYPE_GUID = "ConnectionEndpointTypeGuid"; - public static final String SERVER_ENDPOINT_REL_TYPE_GUID = "ServerEndpointTypeGuid"; - public static final String CONNECTION_CONNECTOR_REL_TYPE_GUID = "ConnectionConnectorTypeGuid"; - public static final String CONNECTION_ASSET_REL_TYPE_GUID = "ConnectionAssetTypeGuid"; - public static final String DATA_CONTENT_DATASET_REL_TYPE_GUID = "DataContentForDatasetTypeGuid"; - public static final String ASSET_SCHEMA_REL_TYPE_GUID = "AssetSchemaTypeGuid"; - public static final String SCHEMA_ATTRIBUTE_TYPE_REL_TYPE_GUID = "SchemaAttributeTypeTypeGuid"; - public static final String ATTRIBUTE_FOR_SCHEMA_REL_TYPE_GUID = "AttributeForSchemaTypeGuid"; - public static final String SCHEMA_QUERY_IMPLEMENTATION_REL_TYPE_GUID = "SchemaQueryImplementationTypeGuid"; - public static final String SEMANTIC_ASSIGNMENT_REL_TYPE_GUID = "SemanticAssignmentTypeGuid"; - public static final String FOREIGN_KEY_REL_TYPE_GUID = "ForeignKeyGuid"; - public static final String DATABASE_SERVER_TYPE_GUID = "DatabaseServerGuid"; - public static String GUID_COLUMN = "guid_column"; - public static String GUID_TABLE = "guid_table"; - - public static String GUID_COLUMN_TYPE = "guid_column_type"; - public static String GUID_TABLE_TYPE = "guid_table_type"; - public static String GUID_DB_SCHEMA_TYPE = "guid_db_schema_type"; - public static String GUID_ASSET_TYPE = "guid_asset_type"; - public static String GUID_DATABASE_TYPE = "guid_database_type"; - public static String GUID_CONNECTION = "guid_connection"; - public static String GUID_CONNECTOR_TYPE = "guid_connector_type"; - public static String GUID_DEPLOYED_DATABASE_SCHEMA = "guid_deployed_database_schema"; - public static String GUID_DATABASE = "guid_database"; - public static String GUID_ENDPOINT = "guid_endpoint"; - private static String ENDPOINT = "server"; - - - public EntityDetail createColumnEntity() { - EntityDetail entityUniverse = createEntityDetail(GUID_COLUMN); - entityUniverse.setProperties(createInstancePropertiesForSchemaAttribute(COLUMN_NAME)); - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.RELATIONAL_COLUMN); - entityUniverse.setType(instanceType); - return entityUniverse; - } - - public EntityDetail createColumnTypeEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_COLUMN_TYPE); - entityUniverse.setProperties(createInstancePropertiesForSchemaType()); - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.RELATIONAL_COLUMN_TYPE); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - - public EntityDetail createTableEntity() { - EntityDetail entityUniverse = createEntityDetail(GUID_TABLE); - entityUniverse.setProperties(createInstancePropertiesForSchemaAttribute(TABLE_NAME)); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.RELATIONAL_TABLE); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - - public EntityDetail createTableTypeEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_TABLE_TYPE); - - createRelationshipsForTableType(entityUniverse); - - entityUniverse.setProperties(createInstancePropertiesForSchemaType()); - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.RELATIONAL_TABLE_TYPE); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - public List createRelationshipsForTableType(EntityDetail entityUniverse) { - Relationship relationshipToParent = createRelationship(Constants.SCHEMA_ATTRIBUTE_TYPE, GUID_TABLE_TYPE, GUID_TABLE); - List list = new ArrayList(); - list.add(relationshipToParent); - - Relationship relationshipToColumn = createRelationship(Constants.ATTRIBUTE_FOR_SCHEMA, GUID_TABLE_TYPE, GUID_COLUMN); - list.add(relationshipToColumn); - - return list; - } - - - public EntityDetail createRelationalDBSchemaTypeEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_DB_SCHEMA_TYPE); - createRelationshipsForRelationalDbSchemaType(); - entityUniverse.setProperties(createInstancePropertiesForSchemaType()); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(RELATIONAL_DB_SCHEMA_TYPE); - entityUniverse.setType(instanceType); - return entityUniverse; - } - - public List createRelationshipsForRelationalDbSchemaType() { - List list = new ArrayList(); - Relationship relationshipAssetSchemaType = createRelationshipAssetSchemaType(GUID_DB_SCHEMA_TYPE, GUID_DEPLOYED_DATABASE_SCHEMA); - list.add(relationshipAssetSchemaType); - return list; - } - - - public EntityDetail createDeployedDatabaseSchemaEntity() { - EntityDetail entityDetail = new EntityDetail(); - entityDetail.setGUID(GUID_DEPLOYED_DATABASE_SCHEMA); - entityDetail.setProperties(createInstancePropertiesForAsset(RELATIONAL_DB_SCHEMA_NAME)); - createRelationshipsForDeployedDatabaseSchema(); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.DEPLOYED_DATABASE_SCHEMA); - entityDetail.setType(instanceType); - - return entityDetail; - } - - public List createRelationshipsForDeployedDatabaseSchema() { - List list = new ArrayList(); - Relationship relationshipTableToTableType = createRelationshipDataContentForDataSet(GUID_DEPLOYED_DATABASE_SCHEMA, GUID_DATABASE); - list.add(relationshipTableToTableType); - return list; - } - - - public EntityDetail createDatabaseEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_DATABASE); - entityUniverse.setProperties(createInstancePropertiesForAsset(DATABASE_NAME)); - createRelationshipsForDatabase(); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.DATA_STORE); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - public List createRelationshipsForDatabase() { - List list = new ArrayList(); - Relationship relationshipToConnection = createRelationshipConnectionToAsset(GUID_DATABASE, GUID_CONNECTION); - list.add(relationshipToConnection); - return list; - } - - - public EntityDetail createEndpointEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_ENDPOINT); - entityUniverse.setProperties(createInstancePropertiesForEndpoint()); - createRelationshipsForEndpoint(); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.DEPLOYED_DATABASE_SCHEMA); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - public List createRelationshipsForEndpoint() { - return new ArrayList(); - } - - public InstanceProperties createInstancePropertiesForEndpoint() { - InstanceProperties instanceProperties = new InstanceProperties(); - createStringPropertyValue(instanceProperties, Constants.PROTOCOL, PROTOCOL_VALUE); - createStringPropertyValue(instanceProperties, Constants.NETWORK_ADDRESS, HOSTNAME_VALUE + ":" + PORT_VALUE); - - return instanceProperties; - } - - public InstanceProperties createInstancePropertiesForAsset(String name) { - InstanceProperties instanceProperties = new InstanceProperties(); - - createStringPropertyValue(instanceProperties, Constants.NAME, name); - createStringPropertyValue(instanceProperties, Constants.DESCRIPTION, ""); - createStringPropertyValue(instanceProperties, Constants.OWNER, "test_user"); - - return instanceProperties; - - } - - - public EntityDetail createConnectionEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_CONNECTION); - createRelationshipsForConnection(); - - entityUniverse.setProperties(createInstancePropertiesForConnection()); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.RELATIONAL_TABLE); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - public List createRelationshipsForConnection() { - List list = new ArrayList(); - Relationship relationshipToDeployedDbSchema = createRelationship(Constants.CONNECTION_TO_ASSET, GUID_CONNECTION, GUID_DEPLOYED_DATABASE_SCHEMA); - list.add(relationshipToDeployedDbSchema); - - Relationship relationshipToEndpoint = createRelationship(Constants.CONNECTION_TO_ENDPOINT, GUID_CONNECTION, GUID_ENDPOINT); - list.add(relationshipToEndpoint); - - Relationship relationshipToConnectorType = createRelationship(Constants.CONNECTION_CONNECTOR_TYPE, GUID_CONNECTION, GUID_CONNECTOR_TYPE); - list.add(relationshipToConnectorType); - return list; - } - - public EntityDetail createConnectorTypeEntity() { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(GUID_CONNECTOR_TYPE); - createRelationshipsForConnectorType(); - - entityUniverse.setProperties(new InstanceProperties()); - - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(Constants.CONNECTOR_TYPE); - entityUniverse.setType(instanceType); - - return entityUniverse; - } - - public List createRelationshipsForConnectorType() { - List list = new ArrayList(); - Relationship relationshipToConnection = createRelationship(Constants.CONNECTION_CONNECTOR_TYPE, GUID_CONNECTION, GUID_CONNECTOR_TYPE); - list.add(relationshipToConnection); - return list; - } - - private InstanceProperties createInstancePropertiesForConnection() { - return new InstanceProperties(); - } - - private void createStringPropertyValue(InstanceProperties instanceProperties, String propertyName, String value) { - PrimitivePropertyValue propertyValue = new PrimitivePropertyValue(); - propertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - instanceProperties.setProperty(propertyName, propertyValue); - propertyValue.setTypeGUID(""); - propertyValue.setTypeName(""); - propertyValue.setPrimitiveValue(value); - } - - private InstanceProperties createInstancePropertiesForSchemaType() { - InstanceProperties instanceProperties = new InstanceProperties(); - - createStringPropertyValue(instanceProperties, "displayName", ""); - createStringPropertyValue(instanceProperties, "versionNumber", "1"); - createStringPropertyValue(instanceProperties, "author", "test"); - createStringPropertyValue(instanceProperties, "usage", "this entity is used for representing database structure"); - createStringPropertyValue(instanceProperties, "encodingStandard", ""); - - return instanceProperties; - } - - - private EntityDetail createEntityDetail(String guidSchemaAttribute) { - EntityDetail entityUniverse = new EntityDetail(); - entityUniverse.setGUID(guidSchemaAttribute); - return entityUniverse; - } - - public List createRelationships(String guidSchemaAttribute, String guidParent, String guidType) { - List list = new ArrayList(); - Relationship relationshipToParent = createRelationshipToParentSchemaType(guidSchemaAttribute, guidParent); - Relationship relationshipToType = createRelationshipToSchemaType(guidSchemaAttribute, guidType); - list.add(relationshipToParent); - list.add(relationshipToType); - return list; - } - - private InstanceProperties createInstancePropertiesForSchemaAttribute(String attrName) { - - InstanceProperties instanceProperties = new InstanceProperties(); - createStringPropertyValue(instanceProperties, Constants.ATTRIBUTE_NAME, attrName); - createStringPropertyValue(instanceProperties, "elementPosition", "1"); - createStringPropertyValue(instanceProperties, "cardinality", ""); - createStringPropertyValue(instanceProperties, "defaultValueOverride", ""); - - return instanceProperties; - } - - public Relationship createRelationship(String attributeForSchema, String guid1, String guid2) { - Relationship relationship = new Relationship(); - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(attributeForSchema); - relationship.setType(instanceType); - - EntityProxy entityOneProxy = new EntityProxy(); - entityOneProxy.setGUID(guid1); - entityOneProxy.setUniqueProperties(createInstanceProperties(guid1)); - EntityProxy entityTwoProxy = new EntityProxy(); - entityTwoProxy.setGUID(guid2); - entityTwoProxy.setUniqueProperties(createInstanceProperties(guid2)); - relationship.setEntityOneProxy(entityOneProxy); - relationship.setEntityTwoProxy(entityTwoProxy); - - return relationship; - } - - private InstanceProperties createInstanceProperties(String guid1) { - InstanceProperties instanceProperties = new InstanceProperties(); - PrimitivePropertyValue value = new PrimitivePropertyValue(); - value.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - value.setPrimitiveValue("qualifiedName." + guid1); - instanceProperties.setProperty("qualifiedName", value); - return instanceProperties; - } - - - public Relationship createRelationshipDataContentForDataSet(String dataSetGuid, String assetGuid) { - return createRelationship(Constants.DATA_CONTENT_FOR_DATASET, assetGuid, dataSetGuid); - - } - - public Relationship createRelationshipToParentSchemaType(String schemaAttributeGuid, String schemaTypeGuid) { - return createRelationship(Constants.ATTRIBUTE_FOR_SCHEMA, schemaTypeGuid, schemaAttributeGuid); - } - - - public Relationship createRelationshipToSchemaType(String schemaAttributeGuid, String schemaTypeGuid) { - return createRelationship(Constants.SCHEMA_ATTRIBUTE_TYPE, schemaAttributeGuid, schemaTypeGuid); - } - - public Relationship createRelationshipConnectionToAsset(String assetGuid, String connectionGuid) { - return createRelationship(Constants.CONNECTION_TO_ASSET, connectionGuid, assetGuid); - } - - public Relationship createRelationshipAssetSchemaType(String assetSchemaTypeGuid, String assetGuid) { - return createRelationship(Constants.ASSET_SCHEMA_TYPE, assetGuid, assetSchemaTypeGuid); - } - - - public TypeDef buildInstanceType(String typeDefName, String typeDefGuid) { - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(typeDefName); - instanceType.setTypeDefGUID(typeDefGuid); - TypeDef typeDef = new EntityDef(); - typeDef.setGUID(typeDefGuid); - typeDef.setName(typeDefName); - return typeDef; - } - - public TypeDef buildRelationshipType(String typeDefName, String typeDefGuid) { - InstanceType instanceType = new InstanceType(); - instanceType.setTypeDefName(typeDefName); - instanceType.setTypeDefGUID(typeDefGuid); - TypeDef typeDef = new RelationshipDef(); - typeDef.setGUID(typeDefGuid); - typeDef.setName(typeDefName); - return typeDef; - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/logback-test.xml b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/logback-test.xml deleted file mode 100644 index 56cb8a2deb5..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/logback-test.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/report1.json b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/report1.json deleted file mode 100644 index c8d0cf82f4d..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/report1.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "class": "ReportRequestBody", - "registrationQualifiedName": "registration-qualified-name", - "report": { - "sources": [{ - "@id": "0", - "class": "TableSource", - "name": "EMPLOYEE", - "schemaName": "HR", - "databaseSource":{ - "class": "DatabaseSource", - "name": "XE", - "endpointSource":{ - "class": "EndpointSource", - "networkAddress": "host", - "protocol": "", - "additionalProperties": { - "type": "live/import" - } - } - } - } - ], - "id": "report_number_35", - "createdTime": 1538988150715, - "author": "John Martin", - "reportName": "Employee35", - "reportPath": "/reports/employee35.xml", - "reportUrl": "http://powerbi-server/reports/rep35", - "lastModifier": "John Martin", - "lastModifiedTime": 1538988150715, - "reportElements": [{ - "class": "ReportSection", - "name": "section1", - "elements": [{ - "class": "ReportSection", - "name": "section1.1", - "elements": [{ - "class": "ReportColumn", - "name": "Full Name", - "formula": "concat", - "sources": [{ - "class": "DatabaseColumnSource", - "tableSource": "0", - "name": "FNAME" - }, { - "class": "DatabaseColumnSource", - "tableSource": "0", - "name": "LNAME" - } - ], - "businessTerm": { - "name": "Patient Full Name", - "glossaryCategory": { - "name": "Coco Pharmaceuticals" - } - } - }, { - "class": "ReportColumn", - "name": "Role of the employee", - "formula": "upper", - "sources": [{ - "class": "DatabaseColumnSource", - "tableSource": "0", - "name": "ROLE" - } - ] - } - ] - } - ] - } - ] - - - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/test.json b/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/test.json deleted file mode 100644 index 1241872b17f..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-server/src/test/resources/test.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "protocolVersionId": "OMRS V1.0", - "eventCategory": "INSTANCE", - "originator": { - "serverName": "" - }, - "eventOriginator": { - "serverName": "" - }, - "instanceEventSection": { - "typeDefGUID": "", - "typeDefName": "", - "instanceGUID": "", - "entity": {}, - "homeMetadataCollectionId": "", - "originalHomeMetadataCollectionId": "", - "originalTypeDefSummary": {}, - "originalInstanceGUID": "", - "eventType": "NEW_RELATIONSHIP_EVENT", - "relationship": { - "entityOneProxy": { - "uniqueAttributes": {}, - "guid": "123", - "type": { - "typeDefName": "RelationalColumn" - } - }, - "entityTwoProxy": { - "uniqueAttributes": {}, - "guid": "1234" - }, - "properties": {} - } - } -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-spring/build.gradle b/open-metadata-implementation/access-services/information-view/information-view-spring/build.gradle deleted file mode 100644 index bfdeec43b9e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-spring/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'org.springframework:spring-web' - implementation project(':open-metadata-implementation:access-services:information-view:information-view-server') - implementation project(':open-metadata-implementation:access-services:information-view:information-view-api') - implementation 'org.springframework:spring-context' - implementation 'javax.validation:validation-api' - implementation 'io.swagger.core.v3:swagger-annotations' - implementation 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Information View OMAS Spring' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/access-services/information-view/information-view-spring/pom.xml b/open-metadata-implementation/access-services/information-view/information-view-spring/pom.xml deleted file mode 100644 index 736ff577d7e..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-spring/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - information-view - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Information View OMAS Spring - - - - - information-view-spring - - - - - org.springframework - spring-web - - - - org.odpi.egeria - information-view-server - - - - org.odpi.egeria - information-view-api - - - - org.springframework - spring-context - - - - javax.validation - validation-api - - - - io.swagger.core.v3 - swagger-annotations - - - - - diff --git a/open-metadata-implementation/access-services/information-view/information-view-spring/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/spring/InformationViewOMASResource.java b/open-metadata-implementation/access-services/information-view/information-view-spring/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/spring/InformationViewOMASResource.java deleted file mode 100644 index 688133ae691..00000000000 --- a/open-metadata-implementation/access-services/information-view/information-view-spring/src/main/java/org/odpi/openmetadata/accessservices/informationview/server/spring/InformationViewOMASResource.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.informationview.server.spring; - - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.informationview.events.DataViewRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.RegistrationRequestBody; -import org.odpi.openmetadata.accessservices.informationview.events.ReportRequestBody; -import org.odpi.openmetadata.accessservices.informationview.responses.InformationViewOMASAPIResponse; -import org.odpi.openmetadata.accessservices.informationview.server.InformationViewRestServices; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.PositiveOrZero; - - -@RestController -@RequestMapping("/servers/{serverName}/open-metadata/access-services/information-view/users/{userId}/") - -@Tag(name="Information View OMAS", description="The Information View OMAS configures and manages metadata for data tools that create virtual views over data - such as business intelligence tools and data virtualization platforms." + - "\n", externalDocs=@ExternalDocumentation(description="Information View Open Metadata Access Service (OMAS)",url="https://egeria.odpi.org/open-metadata-implementation/access-services/information-view/")) - -@Validated -public class InformationViewOMASResource { - - private final InformationViewRestServices restAPI = new InformationViewRestServices(); - - public InformationViewOMASResource() { - - } - - /** - * Save the report metadata representation - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param requestBody The json representing the structure of the report and basic report properties - * @return Success or Failure response describing the error based on status of the operation - */ - @PostMapping(path = "/report") - public InformationViewOMASAPIResponse submitReport(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @Valid @RequestBody ReportRequestBody requestBody) { - return restAPI.submitReport(serverName, userId, requestBody); - } - - - /** - * Create the metadata for the data view - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param requestBody The json representing the structure of the report and basic report properties - * @return Success or Failure response describing the error based on status of the operation - */ - @PostMapping(path = "/dataview") - public InformationViewOMASAPIResponse submitDataView(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestBody @Valid DataViewRequestBody requestBody) { - return restAPI.submitDataView(serverName, userId, requestBody); - } - - - /** - * Returns the list of databases - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param startFrom starting element (used in paging through large result sets) - * @param pageSize maximum number of results to return - * @return list of databases - */ - @GetMapping(path = "/databases") - public InformationViewOMASAPIResponse retrieveDatabases(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PositiveOrZero(message = "startFrom should be a positive number") - @RequestParam Integer startFrom, - @PositiveOrZero(message = "pageSize should be a positive number") - @RequestParam Integer pageSize) { - return restAPI.getDatabases(serverName, userId, startFrom, pageSize); - } - - /** - * - * Retrieve list of tables for a database - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param databaseGuid guid of database for which we want to retrieve the list of tables - * @param startFrom starting element (used in paging through large result sets) - * @param pageSize maximum number of results to return - * @return list of tables belonging to the database - */ - @GetMapping(path = "databases/{database}/tables") - public InformationViewOMASAPIResponse retrieveTablesForDatabase(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @NotBlank(message = "guid of the database should not be blank") - @PathVariable("database") String databaseGuid, - @PositiveOrZero(message = "startFrom should be a positive number") - @RequestParam int startFrom, - @PositiveOrZero(message = "pageSize should be a positive number") - @RequestParam int pageSize) { - return restAPI.getTablesForDatabase(serverName, userId, databaseGuid, startFrom, pageSize); - } - - /** - * - * Retrieve the full context of a table - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param tableGuid guid of the table entity - * @return the full context of the table, including host, database, schema, table name and list of columns with business terms assigned - */ - @GetMapping(path = "tables/{table}") - public InformationViewOMASAPIResponse retrieveTableContext(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @NotBlank(message = "guid of the table should not be blank") - @PathVariable("table") String tableGuid) { - return restAPI.getTableContext(serverName, userId, tableGuid); - } - - /** - * Retrieve list of columns for a table using pagination - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param tableGuid guid of the table - * @param startFrom starting element (used in paging through large result sets) - * @param pageSize maximum number of results to return - * @return list of columns belonging to the table - */ - @GetMapping(path = "tables/{table}/columns") - public InformationViewOMASAPIResponse retrieveTableColumns(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @NotBlank(message = "guid of the table should not be blank") - @PathVariable("table") String tableGuid, - @PositiveOrZero(message = "startFrom should be a positive number") - @RequestParam Integer startFrom, - @PositiveOrZero(message = "pageSize should be a positive number") - @RequestParam Integer pageSize) { - return restAPI.getTableColumns(serverName, userId, tableGuid, startFrom, pageSize); - } - - /** - * Create a SoftwareServerCapability entity containing the properties submitted in the request and describing the external tool - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param requestBody payload containing the registration details to create - * @return response containing guid of SoftwareServerCapability entity assigned to the external tool - */ - @PostMapping(path = "register") - public InformationViewOMASAPIResponse registerExternalTool(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @Valid @RequestBody RegistrationRequestBody requestBody) { - return restAPI.registerExternalTool(serverName, userId, requestBody); - } - - /** - * Return the SoftwareServerCapability entity for the external tool described in the payload - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param requestBody payload containing the registration details to lookup - * @return response containing properties of the external tool used at registration step - */ - @PostMapping(path = "registration/lookup") - public InformationViewOMASAPIResponse lookupExternalTool(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @Valid @RequestBody RegistrationRequestBody requestBody) { - return restAPI.lookupRegistration(serverName, userId, requestBody); - } - - /** - * Retrieve the report metadata representation for the report with the specified report id - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param reportId - id of the report to retrieve - * @return response containing the report metadata representation or the error in case of failure to retrieve it - */ - @GetMapping(path = "/report") - public InformationViewOMASAPIResponse retrieveReport(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @NotBlank(message = "report id should not be blank") - @RequestParam String reportId) { - return restAPI.retrieveReport(serverName, userId, reportId); - } - - /** - * Retrieve the metadata representation of the data view with the specified data view id - * - * @param serverName unique identifier for requested server. - * @param userId the unique identifier for the user - * @param dataViewId id of the data view - * @return response containing the data view metadata representation or the error in case of failure to retrieve it - */ - @GetMapping(path = "/dataview") - public InformationViewOMASAPIResponse retrieveDataView(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @NotBlank(message = "data view id should not be blank") - @RequestParam String dataViewId) { - return restAPI.retrieveDataView(serverName, userId, dataViewId); - } - -} diff --git a/open-metadata-implementation/access-services/information-view/pom.xml b/open-metadata-implementation/access-services/information-view/pom.xml deleted file mode 100644 index af24e664a6e..00000000000 --- a/open-metadata-implementation/access-services/information-view/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - access-services - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Information View OMAS - - The Information View Open Metadata Access Service (OMAS) configures and manages metadata for data tools that - create virtual views over data - such as business intelligence tools and - data virtualization platforms. - - - information-view - pom - - information-view-client - information-view-server - information-view-spring - information-view-api - - - - diff --git a/open-metadata-implementation/access-services/pom.xml b/open-metadata-implementation/access-services/pom.xml index 2c33c13743a..5323aa67b19 100644 --- a/open-metadata-implementation/access-services/pom.xml +++ b/open-metadata-implementation/access-services/pom.xml @@ -46,7 +46,6 @@ discovery-engine governance-engine governance-program - information-view it-infrastructure project-management security-manager diff --git a/open-metadata-implementation/adapters/authentication-plugins/README.md b/open-metadata-implementation/adapters/authentication-plugins/README.md index b304e3538f1..6a0b2b50e25 100644 --- a/open-metadata-implementation/adapters/authentication-plugins/README.md +++ b/open-metadata-implementation/adapters/authentication-plugins/README.md @@ -7,9 +7,6 @@ Authentication plugins support extensions to technology such as LDAP that are used to verify the identity of an individual or service requesting access to data/metadata. -* [Gaian Impersonation Plugin](gaian-impersonation) - used to change user Ids during access requests - through the Gaian Data Virtualization Platform. - * [HTTP Helper](http-helper) - A plug-in for managing Transport Level Security (TLS) in the server. ---- diff --git a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/README.md b/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/README.md deleted file mode 100644 index 251c5bc55ec..00000000000 --- a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/README.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -![InDev](../../../../open-metadata-publication/website/images/egeria-content-status-in-development.png#pagewidth) - -# Gaian Impersonation - -Ensure class is in classpath - -Set the following in derby.properties: -derby.authentication.provider=org.apache.gaiandb.security.ProxyUserAuthenticator - -To use, add the JDBC connection properties - proxy-user (ie 'root') - proxy-pwd (ie 'admin' ) - - And set 'user' to the actual user you want to be auth;d - as ie 'nigel' - - For now password is required by the driver, but is ignored, only - the proxy-pwd is used for authentication - - There are no privilege checks on - - whether the proxy-user can be permitted to act on behalf of another user - - whether the user allows other users to impersonate it - - Further review needed. this is a first pass - proof of concept - - ---- - Return to [authentication-plugins](..) module. - - ---- - License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), - Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/build.gradle b/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/build.gradle deleted file mode 100644 index 14fd011ae2c..00000000000 --- a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - compileOnly 'com.ibm.gaiandb:gaian:2.1.8' - compileOnly 'org.apache.derby:derby:10.8.3.1' -} - -description = 'Gaian Impersonation support' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/pom.xml b/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/pom.xml deleted file mode 100644 index 5c0faef72ac..00000000000 --- a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - - gaian-impersonation - Gaian Impersonation support - Apache Derby/Gaian authentication module to support user auth by proxy (impersonation) - jar - - - authentication-plugins - org.odpi.egeria - 2.11-SNAPSHOT - - - - - 0.rgp-local - Local project repo - file://${project.basedir}/../../../../repo - - - - - - com.ibm.gaiandb - gaian - provided - - - org.apache.derby - derby - provided - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - assemble - package - - shade - - - - - - - - diff --git a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/src/main/java/org/odpi/openmetadata/adapters/authenticationplugins/gaianimpersonation/ProxyUserAuthenticator.java b/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/src/main/java/org/odpi/openmetadata/adapters/authenticationplugins/gaianimpersonation/ProxyUserAuthenticator.java deleted file mode 100644 index f5d5e3cd626..00000000000 --- a/open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation/src/main/java/org/odpi/openmetadata/adapters/authenticationplugins/gaianimpersonation/ProxyUserAuthenticator.java +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.authenticationplugins.gaianimpersonation; - -import com.ibm.gaiandb.GaianAuthenticator; -import org.apache.derby.authentication.UserAuthenticator; - -import java.sql.SQLException; -import java.util.Properties; - -/** - * ProxyUserAuthenticator performs the user authentication for the user name using the proxy properties or the basic - * authentication if proxy properties or not set up. - */ -public class ProxyUserAuthenticator implements UserAuthenticator { - - private static final com.ibm.gaiandb.Logger logger = new com.ibm.gaiandb.Logger("ProxyUserAuthenticator", 30); - - private static final String PROXY_UID_KEY = "proxy-user"; - private static final String PROXY_PWD_KEY = "proxy-pwd"; - private static final GaianAuthenticator basAuth = new GaianAuthenticator(); - - /** - * Authenticate the user using proxy properties for the default ones - * - * @param userName the name of the user that should be authenticated - * @param passwordOrSid password to authenticate the user - * @param dbName database name - * @param info properties - * @return boolean if the authentication was successful or not - * @throws SQLException provides information on a database access error or other errors - */ - public boolean authenticateUser(String userName, String passwordOrSid, String dbName, Properties info) throws SQLException { - - String userId = info.getProperty(PROXY_UID_KEY); - String password = info.getProperty(PROXY_PWD_KEY); - - boolean isAuthenticated = performProxyAuthentication(userName, dbName, info, userId, password); - - if (!isAuthenticated) { - isAuthenticated = performRegularAuthentication(userName, passwordOrSid, dbName, info); - } - - if (isAuthenticated) { - logger.logDetail("authentication was successful"); - } else { - logger.logDetail("authentication failed"); - } - - return isAuthenticated; - } - - /** - * In case that the proxy authentication failed or the proxy user is not used, - * perform regular authentication for the user, no need to manipulate properties. - * - * @param userName the name of the user that should be authenticated - * @param passwordOrSid password to authenticate the user - * @param dbName database name - * @param info properties - * @return boolean true if the authentication was successful - * @throws SQLException provides information on a database access error or other errors - */ - private boolean performRegularAuthentication(String userName, String passwordOrSid, String dbName, Properties info) throws SQLException { - logger.logDetail("Performing regular authentication for user:" + userName); - return basAuth.authenticateUser(userName, passwordOrSid, dbName, info); - } - - /** - * Authentication based on this proxy user and can assert identity amd force automatic creation of schema - * There are no additional checks to control if this user has privileges to perform escalation. - * - * @param userName the name of the user that should be authenticated - * @param dbName database name - * @param info properties - * @param userId user identifier - * @param password user password - * @return boolean true if the authentication was successful - * @throws SQLException provides information on a database access error or other errors - */ - private boolean performProxyAuthentication(String userName, String dbName, Properties info, String userId, String password) throws SQLException { - - if (userId == null || password == null) { - return false; - } - - logger.logDetail("Performing proxy authentication with user:" + userId + " on behalf of:" + userName); - info.setProperty("create", "true"); - - return basAuth.authenticateUser(userId, password, dbName, info); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/authentication-plugins/pom.xml b/open-metadata-implementation/adapters/authentication-plugins/pom.xml index 69923cc182d..9929b3f17ad 100644 --- a/open-metadata-implementation/adapters/authentication-plugins/pom.xml +++ b/open-metadata-implementation/adapters/authentication-plugins/pom.xml @@ -30,7 +30,6 @@ http-helper - gaian-impersonation authentication-plugins diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/README.md b/open-metadata-implementation/adapters/governance-engines-plugins/README.md index 255a1e87db9..c45297a835d 100644 --- a/open-metadata-implementation/adapters/governance-engines-plugins/README.md +++ b/open-metadata-implementation/adapters/governance-engines-plugins/README.md @@ -9,9 +9,6 @@ Governance Engines Plugins support plugins to governance engines to enable them to use open metadata settings in their validation and enforcement decisions they make and the resulting actions they take. -* [Gaian Ranger Authorization Plugin](gaian-ranger-plugin) - provides the ability to - control access to resources called from the Gaian Data Virtualization platform. - Return to [adapters](..) module. ---- diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/README.md b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/README.md deleted file mode 100644 index 65a83e8c743..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/README.md +++ /dev/null @@ -1,289 +0,0 @@ - - -# ranger-gaian-plugin - -**Introduction** - -This plugin provides support for Ranger policies to be implemented when access data through Gaian. -For example: - -* Permit/Deny access to Gaian Resources -* Supports Data Masking [tbd] -* Ranger Tag support (including being sourced from Apache Atlas) [tbd] - -See doc/SQLBehaviour.md for example SQL statements and how they will behave - -LIMITATIONS - * Currently the user group determined is always 'users' - -**Building the plugin** - -This project contains multiple modules for - - The ranger plugin (in the 'plugin' subdirectory) - - the Impersonation support (in the 'impersonation' subdirectory) - -Ensure the required build requirements are installed -* Java 8 (151 or above) -* Maven 3.50 or later - -Next extract the source & build: - - `git clone https://github.com/GaianRangerPlugin/ranger-gaian-plugin.git` - `cd ranger-gaian-plugin` - `mvn clean install` - -This should produce the ranger plugin built in the 'plugin\target' directory called ranger-gaian-plugin-1.0.0-SNAPSHOT.jar . -This contains the plugin AND the dependent libraries. - -NOTE: If you had an earlier version of this plugin you may have -dependent libraries in the policy directory. These are no longer required, -you ONLY need the jar file and the config files - -Also note the root 'target' directory does not currently contain any packaged deployable -components (to be aggregated later) and can be ignored. - -**Running Unit Tests** - -**Deploying the plugin to Gaian** - -First modify the 'launchGaianServer.sh' script provided by Gaian to add additional directories to the classpath, which is where -we will install the plugin. The best place to do this is just before the section of code labelled 'automatic jar discovery' : - - `export CLASSPATH="$CLASSPATH:/root/gaiandb/gaiandb/policy/*"` - `export CLASSPATH="$CLASSPATH:/root/gaiandb/gaiandb/policy/conf/"` - -* copy plugin/target/ranger-gaian-plugin-1.0.0-SNAPSHOT.jar from your build tree, to this policy folder on Gaian. - -* Copy the configuration files found in this project under plugin/src/main/resources/conf to policy/conf on gaian. These are the configuration files -for the plugin which we will edit below - -* configure Gaian to use RangerPolicyResultFilter, by adding this line at the end of gaiandb_config.properties: - - `SQL_RESULT_FILTER=org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.RangerPolicyResultFilter` - -* configure Gaian to use Table Functions - `MANAGE_LTVIEWS_WITH_TABLE_FUNCTIONS=true` - - Note that if this is changed when gaian is stopped there appears to be a bug whereby it is not picked up...  in which case it can be forced by deleting the 'gaian' subdirectory which will cause views etc to be recreated..... I'll raise a separate issue on this in gaian GitHub. - -**Deploying the Service Definition to Ranger** - -This needs to be done once only (unless the service definition changes) - - `cd resources/service-defs` - `curl -u admin:admin -X POST -H "Accept: application/json" -H "Content-Type: application/json" --data @ranger-servicedef-gaian.json http://localhost:6080/service/plugins/definitions` - -Replace localhost with the IP /port of your Ranger Server - -Once posted, the ranger access manager page should now show 'Gaian' as a selectable component - -In some cases (in particular when deploying to a standalone clean ranger, as opposed to HDP) you may -need to copy the plugin to the ranger server too. When complete this would be done to support the -resource name typeahead feature - -Make the directory & copy the plugin jar to /opt/ranger-1.0.0-SNAPSHOT-admin/ews/webapp/WEB-INF/classes/ranger-plugins/gaian - -Adjust the path as appropriate based on the install location - -**Updating an existing service definition** - -First delete any existing gaian services through the ranger UI - -Then find out the id of the gaian servicedef. This would either have been returned when deployed, or -you can pull all definitions to find it ie - - `curl -u admin:admin localhost:6080/service/public/v2/api/servicedef/ | jsonpp | less` - -'jsonpp' is one way to format a json file on macOS (installed using the 'brew' environment ie brew install jsonpp) - -Look for gaian & then find the id.... - -To delete: - - `curl -u admin:admin -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" http://9.20.65.115:6080/service/public/v2/api/servicedef/102` - -**Configuring the Gaian plugin** - -Modify the following files on gaian under policy/conf: - -* ranger-gaian-audit.xml - - To use solr modify the property 'xasecure.audit.solr.is.enabled' to true, and set the correct hostname/solr endpoint in xasecure.audit.solr.solr_url - - Alternatively to log directly to a RDBMS such as mysql modify the property 'xasecure.audit.db.is.enabled' to true, and set the correct hostname/db uri in xasecure.audit.jpa.javax.persistence.jdbc.url - -* ranger-gaian-security.xml - - In order for the gaian plugin to be able to retrieve policies, we must specify the REST endpoint. If this is - incorrect, or there is no access (firewall etc) ranger policies will not be updated/work - - Specify this in the ranger.plugin.gaian.policy.rest.url property - - Do not change the property ranger.plugin.gaian.service.name and leave it set to 'gaian' - -* log4J.properties - - This is a simple example to outlog debug logs to the console. Modify as required. It is likely helpful for debugging - in this stage of development, but in an eventual deployment log4j.properties would likely be deployed elsewhere in the - environment - -**Adding support for User Impersonation** - -The impersonation/ directory provides a module to allow a valid gaian user to assert that they are in fact -acting on behalf of another user, which does not need to be pre-configured in gaian. This allows -Ranger policies to operate on behalf of a end-user rather than a generic service account. - -To install this support - -* copy the jar - - Copy impersonation/target/gaian-impersonation-1.0.0-SNAPSHOT.jar to the 'policy' directory in Gaian (the same directory where you - added the ranger plugin) - -* modify derby.properties - - Change the auth class in the configuration similar to as follows (the old entry is commented out): - - `#derby.authentication.provider=BUILTIN` - `#derby.authentication.provider=com.ibm.gaiandb.GaianAuthenticator` - `derby.authentication.provider=org.apache.gaiandb.security.ProxyUserAuthenticator` - `derby.connection.requireAuthentication=TRUE` - -Check gaian works by starting it. If the support is not installed gaian will fail to start with many errors, and -in gaiandb.log you will find an entry stating: - - `2018-02-22 14:32:54.780 ********** GDB_WARNING: ENGINE_JDBC_CONN_ATTEMPT_ERROR: Failed JDBC Connection attempt in 172 ms for: jdbc:derby:gaiandb;create=true, cause: java.sql.SQLNonTransientConnectionException: Connection refused : FATAL: There is no Authentication Service for the system; Common issues: missing jdbc driver, network/database unavailability (e.g. firewall), incorrect user/password and/or insufficient database access rights (e.g. if derby.database.defaultConnectionMode=noAccess in derby.properties)` - -If this is seen check the jar file, properties entry, classpath & location ... derby.log may have further information bb - -To make use of this support connect to the database with properties set as follows: -* User - -The user that derby/gaian should act on behalf of, once authentication is completed - -* Password - -If proxy-user/pwd is not used this is the password of the User. -If not, it has to be specified as a non null string, but is ignored - -* proxy-user - -Specifies the service account (aka NPA) to authenticate as - -* proxy-pwd - -Specifies the proxy account's password - -So for example instead of using a string similar to - `jdbc:derby://localhost:6414/gaiandb;user=gaiandb;password=passw0rd` -Use - `jdbc:derby://localhost:6414/gaiandb;user=nigel;password=x;proxy-user=gaiandb;proxy-pwd=passw0rd` - -After authentication derby/gaian will see the user as 'nigel' even though gaiandb/passw0rd is the user/pass setup in gaian. -Therefore ranger policies can be used that refer to 'nigel' or the groups they are a member of (when implemented) - -Note that with this plugin installed -* you can still use the original way of connecting as a generic user -* with either method the service user specified must have the correct password provided - -You can check correct proxy auth by looking in gaiandb.log for lines similar to: - - 2018-02-22 15:06:49.806~869155397 ProxyUserAuthenticator -----> Performing proxy authentication with user:gaiandb on behalf of:nigel - 2018-02-22 15:21:51.567~626209601 ProxyUserAuthenticator -----> authentication was successful - -or for regular users: - - 2018-02-22 15:21:51.567~626125459 ProxyUserAuthenticator -----> Performing regular authentication for user:gaiandb - 2018-02-22 15:21:51.567~626209601 ProxyUserAuthenticator -----> authentication was successful - -whilst a failure case will look like: - - 2018-02-22 15:24:04.519~577348241 ProxyUserAuthenticator -----> Performing proxy authentication with user:gaiandb on behalf of:nigel - 2018-02-22 15:24:04.519~577422022 ProxyUserAuthenticator -----> Performing regular authentication for user:nigel - 2018-02-22 15:24:04.519~577484342 ProxyUserAuthenticator -----> authentication failed - -since we first try proxy auth (if parms specified) & then fall back to regular authentication - -Note that Gaian converts all users to upper case. However most users in ldap are typically lower case. Ranger is case sensitive meaning that -policies will not match. In the current version therefore ALL userids through gaian are mapped to lower case before policy checks occur. - -**Verifying the environment** - -(tbd) - -**Creating Ranger Policies** - -* Create a ranger service def by logging onto the Ranger UI and selecting resource policies. You should see a section labelled 'Gaian'. Create a new instance of a Gaian service. You MUST use the name 'gaian'. Tag service can be left blank for now, and whilst user/password have to be filled in, they -will be ignored. - - - -**Testing Policies** - -* A quick test: -0. Run testGaianDB.sh, it should show an empty table. -1. Create a policy of schema *, table LT0, column * on Ranger UI. -2. run testGaianDB.sh, it should show table LT0 correctly. - -* Test with specific column query: -For this to be able to work correctly, must use derby virtual table syntax. For example, if only query column LOCATION in table LT0, the syntax is: - -select firstname,lastname,birth_date from TABLE(VEMPLOYEE('VEMPLOYEE')) VEMP FETCH FIRST 100 rows only - -and then create column access/deny policies for testing. - -If instead VTI syntax is used, the user id cannot be retrieved and will be set to -If regular table/view syntax is used it is assumed ALL columns are access so policies will be unnecessarily restrictive - -This is due to current derby/gaian integration limitations. - -Data masking should also work, but due to a current issue it will fail if columns in the result set -(before masking) are null & table functions are in use. - -See RangerPolicyResultFilter:filterRowsBatch for the explanation. This will be addressed in future - -**Todos** - -* Add tag support to plugin -* Add info on verifying environment -* Create a 'dist' directory or similar with the two relevant jars + instructions + servicedef + policy configuration files -* check dependency versions. some are back level, though it may depend what ranger built with - -**Troubleshooting** - -_No Audit log entries_ - -Look in the ranger plugin output (log4J) ie: -``` -018-02-23 09:43:29 ERROR SolrAuditProvider:192 - Error sending message to Solr -java.lang.reflect.UndeclaredThrowableException - at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1713) - at org.apache.ranger.audit.provider.MiscUtil.executePrivilegedAction(MiscUtil.java:524) - at org.apache.ranger.audit.provider.solr.SolrAuditProvider.log(SolrAuditProvider.java:170) - at org.apache.ranger.audit.provider.MultiDestAuditProvider.log(MultiDestAuditProvider.java:114) - at org.apache.ranger.audit.provider.AsyncAuditProvider.run(AsyncAuditProvider.java:153) - at java.lang.Thread.run(Thread.java:748) -Caused by: org.apache.solr.client.solrj.SolrServerException: Server refused connection at: http://9.20.65.115:6083/solr/ranger_audits -``` -In this case check the hostname/port specified for solr logging - -_Policies are not cached_ - -If you see - - `2018-02-22 15:48:55 ERROR PolicyRefresher:396 - failed to save policies to cache file '/root/gaiandb/gaiandb/policycache/gaian_gaian.json'` - `java.io.FileNotFoundException: /root/gaiandb/gaiandb/policycache/gaian_gaian.json (No such file or directory)` - -check the specification of PolicyCache in the plugin configuration file & ensure the directory -exists and is writeable - -_Cannot create gaian service on ranger server_ - -If you get an error 'cannot find class XXX' copy the ranger gaian plugin to the ranger server as -documented above in the section on deploying the servicedef. - -Return to [governance-engine-plugins](..) module. - - ---- - License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), - Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/SQLBehaviour.md b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/SQLBehaviour.md deleted file mode 100644 index 2fa15cb5723..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/SQLBehaviour.md +++ /dev/null @@ -1,138 +0,0 @@ - - -#SQL Behaviour -**Introduction** - -This plugin for Gaian supports: -* Access Control Policies -* Data Masking Policies - -**Resources & Tags** - -This document will provide some example SQL statements and -current expected results - -Policies can be applied to resources including: -* Schema: - In this case the action will apply to all tables/columns/rows defined within - this schema -* Table: - In this case the action will apply to all columns/rows - within this table -* Column: - In this case the action will apply to the specified column - on all affected rows - -Wildcards can be used on resource names: -* The asterisk '*' denotes any 0 or more characters - - -Additionally the plugin supports 'tag' based policies. In this case -the resources affected by a policy are determined by any tags that are -associated with that resource as defined in Atlas. - -Currently a tag is associated directly with a resource, but in future this -classification will strictly be a classification & propogate through relationships -- for example a column 'ESAL' is associated to a business term 'employee salary' -which in turn is associated with a classification 'SPI=personal' - -For the reminder of the discussion we shall describe the expected -behaviour whenever access is restricted, or a column is masked - -**Example Table for these examples** - -* Schema is 'GAIANDB' -* Table is 'VEMPLOYEE' (this is actually a derby view created by gaian) -* Columns are all varchars : FIRSTNAME, LASTNAME, SALARY -* Salary will be used as the subject of masking & access control - -**Note for all SQL queries** - -We would normally expect to do - - select * from EMPLOYEE fetch first 100 rows only - -However in order to get accurate access control we MUST compose these queries as - - select * from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -This is due to the way Derby and Gaian interact. If this is not done, policies will -be applied more strictly than required (as if all columns in the source table are referenced) and will not follow the -behaviour below. - -**Access Control** - -User has no access to 'SALARY' - - SELECT * from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -An empty result set is returned. ie with Columns shown since the query asked for information -from the SALARY column, but zero rows as we are not permitted to return that data - - - SELECT FIRSTNAME,LASTNAME from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -Rows are returned as normal since SALARY was not requested - - SELECT FIRSTNAME,SALARY from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -An empty result set as in the first example, as salary was requested - - SELECT FIRSTNAME from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE where LASTNAME='JONESN' - -Usual results returned as no reference is made to Salary - - SELECT FIRSTNAME,LASTNAME from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE where SALARY > '100000' - -Empty result set as SALARY was found in the predicate - - SELECT FIRSTNAME,SALARY AS INNOCENTNUMBER from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -;-) No that won't work either! - -**Data Masking** - -The following kinds of masking are supported -* no mask -* null -* \**** - -If data type conversion is required which prevents the desired mask being applied -(such as **** on a numeric field) we will apply an appropriate substitution -* Dates -> Jan 1 1970 (epoch) -* Numbers -> 0 - -In this example the SALARY field will have a masking rule of '****' applied - - SELECT * from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -All rows expected are returned, but all values in the SALARY column are replaced with '***' - - - SELECT FIRSTNAME,LASTNAME from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -Rows are returned as normal since SALARY was not requested - - SELECT FIRSTNAME,SALARY from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -All rows returned, but ****'s in the SALARY column - - SELECT FIRSTNAME from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE where LASTNAME='JONESN' - -Usual results returned as no reference is made to Salary - - SELECT FIRSTNAME,LASTNAME from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE where SALARY > '100000' - -Empty result set as SALARY was found in the predicate. We can't (yet) push down -a change in predicate for more intelligent masking, so we must fail this query as -the user cannot do anything that could act on masked data - - SELECT FIRSTNAME,SALARY AS INNOCENTNUMBER from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE fetch first 100 rows only - -.. Good question! -Expected behaviour is an empty result set... - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/build.gradle b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/build.gradle deleted file mode 100644 index e37b4093606..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'com.fasterxml.jackson.core:jackson-annotations' - implementation 'org.apache.commons:commons-collections4' - implementation 'org.apache.commons:commons-lang3' - implementation 'org.apache.ranger:ranger-plugins-common' - implementation 'org.springframework:spring-web' - implementation 'org.apache.hadoop:hadoop-common' - compileOnly 'com.ibm.gaiandb:gaian:2.1.8' - compileOnly 'org.apache.derby:derby:10.8.3.1' -} - -description = 'Ranger Gaian Plugin' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/pom.xml b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/pom.xml deleted file mode 100644 index a0780ac1285..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/pom.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - gaian-ranger-plugin - Ranger Gaian Plugin - Ranger Gaian Plugin - jar - - - org.odpi.egeria - 2.11-SNAPSHOT - governance-engines-plugins - - - - - 0.rgp-local - Local project repo - file://${project.basedir}/../../../../repo - - - - - - - com.fasterxml.jackson.core - jackson-annotations - - - - org.apache.commons - commons-collections4 - - - - com.ibm.gaiandb - gaian - - - - org.apache.derby - derby - - - - org.apache.commons - commons-lang3 - - - - org.apache.ranger - ranger-plugins-common - - - - org.springframework - spring-web - - - - - org.apache.hadoop - hadoop-common - - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - assemble> - package - - shade - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - analyze - - analyze-only - - - - - org.apache.hadoop:* - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-versions - - enforce - - - > - - [3.5.0,) - ** MAVEN VERSION ERROR ** Maven 3.5.0 or above is required. See - https://maven.apache.org/install.html - - - - ERROR - [1.8,) - ** JAVA VERSION ERROR ** Java 8 (Update 151) or above is required. - - - - - - - - - - - - - - - - - - src/main/resources/ - - *.properties - - - - - src/main/resources/conf - - **/*.xml - - - - - - diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/ApplyMasking.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/ApplyMasking.java deleted file mode 100644 index e383649aad4..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/ApplyMasking.java +++ /dev/null @@ -1,98 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import org.apache.derby.iapi.error.StandardException; -import org.apache.derby.iapi.types.DataValueDescriptor; -import org.apache.derby.iapi.types.TypeId; - -import java.sql.Types; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Properties; - -public class ApplyMasking { - - private static final String DEFAULT_CHAR_MASKING = "####"; - private static final int DEFAULT_INT_MASKING = 1111; - private static final String DEFAULT_DATA_MASKING = "0001-01-01"; - private static final String YYYY_MM_DD = "yyyy-MM-dd"; - private static final String CHAR_MASKING_PROPERTY = "ranger.plugin.gaian.char.masking"; - private static final String INT_MASKING_PROPERTY = "ranger.plugin.gaian.int.masking"; - private static final String DATE_MASKING_PROPERTY = "ranger.plugin.gaian.date.masking"; - - public static void redact(DataValueDescriptor dataValueDescriptor, Boolean isNullMasking, Properties properties) throws StandardException, ParseException { - if (dataValueDescriptor == null) { - return; - } - - if (isNullMasking) { - maskedToNull(dataValueDescriptor); - } else { - customMasking(dataValueDescriptor, properties); - } - } - - private static void maskedToNull(DataValueDescriptor dataValueDescriptor) { - dataValueDescriptor.setToNull(); - } - - private static void customMasking(DataValueDescriptor dataValueDescriptor, Properties properties) throws StandardException, ParseException { - int jdbcType = TypeId.getBuiltInTypeId(dataValueDescriptor.getTypeName()).getJDBCTypeId(); - switch (jdbcType) { - case Types.CHAR: - case Types.VARCHAR: - case Types.LONGVARCHAR: - case Types.CLOB: - dataValueDescriptor.setValue(getCharMaskingValue(properties)); - break; - case Types.DATE: - case Types.TIME: - case Types.TIMESTAMP: - dataValueDescriptor.setValue(getDateMaskingValue(properties)); - break; - case Types.INTEGER: - case Types.DOUBLE: - case Types.DECIMAL: - case Types.FLOAT: - dataValueDescriptor.setValue(getIntMaskingValue(properties)); - break; - default: - dataValueDescriptor.setValue("Masked"); - } - } - - private static String getCharMaskingValue(Properties properties) { - String property = getStringProperty(properties, CHAR_MASKING_PROPERTY); - if (property != null) return property; - return DEFAULT_CHAR_MASKING; - } - - private static int getIntMaskingValue(Properties properties){ - String property = getStringProperty(properties, INT_MASKING_PROPERTY); - if (property != null) return Integer.valueOf(property); - return DEFAULT_INT_MASKING; - } - - private static Date getDateMaskingValue(Properties properties) throws ParseException { - SimpleDateFormat format = new SimpleDateFormat(YYYY_MM_DD); - return format.parse(getDateMasking(properties)); - } - - private static String getDateMasking(Properties properties){ - String property = getStringProperty(properties, DATE_MASKING_PROPERTY); - if (property != null) return property; - return DEFAULT_DATA_MASKING; - } - - private static String getStringProperty(Properties properties, String s) { - if (properties != null) { - String property = properties.getProperty(s); - if (property != null) { - return property; - } - } - return null; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/Constants.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/Constants.java deleted file mode 100644 index 370b2dcf3cf..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/Constants.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -public class Constants { - - protected static final String DEFAULT_SERVICE_TYPE = "gaian"; - protected static final String DEFAULT_APP_ID = "gaian"; - - protected static final String SCHEMA_RESOURCE = "SCHEMA"; - protected static final String TABLE_RESOURCE = "TABLE"; - protected static final String COLUMN_RESOURCE = "COLUMN"; - - protected static final String SELECT_ACTION = "SELECT"; - - protected static final String DEFAULT_SCHEMA = "Gaian"; - protected static final String UNKNOWN_USER = ""; - - protected static final String NULL_MASK_TYPE = "NULL"; - - protected static final String USER_GROUPS = "/service/xusers/secure/users/{0}"; - protected static final String USER_DETAILS = "/service/xusers/users/userName/{0}"; -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizationException.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizationException.java deleted file mode 100644 index 613327976ce..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizationException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -public class GaianAuthorizationException extends Exception { - - public GaianAuthorizationException(String message) { - super(message); - } - - public GaianAuthorizationException(String message, Throwable exception) { - super(message, exception); - } - - public GaianAuthorizationException(String message, Throwable exception, boolean enableSuppression, boolean writableStackTrace) { - super(message, exception, enableSuppression, writableStackTrace); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizer.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizer.java deleted file mode 100644 index ccd5f3b2dd3..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianAuthorizer.java +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -public interface GaianAuthorizer { - - void init(); - - boolean isAuthorized(QueryContext queryContext) throws GaianAuthorizationException; - - void applyRowFilterAndColumnMasking(QueryContext queryContext); - - void cleanUp(); -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianResourceType.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianResourceType.java deleted file mode 100644 index e4fbd3194bd..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/GaianResourceType.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -public enum GaianResourceType { - NONE, - SCHEMA, - TABLE, - COLUMN -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/QueryContext.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/QueryContext.java deleted file mode 100644 index ec670436656..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/QueryContext.java +++ /dev/null @@ -1,109 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import java.util.List; -import java.util.Set; - -/** - * Query context is used to build up the context of the query through a series of calls made to this class by GaianDB. - */ -public class QueryContext { - - private String user; - private Set userGroups; - private String schema; - private String tableName; - private List columns; - private String actionType; - private String resourceType; - private Boolean isNullMasking; - private List columnTransformers; - - public String getUser() { - return user; - } - - public void setUser(String user) { - this.user = user; - } - - public Set getUserGroups() { - return userGroups; - } - - public void setUserGroups(Set userGroups) { - this.userGroups = userGroups; - } - - public String getSchema() { - return schema; - } - - public void setSchema(String schema) { - this.schema = schema; - } - - public String getTableName() { - return tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public List getColumns() { - return columns; - } - - public void setColumns(List columns) { - this.columns = columns; - } - - public String getActionType() { - return actionType; - } - - public void setActionType(String actionType) { - this.actionType = actionType; - } - - public String getResourceType() { - return resourceType; - } - - public void setResourceType(String resourceType) { - this.resourceType = resourceType; - } - - public Boolean getNullMasking() { - return isNullMasking; - } - - public void setNullMasking(Boolean nullMasking) { - isNullMasking = nullMasking; - } - - public List getColumnTransformers() { - return columnTransformers; - } - - public void setColumnTransformers(List columnTransformers) { - this.columnTransformers = columnTransformers; - } - - @Override - public String toString() { - return "QueryContext{" + - "user='" + user + '\'' + - ", userGroups=" + userGroups + - ", schema='" + schema + '\'' + - ", tableName='" + tableName + '\'' + - ", columns=" + columns + - ", actionType='" + actionType + '\'' + - ", resourceType='" + resourceType + '\'' + - ", isNullMasking='" + isNullMasking + '\'' + - ", columnTransformers=" + columnTransformers + - '}'; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianAuthorizer.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianAuthorizer.java deleted file mode 100644 index 505acdefe50..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianAuthorizer.java +++ /dev/null @@ -1,234 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import com.ibm.gaiandb.Logger; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.ranger.authorization.hadoop.config.RangerConfiguration; -import org.apache.ranger.plugin.audit.RangerDefaultAuditHandler; -import org.apache.ranger.plugin.model.RangerPolicy; -import org.apache.ranger.plugin.model.RangerServiceDef; -import org.apache.ranger.plugin.policyengine.RangerAccessRequest; -import org.apache.ranger.plugin.policyengine.RangerAccessRequestImpl; -import org.apache.ranger.plugin.policyengine.RangerAccessResult; -import org.apache.ranger.plugin.service.RangerBasePlugin; - -import java.util.List; -import java.util.Set; - -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.COLUMN_RESOURCE; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.DEFAULT_APP_ID; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.DEFAULT_SERVICE_TYPE; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.NULL_MASK_TYPE; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.SCHEMA_RESOURCE; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.SELECT_ACTION; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.TABLE_RESOURCE; - -public class RangerGaianAuthorizer implements GaianAuthorizer { - - private static final Logger logger = new Logger("RangerGaianAuthorizer", 25); - private static volatile RangerBasePlugin gaianPlugin; - private RangerServerProperties rangerServerProperties = loadRangerServerProperties(); - - public void init() { - logger.logDetail("==> RangerGaianPlugin.init()"); - RangerBasePlugin plugin = gaianPlugin; - - if (plugin == null) { - synchronized (RangerGaianPlugin.class) { - plugin = gaianPlugin; - - if (plugin == null) { - plugin = new RangerGaianPlugin(); - plugin.init(); - plugin.setResultProcessor(new RangerDefaultAuditHandler()); - gaianPlugin = plugin; - } - } - } - logger.logDetail("<== RangerGaianPlugin.init()"); - } - - public boolean isAuthorized(QueryContext queryContext) throws GaianAuthorizationException { - GaianResourceType resourceType = getGaianResourceType(queryContext.getResourceType()); - String accessType = queryContext.getActionType(); - logger.logDetail("Is Auth: access type is : " + accessType + " resource type is: " + resourceType + " [" + queryContext + "]"); - - if (!accessType.equals(SELECT_ACTION)) { - throw new GaianAuthorizationException("GaianAccessType is invalid!"); - } - - if (resourceType == GaianResourceType.COLUMN) { - return isColumnAccessAllowed(queryContext, resourceType, accessType); - } else if (resourceType == GaianResourceType.TABLE) { - return isTableAccessAllowed(queryContext, resourceType, accessType); - } else if (resourceType == GaianResourceType.SCHEMA) { - return isSchemaAccessAllowed(queryContext, resourceType, accessType); - } else { - throw new GaianAuthorizationException("GaianResourceType is invalid!"); - } - } - - - public void applyRowFilterAndColumnMasking(QueryContext queryContext) { - logger.logDetail("==> applyRowFilterAndColumnMasking(" + queryContext + ")"); - - boolean needToTransform = false; - if (CollectionUtils.isNotEmpty(queryContext.getColumns())) { - for (String column : queryContext.getColumns()) { - boolean isColumnTransformed = addCellValueTransformerAndCheckIfTransformed(queryContext, column); - logger.logDetail("addCellValueTransformerAndCheckIfTransformed(queryContext=" + queryContext + "): " + isColumnTransformed); - needToTransform = needToTransform || isColumnTransformed; - } - } - } - - public void cleanUp() { - logger.logDetail("==> cleanUp "); - } - - public RangerServerProperties getRangerServerProperties(){ - return rangerServerProperties; - } - - private RangerServerProperties loadRangerServerProperties() { - RangerServerProperties serverProperties = new RangerServerProperties(); - - if(RangerConfiguration.getInstance() != null){ - String rangerURL = RangerConfiguration.getInstance().get("ranger.plugin.gaian.policy.rest.url"); - if(rangerURL != null){ - serverProperties.setServerURL(rangerURL); - } - - String rangerAuthorization = RangerConfiguration.getInstance().get("ranger.plugin.gaian.policy.rest.authorization"); - if(rangerAuthorization != null) { - serverProperties.setServerAuthorization(rangerAuthorization); - } - } - - return serverProperties; - } - - private GaianResourceType getGaianResourceType(String resourceType) { - - switch (resourceType) { - case SCHEMA_RESOURCE: - return GaianResourceType.SCHEMA; - case TABLE_RESOURCE: - return GaianResourceType.TABLE; - case COLUMN_RESOURCE: - return GaianResourceType.COLUMN; - default: - return GaianResourceType.NONE; - } - } - - private boolean isColumnAccessAllowed(QueryContext queryContext, GaianResourceType resourceType, String accessType) { - for (String col : queryContext.getColumns()) { - RangerGaianResource resource = new RangerGaianResource(resourceType, queryContext.getSchema(), queryContext.getTableName(), col); - boolean accessAllowed = isAccessAllowed(queryContext, accessType, resource); - if (!accessAllowed) { - return false; - } - } - - return true; - } - - private boolean isTableAccessAllowed(QueryContext queryContext, GaianResourceType resourceType, String accessType) { - RangerGaianResource resource = new RangerGaianResource(resourceType, queryContext.getSchema(), queryContext.getTableName()); - return isAccessAllowed(queryContext, accessType, resource); - } - - private boolean isSchemaAccessAllowed(QueryContext queryContext, GaianResourceType resourceType, String accessType) { - RangerGaianResource resource = new RangerGaianResource(resourceType, queryContext.getSchema()); - return isAccessAllowed(queryContext, accessType, resource); - } - - private boolean isAccessAllowed(QueryContext queryContext, String accessType, RangerGaianResource resource) { - RangerAccessRequest request = new RangerGaianAccessRequest(resource, accessType, queryContext.getUser(), queryContext.getUserGroups()); - RangerAccessResult result = gaianPlugin.isAccessAllowed(request); - logger.logDetail("RangerAccessResult result: " + result); - - return result != null && result.getIsAllowed(); - } - - private boolean addCellValueTransformerAndCheckIfTransformed(QueryContext queryContext, String columnName) { - - logger.logDetail("==> addCellValueTransformerAndCheckIfTransformed(queryContext=" + queryContext + ", " + columnName + ")"); - String columnTransformer = columnName; - List columnTransformers = queryContext.getColumnTransformers(); - RangerAccessResult result = getRangerDataMaskResult(queryContext, columnName); - boolean isDataMaskEnabled = isDataMaskEnabled(result); - - if (isDataMaskEnabled) { - String transformer = getTransformer(result); - String maskType = result.getMaskType(); - - if (StringUtils.equalsIgnoreCase(maskType, RangerPolicy.MASK_TYPE_NULL)) { - columnTransformer = NULL_MASK_TYPE; - } else if (StringUtils.equalsIgnoreCase(maskType, RangerPolicy.MASK_TYPE_CUSTOM)) { - columnTransformer = getCustomMaskType(columnName, result); - } else if (StringUtils.isNotEmpty(transformer)) { - columnTransformer = transformer.replace("{col}", columnName); - } - } - - columnTransformers.add(columnTransformer); - logger.logDetail("<== addCellValueTransformerAndCheckIfTransformed(queryContext=" + queryContext + ", " + columnName + "): " + isDataMaskEnabled); - - return isDataMaskEnabled; - } - - private String getCustomMaskType(String columnName, RangerAccessResult result) { - String maskedValue = result.getMaskedValue(); - - if (maskedValue == null) { - return NULL_MASK_TYPE; - } else { - return maskedValue.replace("{col}", columnName); - } - } - - private String getTransformer(RangerAccessResult result) { - RangerServiceDef.RangerDataMaskTypeDef maskTypeDef = result.getMaskTypeDef(); - - if (maskTypeDef != null) { - return maskTypeDef.getTransformer(); - } - - return null; - } - - private RangerAccessResult getRangerDataMaskResult(QueryContext queryContext, String columnName) { - GaianResourceType objectType = GaianResourceType.COLUMN; - RangerGaianResource resource = new RangerGaianResource(objectType, queryContext.getSchema(), queryContext.getTableName(), columnName); - String user = queryContext.getUser(); - Set groups = queryContext.getUserGroups(); - RangerGaianAccessRequest request = new RangerGaianAccessRequest(resource, queryContext.getActionType(), user, groups); - - return gaianPlugin.evalDataMaskPolicies(request, new RangerDefaultAuditHandler()); - } - - private boolean isDataMaskEnabled(RangerAccessResult result) { - return result != null && result.isMaskEnabled() && !StringUtils.equalsIgnoreCase(result.getMaskType(), RangerPolicy.MASK_TYPE_NONE); - } - -} - -class RangerGaianPlugin extends RangerBasePlugin { - - RangerGaianPlugin() { - super(DEFAULT_SERVICE_TYPE, DEFAULT_APP_ID); - } - -} - -class RangerGaianAccessRequest extends RangerAccessRequestImpl { - - RangerGaianAccessRequest(RangerGaianResource resource, String accessType, String user, Set userGroups) { - super(resource, accessType, user, userGroups); - } - -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianResource.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianResource.java deleted file mode 100644 index 5d44ab1bed8..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerGaianResource.java +++ /dev/null @@ -1,66 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import org.apache.ranger.plugin.policyengine.RangerAccessResourceImpl; - -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.COLUMN_RESOURCE; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.SCHEMA_RESOURCE; -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.TABLE_RESOURCE; - -public class RangerGaianResource extends RangerAccessResourceImpl { - - private GaianResourceType resourceType; - - public RangerGaianResource(GaianResourceType resourceType, String schema) { - this(resourceType, schema, null, null); - } - - public RangerGaianResource(GaianResourceType resourceType, String schema, String table) { - this(resourceType, schema, table, null); - } - - public RangerGaianResource(GaianResourceType resourceType, String schema, String table, String column) { - this.resourceType = resourceType; - - switch (resourceType) { - case SCHEMA: - if (schema == null) { - schema = "*"; - } - setValue(SCHEMA_RESOURCE.toLowerCase(), schema); - break; - - case TABLE: - setValue(SCHEMA_RESOURCE.toLowerCase(), schema); - setValue(TABLE_RESOURCE.toLowerCase(), table); - break; - - case COLUMN: - setValue(SCHEMA_RESOURCE.toLowerCase(), schema); - setValue(TABLE_RESOURCE.toLowerCase(), table); - setValue(COLUMN_RESOURCE.toLowerCase(), column); - break; - - default: - break; - } - } - - public GaianResourceType getResourceType() { - return resourceType; - } - - public String getSchema() { - return getValue(SCHEMA_RESOURCE.toLowerCase()).toString(); - } - - public String getTable() { - return getValue(TABLE_RESOURCE.toLowerCase()).toString(); - } - - public String getColumn() { - return getValue(COLUMN_RESOURCE.toLowerCase()).toString(); - } - -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerPolicyResultFilter.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerPolicyResultFilter.java deleted file mode 100644 index 891dd4e8a89..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerPolicyResultFilter.java +++ /dev/null @@ -1,438 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import com.ibm.gaiandb.Logger; -import com.ibm.gaiandb.Util; -import com.ibm.gaiandb.policyframework.SQLResultFilterX; -import org.apache.derby.iapi.error.StandardException; -import org.apache.derby.iapi.types.DataValueDescriptor; -import org.apache.ranger.authorization.hadoop.config.RangerConfiguration; -import org.springframework.http.*; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RestTemplate; - -import java.sql.ResultSetMetaData; -import java.sql.SQLException; -import java.text.MessageFormat; -import java.text.ParseException; -import java.util.*; - -import static org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin.Constants.*; - -/** - * Initial policy plugin for GaianDB - * Refer to the top level README.md in this project for further information on how to build, deploy and use - */ -public class RangerPolicyResultFilter extends SQLResultFilterX { - - private static final Logger logger = new Logger("RangerPolicyResultFilter", 25); - - private QueryContext queryContext = new QueryContext(); - private RangerGaianAuthorizer rangerGaianAuthorizer = new RangerGaianAuthorizer(); - private boolean authorizeResult = true; - - /** - * Policy instantiation constructor - invoked for every new query. - * This instance will be re-used if the calling GaianTable results from a PreparedStatement - * which is re-executed by the calling application. - */ - public RangerPolicyResultFilter() { - logger.logDetail("\nEntered RangerPolicyResultFilter() constructor"); - } - - /** - * This method has no timeout and the REST call is synchronous. - * - * @param url the URL to Ranger Server - * @return information about the user - */ - private RangerUser getRangerUser(String url) { - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - - try { - ResponseEntity result = restTemplate.exchange(url, HttpMethod.GET, entity, RangerUser.class); - return result.getBody(); - } catch (HttpStatusCodeException exception) { - return null; - } - } - - private HttpHeaders getHttpHeaders() { - HttpHeaders headers = new HttpHeaders(); - - headers.setContentType(MediaType.APPLICATION_JSON); - headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); - - if (rangerGaianAuthorizer.getRangerServerProperties() != null - && rangerGaianAuthorizer.getRangerServerProperties().getServerAuthorization() != null) { - String base64Credentials = rangerGaianAuthorizer.getRangerServerProperties().getServerAuthorization(); - headers.set("Authorization", base64Credentials); - } - - return headers; - } - - /** - * Set up the forwarding node name - * - * @param nodeName forwarding node name - * @return true allow query to continue - */ - public boolean setForwardingNode(String nodeName) { - logger.logDetail("Entered setForwardingNode(), forwardingNode: " + nodeName); - return true; - } - - /** - * Invoked when Derby closes the GaianTable or GaianQuery instance. - * This should be when the query's statement is closed by the application - but this is not guaranteed as Derby may cache it for re-use. - */ - public void close() { - logger.logDetail("Entered close()"); - } - - - /** - * This method is deprecated in favour of the same method below having 3 arguments - it is here for compatibility with SQLResultFilter - */ - public int nextQueriedDataSource(String dataSource, int[] columnMappings) { - logger.logDetail("Entered nextQueriedDataSource() (unexpectedly), dataSource: " + dataSource + ", columnMappings: " + Util.intArrayAsString(columnMappings)); - return -1; // allow all records to be returned (i.e. don't impose a maximum number) - } - - /** - * This method is not currently called by Gaian. - */ - public int setDataSourceWrapper(String wrapperID) { - logger.logDetail("Entered setDataSourceWrapper() (unexpectedly), wrapperID: " + wrapperID); - return -1; // allow a maximum number of records to be returned - } - - /** - * This method is deprecated in favour of filterRowsBatch() - it is here for compatibility with SQLResultFilter - */ - public boolean filterRow(DataValueDescriptor[] row) { - logger.logDetail("Entered filterRow() (unexpectedly), row: " + Arrays.asList(row)); - return true; // allow this record to be returned - } - - /** - * Used to parse the GDB_CREDENTIALS string passed on every statement. Not used by the ranger plugin support - * - * @param credentialsStringBlock credentials as string - * @return true allow query to continue (i.e. accept this credentialsStringBlock) - */ - public boolean setUserCredentials(String credentialsStringBlock) { - logger.logDetail("Entered setUserCredentials(), credentialsStringBlock: " + credentialsStringBlock); - return true; - } - - /** - * @param dataSourceID data source identifier - * @param dataSourceDescription data source description - * @param columnMappings columns for be mapped - * @return allow all records to be returned (i.e. don't impose a maximum number) - */ - public int nextQueriedDataSource(String dataSourceID, String dataSourceDescription, int[] columnMappings) { - logger.logDetail("Entered nextQueriedDataSource(), dataSourceID: " + dataSourceID - + ", dataSourceDescription: " + dataSourceDescription + ", columnMappings: " + Util.intArrayAsString(columnMappings)); - return -1; - } - - /** - * Apply policy on a batch of rows.. - * This is helpful if you need to send the rows to a 3rd party to evaluate policy - so you can minimize the number of round trips to it. - * - * @param dataSourceID data source identifier - * @param rows rows that have to be evaluated - * @return result after the policies are applied - */ - public DataValueDescriptor[][] filterRowsBatch(String dataSourceID, DataValueDescriptor[][] rows) { - - logger.logDetail("Entered filterRowsBatch(), dataSourceID: " + dataSourceID + ", number of rows: " + rows.length); - - if (!authorizeResult) { - logger.logDetail("filterRowsBatch: UnAuthorized query!"); - return new DataValueDescriptor[0][0]; - } - - // When called using a select from a view, or a VTI, the rows array will only contain the columns we expect - // for example a select firstname,lastname from vemployee would only give us 2 columns in the rows array - // However when using table function we get ALL columns - and they are stripped upstream. - // ie NULL_MASK_TYPE,NULL_MASK_TYPE,Georgi,Facello,NULL_MASK_TYPE,NULL_MASK_TYPE .... - // Thus our index for overwriting a column value with it's transformation is wrong, leading to wrong - // results or exceptions. - // **HACK** for now, skip over columns with NULL_MASK_TYPE data. PURELY for demo support pending a proper - // fix - rangerGaianAuthorizer.applyRowFilterAndColumnMasking(queryContext); - - if (rows.length == 0) { - return rows; - } - - int firstValidRow = getFirstValidRow(rows); - if (firstValidRow == -1) { - return rows; - } - - Boolean isNullMasking = queryContext.getNullMasking(); - Properties properties = null; - if (!isNullMasking) { - properties = loadProperties(); - } - - int resultSetColumnIndexOffset = 0; - int querySetColumnIndex = 0; - while (querySetColumnIndex < queryContext.getColumns().size() - && querySetColumnIndex + resultSetColumnIndexOffset < rows[firstValidRow].length) { - // We ONLY look at the first row - this will fail if the data is null - // instead should be consulting metadata (work needed to resolve) - // BIG HACK warning.... - if (rows[firstValidRow][querySetColumnIndex + resultSetColumnIndexOffset].isNull()) { - resultSetColumnIndexOffset++; // increment the fudge factor - continue; // resume with the next expected column - } - - if (!queryContext.getColumnTransformers().get(querySetColumnIndex).equals(queryContext.getColumns().get(querySetColumnIndex))) { - // Now do the transformation for each row - for (DataValueDescriptor[] row : rows) { - if (row == null) { - continue; - } - try { - ApplyMasking.redact(row[querySetColumnIndex + resultSetColumnIndexOffset], isNullMasking, properties); - } catch (StandardException | ParseException e) { - logger.logException("GAIAN_RANGER-Exeption-1", e.getMessage(), e); - } - } - - } - querySetColumnIndex++; - } - - // END of hack. Original code follows: - //for (int i = 0; i < queryContext.getColumns().size(); i++) { - // if (queryContext.getColumnTransformers().get(i) != queryContext.getColumns().get(i)) { - // for (int j = 0; j < rows.length; j++) { - // rows[j][i].setValue(queryContext.getColumnTransformers().get(i)); - // } - // } - - return rows; // allow query to continue (i.e. accept this logical table) - } - - // allow query to continue (i.e. accept this logical table) - public boolean setLogicalTable(String logicalTableName, ResultSetMetaData logicalTableResultSetMetaData) { - logger.logDetail("Entered setLogicalTable(), logicalTable: " + logicalTableName + ", structure: " + logicalTableResultSetMetaData); - - try { - queryContext.setTableName(logicalTableName); - queryContext.setActionType(SELECT_ACTION); - queryContext.setSchema(DEFAULT_SCHEMA); - - List columns = getColumnNamesForLogicalTableResultSet(logicalTableResultSetMetaData); - queryContext.setColumns(columns); - queryContext.setResourceType(COLUMN_RESOURCE); - queryContext.setColumnTransformers(new ArrayList<>()); - - Set users = getDefaultUserGroups(); - queryContext.setNullMasking(isNullMasking()); - queryContext.setUserGroups(users); - } catch (SQLException e) { - logger.logException(String.valueOf(e.getErrorCode()), e.getMessage(), e); - } - return authorizeResult; - } - - // This only works correctly when either using VTI or table function syntax - // VTI : select * from new com.ibm.db2j.GaianTable('EMPLOYEE') EMPLOYEE - // Table function: select * from TABLE(VEMPLOYEE('VEMPLOYEE')) VEMP - // If derby views are used the column list is ALL of those in the queried table, even ones unusued - // ie : select * from VEMPLOYEE - // typically leading to more strict checks - ie failing if any restricted column even exists in the table - public boolean setQueriedColumns(int[] queriedColumns) { - logger.logDetail("Entered setQueriedColumns(), queriedColumns: " + Util.intArrayAsString(queriedColumns)); - - try { - List columns = getQueryColumns(queriedColumns); - queryContext.setColumns(columns); - queryContext.setNullMasking(isNullMasking()); - queryContext.setResourceType(COLUMN_RESOURCE); - logger.logDetail("This is the setQueriedColumns " + queryContext.toString()); - - rangerGaianAuthorizer.init(); - authorizeResult = rangerGaianAuthorizer.isAuthorized(queryContext); - } catch (GaianAuthorizationException e) { - logger.logException("1", e.getMessage(), e); - } - - // As of 9 Feb 2018 there is a bug in GaianTable that means this return is ignored. - // We therefore check this return when processing rows in result set - // Once fixed the return below will be respected and the backend query will be skipped to improve efficiency - return authorizeResult; // allow query to continue (i.e. accept that all these columns be queried) - } - - /** - * This method provides generic extensibility of the Policy framework. - * For any new operations required in future, a new operation ID (opID) will be assigned, for which - * a given set of arguments will be expected, we well as a given return object. - */ - protected Object executeOperationImpl(String opID, Object... args) { - logger.logDetail("Entered executeOperation(), opID: " + opID + ", args: " + (null == args ? null : Arrays.asList(args))); - boolean haveUser = false; - - if (null != opID && opID.equals(OP_ID_SET_AUTHENTICATED_DERBY_USER_RETURN_IS_QUERY_ALLOWED)) { - - if (args != null && args.length >= 1 && null != args[0]) { - /* Ranger Gaian Plugin must be initialized at this step because - properties should be loaded before fetching the user's groups */ - rangerGaianAuthorizer.init(); - setUserDetailsForQueryContext(args[0]); - haveUser = true; - - } - - if (!haveUser) { - queryContext.setUser(UNKNOWN_USER); - logger.logImportant("Unable to retrieve user. Ensure Table functions configured and used in Query. Defaulting to setting user to "); - } - } - return null; - } - - private Boolean isNullMasking() { - if (RangerConfiguration.getInstance() != null - && RangerConfiguration.getInstance().getProperties() != null - && RangerConfiguration.getInstance().getProperties().getProperty("ranger.plugin.gaian.masking.pattern") != null) { - String maskingPattern = RangerConfiguration.getInstance().getProperties().getProperty("ranger.plugin.gaian.masking.pattern"); - if (maskingPattern != null) { - return maskingPattern.equalsIgnoreCase("NULL"); - } - } - return Boolean.FALSE; - } - - private Properties loadProperties() { - return RangerConfiguration.getInstance().getProperties(); - } - - private void setUserDetailsForQueryContext(Object arg) { - String gaianUser = arg.toString().toLowerCase(); - queryContext.setUser(gaianUser); - logger.logInfo("Found user for query :" + gaianUser); - - Set userGroups = getUserGroups(gaianUser); - if (userGroups != null) { - queryContext.setUserGroups(userGroups); - } - } - - private List getQueryColumns(int[] queriedColumns) { - List columns = new ArrayList<>(queriedColumns.length); - - for (int queriedColumn : queriedColumns) { - columns.add(queryContext.getColumns().get(queriedColumn - 1)); - } - - return columns; - } - - /** - * Overwritten in setQueriedColumns, which provides a more precise list - * accounting for what columns are used in select and predicate. - * - * @param logicalTableResultSetMetaData logical table structure - * @return the list of the columns are used in select and predicate - * @throws SQLException provides information on a database access error or other errors - */ - private List getColumnNamesForLogicalTableResultSet(ResultSetMetaData logicalTableResultSetMetaData) throws SQLException { - int count = logicalTableResultSetMetaData.getColumnCount(); - List columns = new ArrayList<>(count); - - for (int i = 1; i <= count; i++) { - String str = logicalTableResultSetMetaData.getColumnName(i); - columns.add(str); - } - - return columns; - } - - private int getFirstValidRow(DataValueDescriptor[][] rows) { - - for (int i = 0; i < rows.length; i++) { - if (rows[i] != null) { - return i; - } - } - - return -1; - } - - private Set getDefaultUserGroups() { - Set users = new HashSet<>(1); - users.add("users"); - return users; - } - - /** - * The list of the users is retrieved from Ranger Server in a synchronous way, without timeout. - * Take into consideration it may cause performance issues. - * - * @param userName name of the user - * @return a collection of user's groups - */ - private Set getUserGroups(String userName) { - String userDetailsURL = getRangerURL(userName, USER_DETAILS); - if (userDetailsURL == null) { - return Collections.emptySet(); - } - - final RangerUser userDetails = getRangerUser(userDetailsURL); - if (userDetails != null) { - logger.logInfo(userDetails.toString()); - return getUserGroupsByUserId(userDetails); - } - - return Collections.emptySet(); - } - - private Set getUserGroupsByUserId(RangerUser userDetails) { - String userGroupsURL = getRangerURL(userDetails.getId(), USER_GROUPS); - if (userGroupsURL == null) { - return Collections.emptySet(); - } - - final RangerUser userGroups = getRangerUser(userGroupsURL); - - if (userGroups != null) { - logger.logInfo(userGroups.toString()); - return userGroups.getGroupNameList(); - } - - return Collections.emptySet(); - } - - private String getRangerURL(String userId, String rangerSpecificURL) { - String rangerURL = getRangerServerURL(); - if (rangerURL == null) { - return null; - } - - final String url = rangerURL + rangerSpecificURL; - return MessageFormat.format(url, userId); - } - - private String getRangerServerURL() { - if (rangerGaianAuthorizer.getRangerServerProperties() == null || - rangerGaianAuthorizer.getRangerServerProperties().getServerURL() == null) { - return null; - } - String rangerURL = rangerGaianAuthorizer.getRangerServerProperties().getServerURL(); - logger.logDetail("RangerURL: " + rangerURL); - - return rangerURL; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServerProperties.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServerProperties.java deleted file mode 100644 index d71b35677f0..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServerProperties.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -public class RangerServerProperties { - - private String serverURL; - private String serverAuthorization; - - public String getServerURL() { - return serverURL; - } - - public void setServerURL(String serverURL) { - this.serverURL = serverURL; - } - - public String getServerAuthorization() { - return serverAuthorization; - } - - public void setServerAuthorization(String serverAuthorization) { - this.serverAuthorization = serverAuthorization; - } -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServiceGaian.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServiceGaian.java deleted file mode 100644 index 8225ca49a9f..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerServiceGaian.java +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import org.apache.ranger.plugin.service.RangerBaseService; -import org.apache.ranger.plugin.service.ResourceLookupContext; - -import java.util.HashMap; -import java.util.List; - -public class RangerServiceGaian extends RangerBaseService { - - public HashMap validateConfig() { - // TODO: connect to Gaian resource manager; throw Exception on failure - return null; - } - - public List lookupResource(ResourceLookupContext context) { - // TODO: retrieve the resource list from Gaian resource manager using REST API - return null; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerUser.java b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerUser.java deleted file mode 100644 index b1a004fcaf7..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/java/org/odpi/openmetadata/adapters/governanceenginesplugins/gaianrangerplugin/RangerUser.java +++ /dev/null @@ -1,112 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.governanceenginesplugins.gaianrangerplugin; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import java.util.Arrays; -import java.util.Set; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "name", - "firstName", - "lastName", - "description", - "groupNameList", - "userRoleList" -}) -@JsonIgnoreProperties -public class RangerUser { - - @JsonProperty("id") - private String id; - - @JsonProperty("name") - private String name; - - @JsonProperty("firstName") - private String firstName; - - @JsonProperty("lastName") - private String lastName; - - @JsonProperty("description") - private String description; - - @JsonProperty("groupNameList") - private Set groupNameList; - - @JsonProperty("userRoleList") - private Set userRoleList; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Set getGroupNameList() { - return groupNameList; - } - - public void setGroupNameList(Set groupNameList) { - this.groupNameList = groupNameList; - } - - public Set getUserRoleList() { - return userRoleList; - } - - public void setUserRoleList(Set userRoleList) { - this.userRoleList = userRoleList; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - String user = "RangerUser: id " + id + "; name=" + name; - if (groupNameList != null) { - final String groups = Arrays.toString(groupNameList.toArray()); - user += " Groups: " + groups; - } - return user; - } -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/log4J.properties b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/log4J.properties deleted file mode 100644 index fe5ca88ccba..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/log4J.properties +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the ODPi Egeria project. - -# Root logger option -log4j.rootLogger=INFO, stdout - -# Direct log messages to stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-audit.xml b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-audit.xml deleted file mode 100644 index 3dabf1b0b0d..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-audit.xml +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - xasecure.audit.is.enabled - true - - - - - - xasecure.audit.db.is.enabled - false - - - - xasecure.audit.db.is.async - true - - - - xasecure.audit.db.async.max.queue.size - 10240 - - - - xasecure.audit.db.async.max.flush.interval.ms - 30000 - - - - xasecure.audit.db.batch.size - 100 - - - - - xasecure.audit.jpa.javax.persistence.jdbc.url - jdbc:mysql://narc1.fyre.ibm.com:3306/ranger_audit - - - - xasecure.audit.jpa.javax.persistence.jdbc.user - rangerlogger - - - - xasecure.audit.jpa.javax.persistence.jdbc.password - none - - - - xasecure.audit.jpa.javax.persistence.jdbc.driver - com.mysql.jdbc.Driver - - - - xasecure.audit.credential.provider.file - jceks://file/etc/ranger/gaiandbdev/auditcred.jceks - - - - - - xasecure.audit.hdfs.is.enabled - false - - - - xasecure.audit.hdfs.is.async - true - - - - xasecure.audit.hdfs.async.max.queue.size - 1048576 - - - - xasecure.audit.hdfs.async.max.flush.interval.ms - 30000 - - - - xasecure.audit.hdfs.config.encoding - - - - - xasecure.audit.hdfs.config.destination.directory - hdfs://localhost:8020/ranger/audit - - - - xasecure.audit.hdfs.config.destination.file - %hostname%-audit.log - - - - xasecure.audit.hdfs.config.destination.flush.interval.seconds - 900 - - - - xasecure.audit.hdfs.config.destination.rollover.interval.seconds - 86400 - - - - xasecure.audit.hdfs.config.destination.open.retry.interval.seconds - 60 - - - - xasecure.audit.hdfs.config.local.buffer.directory - /var/log/gaiandb/audit/%app-type% - - - - xasecure.audit.hdfs.config.local.buffer.file - %time:yyyyMMdd-HHmm.ss%.log - - - - xasecure.audit.hdfs.config.local.buffer.file.buffer.size.bytes - 8192 - - - - xasecure.audit.hdfs.config.local.buffer.flush.interval.seconds - 60 - - - - xasecure.audit.hdfs.config.local.buffer.rollover.interval.seconds - 600 - - - - xasecure.audit.hdfs.config.local.archive.directory - /var/log/gaiandb/audit/archive/%app-type% - - - - xasecure.audit.hdfs.config.local.archive.max.file.count - 10 - - - - - - - xasecure.audit.log4j.is.enabled - false - - - - xasecure.audit.log4j.is.async - false - - - - xasecure.audit.log4j.async.max.queue.size - 10240 - - - - xasecure.audit.log4j.async.max.flush.interval.ms - 30000 - - - - - xasecure.audit.kafka.is.enabled - false - - - - xasecure.audit.kafka.async.max.queue.size - 1 - - - - xasecure.audit.kafka.async.max.flush.interval.ms - 1000 - - - - xasecure.audit.kafka.broker_list - localhost:9092 - - - - xasecure.audit.kafka.topic_name - ranger_audits - - - - - xasecure.audit.solr.is.enabled - false - - - - xasecure.audit.solr.async.max.queue.size - 1 - - - - xasecure.audit.solr.async.max.flush.interval.ms - 1000 - - - - xasecure.audit.solr.solr_url - http://localhost:6083/solr/ranger_audits - - - - - xasecure.audit.destination.hdfs - true - - - - xasecure.audit.destination.hdfs.batch.filespool.dir - /var/log/atlas/audit/hdfs/spool - - - - xasecure.audit.destination.hdfs.dir - hdfs://localhost:8020/ranger/audit - - - - xasecure.audit.destination.solr - true - - - - xasecure.audit.destination.solr.batch.filespool.dir - /var/log/atlas/audit/solr/spool - - - xasecure.audit.destination.solr.urls - - - - - xasecure.audit.destination.solr.zookeepers - localhost:2181,somehost:2181/infra-solr - - - - xasecure.audit.is.enabled - true - - - - xasecure.audit.provider.summary.enabled - false - - - - - - diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-security.xml b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-security.xml deleted file mode 100644 index cbec0ebbe17..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-gaian-security.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - ranger.plugin.gaian.service.name - gaian - - Name of the Ranger service containing gaian policies - - - - - ranger.plugin.gaian.policy.source.impl - org.apache.ranger.admin.client.RangerAdminRESTClient - - Class to retrieve policies from the source - - - - - ranger.plugin.gaian.policy.rest.url - http://narc1.fyre.ibm.com:6080 - - URL to Ranger Admin - - - - - ranger.plugin.gaian.policy.rest.authorization - Example - Basic Authorization for Ranger Admin - - - - ranger.plugin.gaian.policy.rest.ssl.config.file - ranger-policymgr-ssl.xml - - Path to the file containing SSL details to contact Ranger Admin - - - - - ranger.plugin.gaian.policy.pollIntervalMs - 30000 - - How often to poll for changes in policies? - - - - - ranger.plugin.gaian.policy.cache.dir - /root/gaiandb/gaiandb/policycache - - Directory where Ranger policies are cached after successful retrieval from the source - - - - - ranger.plugin.gaian.policy.rest.client.connection.timeoutMs - 120000 - - RangerRestClient Connection Timeout in Milli Seconds - - - - - ranger.plugin.gaian.policy.rest.client.read.timeoutMs - 30000 - - RangerRestClient read Timeout in Milli Seconds - - - - - ranger.plugin.gaian.masking.pattern - CUSTOM - Masking Pattern - - - - ranger.plugin.gaian.char.masking - ***** - Masking Value for Characters Fields - - - - ranger.plugin.gaian.int.masking - 1000 - Masking Value for Number type format Fields - - - - ranger.plugin.gaian.date.masking - 0001-01-01 - Masking Value for Date Fields; The Pattern for data is yyyy-MM-dd - - - diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-policymgr-ssl.xml b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-policymgr-ssl.xml deleted file mode 100644 index 86d97a4cfed..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/conf/ranger-policymgr-ssl.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - xasecure.policymgr.clientssl.keystore - hadoopdev-clientcert.jks - - Java Keystore files - - - - xasecure.policymgr.clientssl.truststore - cacerts-xasecure.jks - - java truststore file - - - - xasecure.policymgr.clientssl.keystore.credential.file - jceks://file/tmp/keystore-hadoopdev-ssl.jceks - - java keystore credential file - - - - xasecure.policymgr.clientssl.truststore.credential.file - jceks://file/tmp/truststore-hadoopdev-ssl.jceks - - java truststore credential file - - - diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/resourcenamemap.properties b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/resourcenamemap.properties deleted file mode 100644 index 7a25bab3cf7..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/resourcenamemap.properties +++ /dev/null @@ -1,27 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the ODPi Egeria project. - -fs.default.name=core-site.xml -hadoop.security.authentication=core-site.xml -hadoop.security.authorization=core-site.xml -hadoop.security.auth_to_local=core-site.xml -hadoop.rpc.protection=core-site.xml -dfs.datanode.kerberos.principal=hdfs-site.xml -dfs.namenode.kerberos.principal=hdfs-site.xml -dfs.secondary.namenode.kerberos.principal=hdfs-site.xml -username=xalogin.xml -keytabfile=xalogin.xml -password=xalogin.xml -lookupprincipal=xalogin.xml -lookupkeytab=xalogin.xml -namerules=xalogin.xml -authtype=xalogin.xml -rangerprincipal=xalogin.xml -rangerkeytab=xalogin.xml -hbase.master.kerberos.principal=hbase-site.xml -hbase.rpc.engine=hbase-site.xml -hbase.rpc.protection=hbase-site.xml -hbase.security.authentication=hbase-site.xml -hbase.zookeeper.property.clientPort=hbase-site.xml -hbase.zookeeper.quorum=hbase-site.xml -zookeeper.znode.parent=hbase-site.xml diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/service-defs/ranger-servicedef-gaian.json b/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/service-defs/ranger-servicedef-gaian.json deleted file mode 100644 index 704d83751fe..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin/src/main/resources/service-defs/ranger-servicedef-gaian.json +++ /dev/null @@ -1,209 +0,0 @@ - -{ - "id":99, - "name": "gaian", - "implClass": "org.apache.ranger.services.gaian.RangerServiceGaian", - "label": "Gaian", - "description": "Gaian", - "options": { - "enableDenyAndExceptionsInPolicies": "true" - }, - "guid": "86d10748-e4fc-442b-8991-f6a727054ece", - - "resources": [ - { - "itemId": 1, - "name": "schema", - "type": "string", - "level": 10, - "parent": "", - "mandatory": true, - "lookupSupported": true, - "recursiveSupported": false, - "excludesSupported": true, - "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher", - "matcherOptions": { "wildCard":true, "ignoreCase":true }, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Gaian Schema", - "description": "Gaian virtual Schema" - }, - { - "itemId": 2, - "name": "table", - "type": "string", - "level": 20, - "parent": "schema", - "mandatory": true, - "lookupSupported": true, - "recursiveSupported": false, - "excludesSupported": true, - "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher", - "matcherOptions": { "wildCard":true, "ignoreCase":true }, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Gaian Table", - "description": "Gaian virtual Table" - }, - { - "itemId": 3, - "name": "column", - "type": "string", - "level": 30, - "parent": "table", - "mandatory": true, - "lookupSupported": true, - "recursiveSupported": false, - "excludesSupported": true, - "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher", - "matcherOptions": { "wildCard":true, "ignoreCase":true }, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Gaian Column", - "description": "Gaian virtual Column" - } - ], - - "accessTypes": - [ - { - "itemId": 1, - "name": "select", - "label": "select" - } - - - ], - - "configs": - [ - { - "itemId": 1, - "name": "user", - "type": "string", - "mandatory": true, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Username" - }, - - { - "itemId": 2, - "name": "password", - "type": "password", - "mandatory": true, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Password" - }, - - { - "itemId": 3, - "name": "jdbc.url", - "type": "string", - "mandatory": true, - "defaultValue": "jdbc:derby://localhost:6414/gaiandb;create=false", - "validationRegEx":"", - "validationMessage": "", - "uiHint":"" - } - ], - - "enums": - [ - - ], - - "contextEnrichers": - [ - ], - - "policyConditions": - [ - ], - "dataMaskDef": { - "accessTypes": [ - { - "name": "select" - } - ], - "resources": [ - { - "itemId": 1, - "name": "schema", - "type": "string", - "level": 10, - "parent": "", - "mandatory": true, - "lookupSupported": true, - "recursiveSupported": false, - "excludesSupported": true, - "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher", - "matcherOptions": { "wildCard":false, "ignoreCase":true }, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"{ \"singleValue\":true }", - "label": "Gaian Schema", - "description": "Gaian virtual Schema" - }, - { - "itemId": 2, - "name": "table", - "type": "string", - "level": 20, - "parent": "schema", - "mandatory": true, - "lookupSupported": true, - "recursiveSupported": false, - "excludesSupported": true, - "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher", - "matcherOptions": { "wildCard":true, "ignoreCase":true }, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Gaian Table", - "description": "Gaian virtual Table" - }, - { - "itemId": 3, - "name": "column", - "type": "string", - "level": 30, - "parent": "table", - "mandatory": true, - "lookupSupported": true, - "recursiveSupported": false, - "excludesSupported": true, - "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher", - "matcherOptions": { "wildCard":true, "ignoreCase":true }, - "validationRegEx":"", - "validationMessage": "", - "uiHint":"", - "label": "Gaian Column", - "description": "Gaian virtual Column" - } - ], - "maskTypes": [ - { - "itemId": 1, - "name": "MASK", - "label": "Redact", - "description": "Replace lowercase with 'x', uppercase with 'X', digits with '0'", - "transformer": "mask({col})", - "dataMaskOptions": { - } - }, - { - "itemId": 2, - "name": "MASK_NONE", - "label": "Unmasked (retain original value)", - "description": "No masking" - } - ] - } -} diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml b/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml index 1a25b781c40..3df10ef1065 100644 --- a/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml +++ b/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml @@ -31,6 +31,5 @@ governance-engines-plugins - gaian-ranger-plugin diff --git a/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/pom.xml b/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/pom.xml index 1ba51dd3d0b..664e141f59d 100644 --- a/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/pom.xml +++ b/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/pom.xml @@ -144,7 +144,6 @@ org.odpi.egeria:*connector - org.odpi.egeria:virtualization-services-api diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/README.md b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/README.md index 713800cc8db..360365a2493 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/README.md +++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/README.md @@ -12,9 +12,6 @@ connectors to different types of data stores. These connectors implement the * **[file-connectors](file-connectors)** provides connector to read files. -* **[gaian-connector](gaian-connector)** provides a JDBC-style connector to the [Gaian](https://github.com/gaiandb/gaiandb) virtualization -engine. - * **[cassandra-data-store-connector](cassandra-data-store-connector)** provides connector to read data from [Apache Cassandra](http://cassandra.apache.org/). diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/README.md b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/README.md deleted file mode 100644 index 1f8ff5108d1..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/README.md +++ /dev/null @@ -1,19 +0,0 @@ - - - -![InDev](../../../../../open-metadata-publication/website/images/egeria-content-status-in-development.png#pagewidth) - -# Gaian Connector - -The Gaian connector provides a JDBC style connector to the [Gaian](https://github.com/gaiandb/gaiandb) virtualization -engine. - - ----- -Return to the [data-store-connectors](..) module. - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/build.gradle deleted file mode 100644 index 9fc49aaa33b..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation 'org.slf4j:slf4j-api' - testImplementation 'org.testng:testng' - implementation 'com.fasterxml.jackson.core:jackson-databind' -} - -description = 'Gaian Connector' - -java { - withJavadocJar() -} - -test { - useTestNG() -} diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/pom.xml b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/pom.xml deleted file mode 100644 index bb09c9273d4..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - data-store-connectors - org.odpi.egeria - 2.11-SNAPSHOT - - - Gaian Connector - - The Gaian connector provides a JDBC style connector to the Gaian virtualization - engine. - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - gaian-connector - - - - org.odpi.egeria - open-connector-framework - - - - org.slf4j - slf4j-api - - - - org.testng - testng - test - - - - com.fasterxml.jackson.core - jackson-databind - test - - - - - diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnector.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnector.java deleted file mode 100644 index 1497140d984..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnector.java +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -package org.odpi.openmetadata.adapters.connectors.database; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorBase; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.AdditionalProperties; - -import java.sql.ResultSet; -import java.sql.Statement; - -/** - * The OCFDatabaseConnector provides common services for OCF Database Connector implementations. - */ -public abstract class OCFDatabaseConnector extends ConnectorBase { - protected AdditionalProperties securedProperties = null; - /* - * this url is the database url which is used to create the connection to the database - */ - protected String url=""; - /* - * this is returned from the database - */ - protected ResultSet sqlResults =null; - /* - * sqlStatement is used to execute the sql - */ - protected Statement sqlStatement =null; - /* - * connection is used to connect the database and create Statement instance - */ - protected java.sql.Connection sqlConnection =null; - //prefix in database url - protected String dburlPrefix; - //server address in database url - protected String dburlServeraddress; - //server port in database url - protected String dburlServerport; - //database name in database url - protected String dburlDatabase; - //proxy user in database url, it is for impersonation - protected String proxyUser; - //proxy password in database url, it is for impersonation - protected String proxyPwd; - //create true or not when connect to Gaian - protected boolean create; - - /** - * default constructor - */ - public OCFDatabaseConnector(){ - - } - - /** - * constructor with database url settings - * @param dburlPrefix prefix in database url - * @param dburlServeraddress server address in database url - * @param dburlServerport database name in database url - * @param dburlDatabase database name in database url - * @param proxyUser proxy user in database url, it is for impersonation - * @param proxyPwd proxy user in database url, it is for impersonation - * @param create create true or not when connect to Gaian - */ - public OCFDatabaseConnector(String dburlPrefix,String dburlServeraddress,String dburlServerport,String dburlDatabase,String proxyUser,String proxyPwd,boolean create){ - this.dburlPrefix=dburlPrefix; - this.dburlServeraddress=dburlServeraddress; - this.dburlServerport=dburlServerport; - this.dburlDatabase=dburlDatabase; - this.proxyUser=proxyUser; - this.proxyPwd=proxyPwd; - this.create=create; - } - public String getDburlPrefix() { - return dburlPrefix; - } - - public void setDburlPrefix(String dburlPrefix) { - this.dburlPrefix = dburlPrefix; - } - - public String getDburlServeraddress() { - return dburlServeraddress; - } - - public void setDburlServeraddress(String dburlServeraddress) { - this.dburlServeraddress = dburlServeraddress; - } - - public String getDburlServerport() { - return dburlServerport; - } - - public void setDburlServerport(String dburlServerport) { - this.dburlServerport = dburlServerport; - } - - public String getDburlDatabase() { - return dburlDatabase; - } - - public void setDburlDatabase(String dburlDatabase) { - this.dburlDatabase = dburlDatabase; - } - - public String getProxyUser() { - return proxyUser; - } - - public void setProxyUser(String proxyUser) { - this.proxyUser = proxyUser; - } - - public String getProxyPwd() { - return proxyPwd; - } - - public void setProxyPwd(String proxyPwd) { - this.proxyPwd = proxyPwd; - } - - public boolean isCreate() { - return create; - } - - public void setCreate(boolean create) { - this.create = create; - } - - /** - * create the connection to the database - * @param userId the userId needed to connect to the database - * @return the Connection to the database - * @throws ConnectionCheckedException if it is not able to connect the database - */ - public abstract java.sql.Connection connect(String userId) throws ConnectionCheckedException; - - /** - * execute the query to get data - * @param query the query - * @return return the data - * @throws ConnectorCheckedException if there are exceptions when execute the query - */ - public abstract ResultSet executeQuery(String query) throws ConnectorCheckedException; - - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public java.sql.Connection getSqlConnection() { - return sqlConnection; - } - - public void setSqlConnection(java.sql.Connection sqlConnection) { - this.sqlConnection = sqlConnection; - } - - public ResultSet getSqlResults() { - return sqlResults; - } - - public void setSqlResults(ResultSet sqlResults) { - this.sqlResults = sqlResults; - } - - public Statement getSqlStatement() { - return sqlStatement; - } - - public void setSqlStatement(Statement sqlStatement) { - this.sqlStatement = sqlStatement; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnectorProviderBase.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnectorProviderBase.java deleted file mode 100644 index 24aa8dbaa39..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/OCFDatabaseConnectorProviderBase.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -package org.odpi.openmetadata.adapters.connectors.database; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; - -/** - * The OCFDatabaseConnectorProviderBase provides a base class for the connector provider supporting OCF Database Connectors. It - * extends ConnectorProviderBase which does the creation of connector instances. The subclasses of - * OCFDatabaseConnectorProviderBase must initialize ConnectorProviderBase with the Java class - * name of the OCF Database Connector implementation (by calling super.setConnectorClassName(className)). - * Then the connector provider will work. - */ -public abstract class OCFDatabaseConnectorProviderBase extends ConnectorProviderBase { - /** - * Default Constructor - */ - public OCFDatabaseConnectorProviderBase(){ - /* - * Nothing to do - */ - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/OCFDatabaseConnectorErrorCode.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/OCFDatabaseConnectorErrorCode.java deleted file mode 100644 index 4c8aba1d6ab..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/OCFDatabaseConnectorErrorCode.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -package org.odpi.openmetadata.adapters.connectors.database.ffdc; - -import java.text.MessageFormat; - -/** - * - * The OCFDatabaseConnectorErrorCode is used to define first failure data capture (FFDC) for errors that occur within the JDBC Connector - * It is used in conjunction with all OCF Database Connector Exceptions, both Checked and Runtime (unchecked). - * - * The 3 fields in the enum are: - *
    - *
  • HTTP Error Code - for translating between REST and JAVA - Typically the numbers used are:
  • - *
    • - *
    • 500 - internal error
    • - *
    • 400 - invalid parameters
    • - *
    • 401 - unauthorized or unauthenticated
    • - *
  • - *
  • Error Message Id - to uniquely identify the message
  • - *
  • Error Message Text - includes placeholder to allow additional values to be captured
  • - *
  • SystemAction - describes the result of the error
  • - *
  • UserAction - describes how a user should correct the error
  • - *
- */ - - -public enum OCFDatabaseConnectorErrorCode -{ - NOT_VALID_QUERY(400, "OCF-DATABASE-CONNECTOR-QUERY-400-001 ", - "In {0}, the query is not valid.", - "OCF Database Connector is not able to execute the query.", - "Please check the query."), - ILLEGAL_ACCESS(400, "OCF-DATABASE-CONNECTOR-INSTANCE-400-002 ", - "{0} is not have legal access to the code it needs", - "The method does not have access to the definition of the specified class, field, method or constructor.", - "Please check the use of newInstance."), - ILLEGAL_INSTANCE_CREATION(400, "OCF-DATABASE-CONNECTOR-INSTANCE-400-003 ", - "In {0}, the instance creation is illegal.", - "The specified class object using the newInstance method in class Class cannot be instantiated.", - "Please check the use of newInstance."), - CONNECT_FAIL(401, "OCF-DATABASE-CONNECTOR-GAIAN-401-001 ", - "{0} does not get the access to the database.", - "OCF Database Connector is not able to connect the database.", - "Please check the user id."), - QUERY_EXECUTION_FAIL(401, "OCF-DATABASE-CONNECTOR-GAIAN-401-002 ", - "{0} can not retrieve the data from database", - "OCF Database Connector is not able to access data from the database.", - "Please check the query and the connection to Gaian."), - DISCONNECT_FAIL(401, "OCF-DATABASE-CONNECTOR-GAIAN-401-003 ", - "{0} can not close the connection, statement and result set properly", - "OCF Database Connector is not able to shut down the connection to the database.", - "Please check the code for shutting down the connection."), - UNKNOWN_JDBC_DRIVER(500, "OCF-DATABASE-CONNECTOR-JDBC-DRIVER-500-001 ", - "In {0}, this JDBC driver is unknown.", - "OCF Database Connector is not able to connect to the database without proper driver.", - "Please check the driver name."); - - - - private int httpErrorCode; - private String errorMessageId; - private String errorMessage; - private String systemAction; - private String userAction; - - - /** - * The constructor for OCFDatabaseConnectorErrorCode expects to be passed one of the enumeration rows defined in - * OCFDatabaseConnectorErrorCode above. For example: - * - * OMRSErrorCode errorCode = OCFDatabaseConnectorErrorCode.SERVER_NOT_AVAILABLE; - * - * This will expand out to the 5 parameters shown below. - * - * @param newHTTPErrorCode - error code to use over REST calls - * @param newErrorMessageId - unique Id for the message - * @param newErrorMessage - text for the message - * @param newSystemAction - description of the action taken by the system when the error condition happened - * @param newUserAction - instructions for resolving the error - */ - OCFDatabaseConnectorErrorCode(int newHTTPErrorCode, String newErrorMessageId, String newErrorMessage, String newSystemAction, String newUserAction) - { - this.httpErrorCode = newHTTPErrorCode; - this.errorMessageId = newErrorMessageId; - this.errorMessage = newErrorMessage; - this.systemAction = newSystemAction; - this.userAction = newUserAction; - } - - - public int getHTTPErrorCode() - { - return httpErrorCode; - } - - - /** - * Returns the unique identifier for the error message. - * - * @return errorMessageId - */ - public String getErrorMessageId() - { - return errorMessageId; - } - - - /** - * Returns the error message with placeholders for specific details. - * - * @return errorMessage (unformatted) - */ - public String getUnformattedErrorMessage() - { - return errorMessage; - } - - - /** - * Returns the error message with the placeholders filled out with the supplied parameters. - * - * @param params - strings that plug into the placeholders in the errorMessage - * @return errorMessage (formatted with supplied parameters) - */ - public String getFormattedErrorMessage(String... params) - { - - MessageFormat mf = new MessageFormat(errorMessage); - String result = mf.format(params); - - return result; - } - - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction - */ - public String getSystemAction() - { - return systemAction; - } - - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction - */ - public String getUserAction() - { - return userAction; - } - - - /** - * JSON-style toString - * - * @return string of property names and values for this enum - */ - @Override - public String toString() - { - return "OCFDatabaseConnectorErrorCode{" + - "httpErrorCode=" + httpErrorCode + - ", errorMessageId='" + errorMessageId + '\'' + - ", errorMessage='" + errorMessage + '\'' + - ", systemAction='" + systemAction + '\'' + - ", userAction='" + userAction + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnector.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnector.java deleted file mode 100644 index ac8ad3207ac..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnector.java +++ /dev/null @@ -1,270 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -package org.odpi.openmetadata.adapters.connectors.database.gaian; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.odpi.openmetadata.adapters.connectors.database.OCFDatabaseConnector; -import org.odpi.openmetadata.adapters.connectors.database.ffdc.OCFDatabaseConnectorErrorCode; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; - -/** - * A GaianOCFConnector is a connector to Gaian. It will connect to Gaian, execute the query. - */ - -public class GaianOCFConnector extends OCFDatabaseConnector { - - private final String connectorName=GaianOCFConnector.class.getName(); - private static final Logger log = LoggerFactory.getLogger(GaianOCFConnector.class); - - - /** - * default constructor - */ - public GaianOCFConnector(){ - super(); - } - - /** - * all information about database url is offered for the constructor - * @param dburlPrefix prefix in database url - * @param dburlServeraddress server address in database url - * @param dburlServerport database name in database url - * @param dburlDatabase database name in database url - * @param proxyUser proxy user in database url, it is for impersonation - * @param proxyPwd proxy user in database url, it is for impersonation - * @param create create true or not when connect to Gaian - */ - public GaianOCFConnector(String dburlPrefix, String dburlServeraddress, String dburlServerport, String dburlDatabase, String proxyUser, String proxyPwd, boolean create){ - super(dburlPrefix,dburlServeraddress,dburlServerport,dburlDatabase,proxyUser,proxyPwd,create); - } - - - - - - - /** - * set up the database url - * @param userId end user id - * @throws ConnectionCheckedException properties is not set up correctly - */ - public void setDBUrl(String userId ) throws ConnectionCheckedException{ - final String methodName="setDBUrl"; - String dbURL = dburlPrefix + dburlServeraddress + ":" + dburlServerport + "/" + dburlDatabase - + ";create="+String.valueOf(create) + ";user=" + userId + ";password="+proxyPwd+";proxy-user=" - +proxyUser+";proxy-pwd="+proxyPwd; - log.debug(dbURL); - this.setUrl(dbURL); - } - - - /** - * get connection to the database - * @param userId the userId needed to connect to the database - * @return the connection to the database - * @throws ConnectionCheckedException if it is not able to connect to the database - */ - @Override - public Connection connect(String userId) throws ConnectionCheckedException { - final String methodName="createConnection"; - /** - * set up the dbURL - */ - try{ - setDBUrl(userId); - }catch(ConnectionCheckedException e){ - log.error("Exception in set up database url.",e); - } - - try { - if(this.getSqlConnection()==null){ - Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance(); - - if (log.isDebugEnabled()) - { - log.debug("new instance is successful created"); - } - this.setSqlConnection(DriverManager.getConnection(this.getUrl())); - } - } catch (SQLException e) { - /* - * Wrap exception in the DatabaseConnectCheckedException with a suitable message - * when the user is not able to connect to the database. - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.CONNECT_FAIL; - - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectionCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - e); - } catch (IllegalAccessException e) { - /* - * Wrap exception in the DatabaseConnectCheckedException with a suitable message - * when the user is not able to connect to the database. - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.ILLEGAL_ACCESS; - - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectionCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - e); - } catch (InstantiationException e) { - /* - * Wrap exception in the DatabaseConnectCheckedException with a suitable message - * when the user is not able to connect to the database. - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.ILLEGAL_INSTANCE_CREATION; - - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectionCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - e); - } catch (ClassNotFoundException e) { - /* - * Wrap exception in the DatabaseConnectCheckedException with a suitable message - * when the jdbc driver name is wrong - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.UNKNOWN_JDBC_DRIVER; - - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectionCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - e); - } - if (log.isDebugEnabled()) - { - log.debug("connect to database successfully"); - } - return this.getSqlConnection(); - } - - /** - * execute the query to get data - * @param query the query - * @throws ConnectorCheckedException if there are exceptions when execute the query - */ - @Override - public ResultSet executeQuery(String query) throws ConnectorCheckedException { - final String methodName="executeQuery"; - if(query==null || query.equals("")){ - /* - * Wrap exception in the ConnectorCheckedException with a suitable message - * when the execution failed - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.NOT_VALID_QUERY; - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectorCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction()); - }else{ - try { - if(this.getSqlStatement()==null){ - this.setSqlStatement(this.getSqlConnection().createStatement()); - } - this.setSqlResults(this.getSqlStatement().executeQuery(query) ); - } catch (SQLException e) { - /* - * Wrap exception in the ExecutionCheckedException with a suitable message - * when the execution failed - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.QUERY_EXECUTION_FAIL; - - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectorCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - e); - } - return this.getSqlResults(); - } - } - - /** - * disconnect all the connections to the database - * @throws ConnectorCheckedException if there are exceptions when execute the query - */ - @Override - public void disconnect() throws ConnectorCheckedException { - final String methodName="disconnect"; - try - { - if(this.getSqlStatement()!= null){ - this.getSqlStatement().close(); - } - if(this.getSqlResults()!=null){ - this.getSqlResults().close(); - } - if (this.getSqlConnection() != null) - { - this.getSqlConnection().close(); - } - if (log.isDebugEnabled()) - { - log.debug("disconnect successfully"); - } - } - catch (SQLException sqlExcept) - { - /* - * Wrap exception in the ConnectorCheckedException with a suitable message - * when the disconnect is failed - */ - OCFDatabaseConnectorErrorCode errorCode = OCFDatabaseConnectorErrorCode.DISCONNECT_FAIL; - - String errorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName, connectorName); - - throw new ConnectorCheckedException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction(), - sqlExcept); - } - } - - - -} diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorProvider.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorProvider.java deleted file mode 100644 index c12fc4ba50c..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -package org.odpi.openmetadata.adapters.connectors.database.gaian; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; - -/** - * - * In the Open Connector Framework (OCF), a ConnectorProvider is a factory for a specific type of connector. - * The GaianOCFConnectorProvider is the connector provider for the GaianOCFConnector. - * It extends OCF ConnectorProviderBase. ConnectorProviderBase supports the creation of connector instances. - * - * The GaianOCFConnectorProvider must initialize ConnectorProviderBase with the Java class - * name of the GaianDB OCF Connector implementation (by calling super.setConnectorClassName(className)). - * Then the connector provider will work. - */ - -public class GaianOCFConnectorProvider extends ConnectorProviderBase { - - - /** - * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific - * GaianDB OCF Connector implementation. - */ - public GaianOCFConnectorProvider(){ - super(); - Class connectorClass=GaianOCFConnector.class; - super.setConnectorClassName(connectorClass.getName()); - } - - -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/ErrorCodeTest.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/ErrorCodeTest.java deleted file mode 100644 index 66895f2d119..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/ffdc/ErrorCodeTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adapters.connectors.database.ffdc; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.testng.annotations.Test; - -import java.util.ArrayList; -import java.util.List; - -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; - -/** - * Verify the OCFDatabaseConnectorErrorCode enum contains unique message ids, non-null names and descriptions and can be - * serialized to JSON and back again. - */ -public class ErrorCodeTest -{ - final static String messageIdPrefix = "OCF-DATABASE-CONNECTOR"; - private List existingMessageIds = new ArrayList<>(); - - /** - * Validate that a supplied ordinal is unique. - * - * @param ordinal value to test - * @return boolean result - */ - private boolean isUniqueOrdinal(String ordinal) - { - if (existingMessageIds.contains(ordinal)) - { - return false; - } - else - { - existingMessageIds.add(ordinal); - return true; - } - } - - private void testSingleErrorCodeValues(OCFDatabaseConnectorErrorCode testValue) - { - String testInfo; - - assertTrue(isUniqueOrdinal(testValue.getErrorMessageId())); - assertTrue(testValue.getErrorMessageId().contains(messageIdPrefix)); - assertTrue(testValue.getErrorMessageId().endsWith(" ")); - assertTrue(testValue.getHTTPErrorCode() != 0); - testInfo = testValue.getUnformattedErrorMessage(); - assertTrue(testInfo != null); - assertFalse(testInfo.isEmpty()); - testInfo = testValue.getFormattedErrorMessage("Field1", "Field2", "Field3", "Field4", "Field5", "Field6"); - assertTrue(testInfo != null); - assertFalse(testInfo.isEmpty()); - testInfo = testValue.getSystemAction(); - assertTrue(testInfo != null); - assertFalse(testInfo.isEmpty()); - testInfo = testValue.getUserAction(); - assertTrue(testInfo != null); - assertFalse(testInfo.isEmpty()); - } - - - /** - * Validated the values of the enum. - */ - @Test public void testAllErrorCodeValues() - { - for (OCFDatabaseConnectorErrorCode errorCode : OCFDatabaseConnectorErrorCode.values()) - { - testSingleErrorCodeValues(errorCode); - } - } - - - - /** - * Validate that an object generated from a JSON String has the same content as the object used to - * create the JSON String. - */ - @Test public void testJSON() - { - ObjectMapper objectMapper = new ObjectMapper(); - String jsonString = null; - - try - { - jsonString = objectMapper.writeValueAsString(OCFDatabaseConnectorErrorCode.CONNECT_FAIL); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - assertTrue(objectMapper.readValue(jsonString, OCFDatabaseConnectorErrorCode.class) == OCFDatabaseConnectorErrorCode.CONNECT_FAIL); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - } - - - /** - * Test that toString is overridden. - */ - @Test public void testToString() - { - assertTrue(OCFDatabaseConnectorErrorCode.CONNECT_FAIL.toString().contains("OCFDatabaseConnectorErrorCode")); - } - - - /** - * Test that equals is working. - */ - @Test public void testEquals() - { - assertTrue(OCFDatabaseConnectorErrorCode.CONNECT_FAIL.equals(OCFDatabaseConnectorErrorCode.CONNECT_FAIL)); - assertFalse(OCFDatabaseConnectorErrorCode.CONNECT_FAIL.equals(OCFDatabaseConnectorErrorCode.DISCONNECT_FAIL)); - } - - - /** - * Test that hashcode is working. - */ - @Test public void testHashcode() - { - assertTrue(OCFDatabaseConnectorErrorCode.CONNECT_FAIL.hashCode() == OCFDatabaseConnectorErrorCode.CONNECT_FAIL.hashCode()); - assertFalse(OCFDatabaseConnectorErrorCode.CONNECT_FAIL.hashCode() == OCFDatabaseConnectorErrorCode.DISCONNECT_FAIL.hashCode()); - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorTest.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorTest.java deleted file mode 100644 index aa1a7398072..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/database/gaian/GaianOCFConnectorTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -package org.odpi.openmetadata.adapters.connectors.database.gaian; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import static org.testng.Assert.*; - -public class GaianOCFConnectorTest { - - private String userId; - private String query; - private GaianOCFConnector gaianOCFConnector; - - @BeforeMethod - public void setUp() throws Exception { - userId="gaiandb"; - query="select * from gaiandb.LT0"; - gaianOCFConnector=new GaianOCFConnector( - "jdbc:derby://", - "localhost", - "6414", - "gaiandb", - "gaiandb", - "passw0rd", - true); - } - - @Test - void setDBUrl() { - String url="jdbc:derby://localhost:6414/gaiandb;create=true;user=gaiandb;" + - "password=passw0rd;proxy-user=gaiandb;proxy-pwd=passw0rd"; - try { - gaianOCFConnector.setDBUrl(userId); - } catch (ConnectionCheckedException e) { - e.printStackTrace(); - } - assertEquals(url,gaianOCFConnector.getUrl()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/pom.xml b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/pom.xml index f62ce23eb3a..499e6c38ba3 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/pom.xml +++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/pom.xml @@ -30,7 +30,6 @@ data-store-connectors pom - gaian-connector file-connectors cassandra-data-store-connector diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md index 9cb53bee89f..3f7a3078f36 100644 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md +++ b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md @@ -45,12 +45,7 @@ with security enforcement points. * These connectors will become Security Integration Connectors for the [Security Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/security-integrator) - running in the Integration Daemon. - -* **[view-generator-connectors](view-generator-connectors)** provide plugins to the -[Virtualizer](../../../admin-services/docs/concepts/virtualizer.md) -that automatically configure data virtualization platforms from -open metadata. + running in the Integration Daemon. * These connectors will become Database Integration Connectors for the [Database Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/database-integrator) diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/pom.xml b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/pom.xml index ad5d402d0f8..a7a12920dc3 100644 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/pom.xml +++ b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/pom.xml @@ -31,8 +31,6 @@ pom - view-generator-connectors - security-sync-connectors security-officer-connectors data-platform-connectors open-lineage-connectors diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/README.md b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/README.md deleted file mode 100644 index 87a97ddfa30..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/README.md +++ /dev/null @@ -1,17 +0,0 @@ - - - -![InDev](../../../../../open-metadata-publication/website/images/egeria-content-status-in-development.png#pagewidth) - -# Security Synchronization Connectors - -The security synchronization connectors provide plugins to the governance daemon -that synchronize classification, user information and governance definitions -with security enforcement points. - ----- -Return to [governance-daemon-connectors](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/pom.xml b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/pom.xml deleted file mode 100644 index cfe248ca640..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - governance-daemon-connectors - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - pom - - Security Synchronization Connectors - - The security synchronization connectors provide plugins to the governance daemon - that synchronizes classification, user information and governance definitions - with security enforcement points. - - - ranger-connector - - - security-sync-connectors - - diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/build.gradle deleted file mode 100644 index 6e00e878988..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:access-services:security-officer:security-officer-api') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation 'org.springframework:spring-core' - implementation 'org.springframework:spring-web' - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'com.fasterxml.jackson.core:jackson-core' - implementation 'org.slf4j:slf4j-api' - implementation 'org.apache.commons:commons-collections4' -} - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/pom.xml b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/pom.xml deleted file mode 100644 index 72a0103d2f8..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - security-sync-connectors - org.odpi.egeria - 2.11-SNAPSHOT - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - ranger-connector - - - - - org.odpi.egeria - security-officer-api - - - - org.odpi.egeria - open-connector-framework - - - - org.springframework - spring-core - - - - org.springframework - spring-web - - - - com.fasterxml.jackson.core - jackson-databind - - - - com.fasterxml.jackson.core - jackson-core - - - - org.slf4j - slf4j-api - - - - org.apache.commons - commons-collections4 - - - - diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnector.java deleted file mode 100644 index 9cad54c6c80..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnector.java +++ /dev/null @@ -1,561 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.collections4.CollectionUtils; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.Context; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.GovernanceClassification; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.GovernedAsset; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerPolicyResource; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerSecurityServicePolicies; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerServiceResource; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerTag; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerTagDef; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.ResourceTagMapper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RestTemplate; - -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.function.Function; -import java.util.stream.Collectors; - -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.COLUMN; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.DEFAULT_SCHEMA_NAME; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.NAME; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.OPEN_METADATA_OWNER; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.RANGER_CONNECTOR; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SCHEMA; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SECURITY_SERVER_AUTHORIZATION; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SECURITY_TAGS; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_POLICIES; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_TAGS; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_TAGS_MAP_TAG_GUID_RESOURCE_GUI; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_TAGS_RESOURCES; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_TAGS_RESOURCE_BY_GUID; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_TAGS_TAGDEF; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SERVICE_TAGS_TAG_RESOURCE_MAPS; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.TABLE; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.TAG_RESOURCE_ASSOCIATION; - -public class RangerSecurityServiceConnector extends ConnectorBase implements SecurityServiceConnector { - - private static final Logger log = LoggerFactory.getLogger(RangerSecurityServiceConnector.class); - private Connection connection; - - public RangerSecurityServiceConnector(Connection securityServerConnection) { - this.connection = securityServerConnection; - } - - @Override - public void importTaggedResources(List governedAssets) { - Set tags = new HashSet<>(); - List resources = new ArrayList<>(); - Map> tagToResource = buildResourceToTagsAssociationMap(governedAssets, tags, resources); - - createRangerTagDef(); - List exitingAssociationResourceTags = getExistingAssociationResourceTags(); - if (exitingAssociationResourceTags.isEmpty()) { - resources.forEach(this::createRangerServiceResource); - tags.forEach(this::createRangerTag); - tagToResource.forEach((key, value) -> value.forEach(x -> createAssociationResourceToSecurityTag(key, x))); - return; - } - - List existingResources = getExistingResources(); - Map existingResourcesMap = mapResourceIds(existingResources); - Set rangerExistingTags = getExistingTags(); - Map existingTagsMap = mapTagIds(rangerExistingTags); - - Map> existingAssoc = mapResourceTagsById(exitingAssociationResourceTags, existingResourcesMap, existingTagsMap); - - if (tagToResource.isEmpty()) { - existingAssoc.forEach((key, value) -> value.forEach(x -> deleteAssociationResourceToSecurityTagBasedOnIds(key, x))); - return; - } - - syncTags(tags, rangerExistingTags); - syncResources(resources, existingResources); - syncAssociations(tagToResource, existingAssoc); - } - - @Override - public RangerSecurityServicePolicies getSecurityServicePolicies(String serviceName, Long lastKnownVersion) { - if (serviceName == null) { - return null; - } - String servicePoliciesURL = MessageFormat.format(SERVICE_POLICIES, connection.getEndpoint().getAddress(), serviceName, lastKnownVersion); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - - try { - ResponseEntity result = restTemplate.exchange(servicePoliciesURL, HttpMethod.GET, entity, RangerSecurityServicePolicies.class); - if (result.getStatusCode().value() == HttpStatus.OK.value()) { - return result.getBody(); - } else if (result.getStatusCode().value() == HttpStatus.NOT_MODIFIED.value()) { - log.debug("Policies list not modified since last known version {}", lastKnownVersion); - return null; - } - return result.getBody(); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to fetch the security service policies for service = {} with last known version {}", serviceName, lastKnownVersion); - } - return null; - } - - @Override - public RangerServiceResource createResource(GovernedAsset governedAsset) { - RangerServiceResource serviceResource = buildRangerResource(governedAsset); - return createRangerServiceResource(serviceResource); - } - - private RangerServiceResource createRangerServiceResource(RangerServiceResource resource) { - String createAssociation = getRangerURL(SERVICE_TAGS_RESOURCES); - - String body = getBody(resource); - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(body, getHttpHeaders()); - - try { - ResponseEntity result = restTemplate.exchange(createAssociation, HttpMethod.POST, entity, RangerServiceResource.class); - return result.getBody(); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to create the resource {}", resource); - } - return null; - } - - @Override - public RangerServiceResource getResourceByGUID(String resourceGuid) { - String resourceURL = getRangerURL(SERVICE_TAGS_RESOURCE_BY_GUID, resourceGuid); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - - try { - ResponseEntity result = restTemplate.exchange(resourceURL, HttpMethod.GET, entity, RangerServiceResource.class); - return result.getBody(); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to fetch the resource with guid = {}", resourceGuid); - } - - return null; - } - - @Override - public void deleteResource(String resourceGuid) { - String resourceURL = getRangerURL(SERVICE_TAGS_RESOURCE_BY_GUID, resourceGuid); - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - - try { - restTemplate.delete(resourceURL, HttpMethod.DELETE, entity); - log.info("The resource with guid = {} has been deleted", resourceGuid); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to delete the resource with guid = {}", resourceGuid); - } - } - - @Override - public List createSecurityTags(GovernanceClassification classification) { - - if (classification.getSecurityLabels() == null || classification.getSecurityLabels().isEmpty()) { - return Collections.emptyList(); - } - - List rangerTags = new ArrayList<>(classification.getSecurityLabels().size()); - for (String securityTag : classification.getSecurityLabels()) { - RangerTag rangerTag = buildRangerTag(securityTag, classification.getSecurityProperties()); - rangerTags.add(createRangerTag(rangerTag)); - } - - return rangerTags; - } - - @Override - public List getTagsAssociatedWithTheResource(Long id) { - List mapper = getExistingAssociationResourceTags(); - if (mapper == null) { - return Collections.emptyList(); - } - - return mapper.stream().filter(resourceTagMapper -> resourceTagMapper.getResourceId().equals(id)).collect(Collectors.toList()); - } - - - @Override - public ResourceTagMapper createAssociationResourceToSecurityTag(String resourceGUID, String tagGUID) { - String rangerBaseURL = connection.getEndpoint().getAddress(); - String createAssociation = MessageFormat.format(SERVICE_TAGS_MAP_TAG_GUID_RESOURCE_GUI, rangerBaseURL, tagGUID, resourceGUID); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - try { - ResponseEntity result = restTemplate.exchange(createAssociation, HttpMethod.POST, entity, ResourceTagMapper.class); - return result.getBody(); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to create the association between tag {} and resource {}", tagGUID, resourceGUID); - } - return null; - } - - @Override - public void deleteAssociationResourceToSecurityTag(ResourceTagMapper resourceTagMapper) { - String rangerBaseURL = connection.getEndpoint().getAddress(); - String deleteAssociationURL = MessageFormat.format(TAG_RESOURCE_ASSOCIATION, rangerBaseURL, resourceTagMapper.getId()); - - Boolean isDeleted = doDelete(deleteAssociationURL); - if (isDeleted) { - log.info("The association with id {} between tag {} and resource {} has been removed", resourceTagMapper.getId(), resourceTagMapper.getTagId(), resourceTagMapper.getResourceId()); - } else { - log.info("Unable to delete the association with id = {} between tag {} and resource {}", resourceTagMapper.getId(), resourceTagMapper.getTagId(), resourceTagMapper.getResourceId()); - } - } - - private void deleteAssociationResourceToSecurityTagBasedOnIds(String resourceGUID, String tagGUID) { - String rangerBaseURL = connection.getEndpoint().getAddress(); - String deleteURLByGUIDs = MessageFormat.format(SERVICE_TAGS_MAP_TAG_GUID_RESOURCE_GUI, rangerBaseURL, tagGUID, resourceGUID); - - Boolean isDeleted = doDelete(deleteURLByGUIDs); - if (isDeleted) { - log.debug("The association between tag {} and resoure {} has been deleted", tagGUID, resourceGUID); - } else { - log.debug("Unable to delete the association between tag {} and resource {}", tagGUID, resourceGUID); - } - } - - private RangerTagDef createRangerTagDef() { - RangerTagDef rangerTagDef = buildRangerTagDef(); - String body = getBody(rangerTagDef); - - String createRangerTagDefURL = getRangerURL(SERVICE_TAGS_TAGDEF); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(body, getHttpHeaders()); - - try { - ResponseEntity result = restTemplate.exchange(createRangerTagDefURL, HttpMethod.POST, entity, RangerTagDef.class); - return result.getBody(); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to create a security tag"); - } - return null; - } - - private RangerTag createRangerTag(RangerTag rangerTag) { - String createTagURL = getRangerURL(SERVICE_TAGS); - String body = getBody(rangerTag); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(body, getHttpHeaders()); - - try { - restTemplate.exchange(createTagURL, HttpMethod.POST, entity, RangerTag.class); - return rangerTag; - } catch (HttpStatusCodeException exception) { - log.debug("Unable to create a security tag {}", rangerTag); - } - return rangerTag; - } - - private RangerTagDef buildRangerTagDef() { - RangerTagDef rangerTagDef = new RangerTagDef(); - rangerTagDef.setId(1L); - rangerTagDef.setCreatedBy(RANGER_CONNECTOR); - rangerTagDef.setName(SECURITY_TAGS); - - return rangerTagDef; - } - - private RangerServiceResource buildRangerResource(GovernedAsset governedAsset) { - RangerServiceResource serviceResource = new RangerServiceResource(); - - serviceResource.setGuid(governedAsset.getGuid()); - serviceResource.setServiceName(DEFAULT_SCHEMA_NAME); - serviceResource.setCreatedBy(RANGER_CONNECTOR); - Map resourceElements = getRangerPolicyResourceMap(governedAsset.getContext()); - serviceResource.setResourceElements(resourceElements); - - return serviceResource; - } - - private RangerTag buildRangerTag(String tagGUID, Map tagAttributes) { - RangerTag tag = new RangerTag(); - - tag.setCreatedBy(RANGER_CONNECTOR); - tag.setType(SECURITY_TAGS); - tag.setOwner(OPEN_METADATA_OWNER); - tag.setGuid(tagGUID); - - if (tagAttributes == null) { - tagAttributes = new HashMap<>(); - } - - tagAttributes.put(NAME, tagGUID); - tag.setAttributes(tagAttributes); - - return tag; - } - - - private List getExistingAssociationResourceTags() { - String allMappedResources = getRangerURL(SERVICE_TAGS_TAG_RESOURCE_MAPS); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - - try { - ResponseEntity> response = restTemplate.exchange(allMappedResources, HttpMethod.GET, entity, new ParameterizedTypeReference>() { - }); - return response.getBody(); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to fetch the mapped resources"); - } - return Collections.emptyList(); - } - - - private Map getRangerPolicyResourceMap(Context context) { - Map resourceElements = new HashMap<>(3); - final RangerPolicyResource schemaValues = getListOfPossibleValuesOfElements(DEFAULT_SCHEMA_NAME); - resourceElements.put(SCHEMA, schemaValues); - - if (context == null) { - return resourceElements; - } - - final RangerPolicyResource tableValue = getListOfPossibleValuesOfElements(context.getTable()); - resourceElements.put(TABLE, tableValue); - - if (context.getColumn() != null) { - final RangerPolicyResource columnValue = getListOfPossibleValuesOfElements(context.getColumn()); - resourceElements.put(COLUMN, columnValue); - } - - return resourceElements; - } - - private RangerPolicyResource getListOfPossibleValuesOfElements(String value) { - RangerPolicyResource resourceValue = new RangerPolicyResource(); - resourceValue.setValues(Collections.singletonList(value)); - return resourceValue; - } - - public List getExistingResources() { - String createAssociation = getRangerURL(SERVICE_TAGS_RESOURCES); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - try { - ResponseEntity> response = - restTemplate.exchange(createAssociation, HttpMethod.GET, entity, new ParameterizedTypeReference>() { - }); - - if (response.getBody() != null) { - return response.getBody(); - } - } catch (HttpStatusCodeException exception) { - log.debug("Unable to fetch the resources"); - } - - return Collections.emptyList(); - } - - private Set getExistingTags() { - String createTagURL = getRangerURL(SERVICE_TAGS); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getHttpHeaders()); - - try { - ResponseEntity> response = - restTemplate.exchange(createTagURL, HttpMethod.GET, entity, new ParameterizedTypeReference>() { - }); - if (response.getBody() != null) { - return new HashSet<>(response.getBody()); - } - } catch (HttpStatusCodeException exception) { - log.debug("Unable to get the security tags"); - } - return Collections.emptySet(); - } - - - private Map> buildResourceToTagsAssociationMap(List governedAssets, Set tags, List resources) { - Map> tagToResource = new HashMap<>(); - - for (GovernedAsset governedAsset : governedAssets) { - - if (governedAsset.getAssignedGovernanceClassification() == null - || governedAsset.getAssignedGovernanceClassification().getSecurityLabels() == null - || governedAsset.getAssignedGovernanceClassification().getSecurityLabels().isEmpty()) { - continue; - } - - RangerServiceResource resource = buildRangerResource(governedAsset); - resources.add(resource); - - GovernanceClassification governanceClassification = governedAsset.getAssignedGovernanceClassification(); - for (String securityLabel : governanceClassification.getSecurityLabels()) { - RangerTag rangerTag = buildRangerTag(securityLabel, governanceClassification.getSecurityProperties()); - tags.add(rangerTag); - - addTag(tagToResource, resource, rangerTag); - } - } - return tagToResource; - } - - private void addTag(Map> tagToResource, RangerServiceResource resource, RangerTag rangerTag) { - if (tagToResource.containsKey(resource.getGuid())) { - tagToResource.get(resource.getGuid()).add(rangerTag.getGuid()); - } else { - Set securityTags = new HashSet<>(); - securityTags.add(rangerTag.getGuid()); - tagToResource.put(resource.getGuid(), securityTags); - } - } - - private void syncResources(List resources, List existingResources) { - Collection newResources = CollectionUtils.subtract(resources, existingResources); - newResources.forEach(this::createRangerServiceResource); - } - - private void syncTags(Set tags, Set rangerExistingTags) { - Collection newTags = CollectionUtils.subtract(tags, rangerExistingTags); - newTags.forEach(this::createRangerTag); - } - - private void syncAssociations(Map> tagToResource, Map> existingMapping) { - Map> newMappings = new HashMap<>(); - Map> outdatedMapping = new HashMap<>(); - - for (Map.Entry> tags : tagToResource.entrySet()) { - Set existingTags = existingMapping.get(tags.getKey()); - if (existingTags == null) { - newMappings.put(tags.getKey(), new ArrayList<>(tags.getValue())); - continue; - } - - Collection newlyAdded = CollectionUtils.subtract(tags.getValue(), existingTags); - if (!newlyAdded.isEmpty()) { - newMappings.put(tags.getKey(), (List) newlyAdded); - } - - Collection outdatedTags = CollectionUtils.subtract(existingTags, tags.getValue()); - if (!outdatedTags.isEmpty()) { - outdatedMapping.put(tags.getKey(), (List) outdatedTags); - } - } - - newMappings.forEach((resourceId, tags) -> tags.forEach(tagId -> createAssociationResourceToSecurityTag(resourceId, tagId))); - outdatedMapping.forEach((resourceId, tags) -> tags.forEach(tag -> deleteAssociationResourceToSecurityTagBasedOnIds(resourceId, tag))); - } - - private Map mapTagIds(Set tags) { - return tags.stream().collect(Collectors.toMap(RangerTag::getId, Function.identity())); - } - - private Map mapResourceIds(List resources) { - return resources.stream().collect(Collectors.toMap(RangerServiceResource::getId, Function.identity())); - } - - private Map> mapResourceTagsById(List exitingAssociationResourceTags, - Map existingResourcesMap, Map existingTagsMap) { - - Map> existingAssoc = new HashMap<>(); - - for (ResourceTagMapper mapper : exitingAssociationResourceTags) { - RangerServiceResource resource = existingResourcesMap.get(mapper.getResourceId()); - RangerTag rangerTag = existingTagsMap.get(mapper.getTagId()); - addTag(existingAssoc, resource, rangerTag); - } - - return existingAssoc; - } - - private String getRangerURL(String s, Object... params) { - String rangerBaseURL = connection.getEndpoint().getAddress(); - return MessageFormat.format(s, rangerBaseURL, params); - } - - private String getBody(Object resource) { - ObjectMapper objectMapper = new ObjectMapper(); - try { - return objectMapper.writeValueAsString(resource); - } catch (JsonProcessingException e) { - log.error("error write json "); - } - return null; - } - - private HttpHeaders getHttpHeaders() { - HttpHeaders headers = getBasicHTTPHeaders(); - - if (connection != null && connection.getConfigurationProperties() != null - && connection.getConfigurationProperties().containsKey(SECURITY_SERVER_AUTHORIZATION)) { - headers.set("Authorization", (String) connection.getConfigurationProperties().get(SECURITY_SERVER_AUTHORIZATION)); - } - - return headers; - } - - private HttpHeaders getBasicHTTPHeaders() { - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); - headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); - return headers; - } - - private Boolean doDelete(String deleteAssociationURL) { - RestTemplate restTemplate = new RestTemplate(); - HttpHeaders headers = getHttpHeaders(); - headers.add("X-HTTP-Method-Override", "DELETE"); - HttpEntity entity = new HttpEntity<>(headers); - - try { - restTemplate.exchange(deleteAssociationURL, HttpMethod.DELETE, entity, Void.class); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to doDelete the association between tag and resource"); - return false; - } - return true; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - RangerSecurityServiceConnector that = (RangerSecurityServiceConnector) o; - return Objects.equals(connection, that.connection); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), connection); - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnectorProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnectorProvider.java deleted file mode 100644 index c389225afa1..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/RangerSecurityServiceConnectorProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; - -public class RangerSecurityServiceConnectorProvider extends ConnectorProviderBase { - - static final String connectorTypeGUID = "2b83adc5-6ce8-5865-77b4-3fe8821004f9"; - static final String connectorTypeName = "Ranger Security Server Connector"; - static final String connectorTypeDescription = "Connector supports storing of the open metadata cohort registry in a file."; - - /** - * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific - * registry store implementation. - */ - public RangerSecurityServiceConnectorProvider() { - Class connectorClass = RangerSecurityServiceConnectorProvider.class; - super.setConnectorClassName(connectorClass.getName()); - - ConnectorType connectorType = new ConnectorType(); - connectorType.setType(ConnectorType.getConnectorTypeType()); - connectorType.setGUID(connectorTypeGUID); - connectorType.setQualifiedName(connectorTypeName); - connectorType.setDisplayName(connectorTypeName); - connectorType.setDescription(connectorTypeDescription); - connectorType.setConnectorProviderClassName(this.getClass().getName()); - - super.connectorTypeBean = connectorType; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/SecurityServiceConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/SecurityServiceConnector.java deleted file mode 100644 index 10d21cc9cb0..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/SecurityServiceConnector.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector; - -import org.odpi.openmetadata.accessservices.securityofficer.api.model.GovernanceClassification; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.GovernedAsset; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerSecurityServicePolicies; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerServiceResource; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerTag; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.ResourceTagMapper; - -import java.util.List; - -public interface SecurityServiceConnector { - - void importTaggedResources(List governedAssets); - - RangerSecurityServicePolicies getSecurityServicePolicies(String serviceName, Long lastKnownVersion); - - RangerServiceResource createResource(GovernedAsset governedAsset); - - RangerServiceResource getResourceByGUID(String resourceGuid); - - void deleteResource(String resourceGuid); - - List createSecurityTags(GovernanceClassification classification); - - List getTagsAssociatedWithTheResource(Long id); - - ResourceTagMapper createAssociationResourceToSecurityTag(String tagGUID, String resourceGUID); - - void deleteAssociationResourceToSecurityTag(ResourceTagMapper resourceTagMapper); -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/auditlog/RangerSecurityServiceConnectorAuditCode.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/auditlog/RangerSecurityServiceConnectorAuditCode.java deleted file mode 100644 index 6acef4873e2..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/auditlog/RangerSecurityServiceConnectorAuditCode.java +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.auditlog; - -import java.text.MessageFormat; - -public enum RangerSecurityServiceConnectorAuditCode { - - SERVICE_INITIALIZING("RANGER-CONNECTOR-0001", - "The Ranger Connector is initializing a new server instance", - "The local server has started up a new instance of the Ranger Connector.", - "No action is required. This is part of the normal operation of the service."), - - SERVICE_INITIALIZED("RANGER-CONNECTOR-0002", - "The Ranger Connector has initialized a new instance for server {0}", - "The Ranger Connector has completed initialization of a new instance.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_SHUTDOWN("RANGER-CONNECTOR-0003", - "The Ranger Connector is shutting down its instance for server {0}", - "The local server has requested shut down of a Ranger Connector instance.", - "No action is required. This is part of the normal operation of the service."); - - private String logMessageId; - private String logMessage; - private String systemAction; - private String userAction; - - - /** - * The constructor for OMRSAuditCode expects to be passed one of the enumeration rows defined in - * OMRSAuditCode above. For example: - *

- * OMRSAuditCode auditCode = OMRSAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 4 parameters shown below. - * - * @param messageId - unique Id for the message - * @param message - text for the message - * @param systemAction - description of the action taken by the system when the condition happened - * @param userAction - instructions for resolving the situation, if any - */ - RangerSecurityServiceConnectorAuditCode(String messageId, String message, - String systemAction, String userAction) { - this.logMessageId = messageId; - this.logMessage = message; - this.systemAction = systemAction; - this.userAction = userAction; - } - - /** - * Returns the unique identifier for the error message. - * - * @return logMessageId - */ - public String getLogMessageId() { - return logMessageId; - } - - /** - * Returns the log message with the placeholders filled out with the supplied parameters. - * - * @param params - strings that plug into the placeholders in the logMessage - * @return logMessage (formatted with supplied parameters) - */ - public String getFormattedLogMessage(String... params) { - MessageFormat mf = new MessageFormat(logMessage); - return mf.format(params); - } - - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction String - */ - public String getSystemAction() { - return systemAction; - } - - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction String - */ - public String getUserAction() { - return userAction; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerBaseObject.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerBaseObject.java deleted file mode 100644 index 290ab20ae40..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerBaseObject.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerBaseObject { - - private Long id; - private String guid; - private String createdBy; - private String updatedBy; - private Long version; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - public String getUpdatedBy() { - return updatedBy; - } - - public void setUpdatedBy(String updatedBy) { - this.updatedBy = updatedBy; - } - - public Long getVersion() { - return version; - } - - public void setVersion(Long version) { - this.version = version; - } - - @Override - public String toString() { - return "RangerBaseObject{" + - "id=" + id + - ", guid='" + guid + '\'' + - ", createdBy='" + createdBy + '\'' + - ", updatedBy='" + updatedBy + '\'' + - ", version=" + version + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerDataMaskPolicyItem.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerDataMaskPolicyItem.java deleted file mode 100644 index 5e211c042e1..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerDataMaskPolicyItem.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerDataMaskPolicyItem extends RangerPolicyItem { - - private RangerPolicyItemDataMaskInfo dataMaskInfo; - - public RangerPolicyItemDataMaskInfo getDataMaskInfo() { - return dataMaskInfo; - } - - public void setDataMaskInfo(RangerPolicyItemDataMaskInfo dataMaskInfo) { - this.dataMaskInfo = dataMaskInfo; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicy.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicy.java deleted file mode 100644 index e7647c8539c..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicy.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.List; -import java.util.Map; - -public class RangerPolicy { - - private String service; - private String name; - private Integer policyType; - private Integer policyPriority; - private String description; - private String resourceSignature; - private Boolean isAuditEnabled; - private Map resources; - private List policyItems; - private List denyPolicyItems; - private List allowExceptions; - private List denyExceptions; - private List dataMaskPolicyItems; - private List rowFilterPolicyItems; - private String serviceType; - private Map options; - private List policyLabels; - - public String getService() { - return service; - } - - public void setService(String service) { - this.service = service; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getPolicyType() { - return policyType; - } - - public void setPolicyType(Integer policyType) { - this.policyType = policyType; - } - - public Integer getPolicyPriority() { - return policyPriority; - } - - public void setPolicyPriority(Integer policyPriority) { - this.policyPriority = policyPriority; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getResourceSignature() { - return resourceSignature; - } - - public void setResourceSignature(String resourceSignature) { - this.resourceSignature = resourceSignature; - } - - public Boolean getAuditEnabled() { - return isAuditEnabled; - } - - public void setAuditEnabled(Boolean auditEnabled) { - isAuditEnabled = auditEnabled; - } - - public Map getResources() { - return resources; - } - - public void setResources(Map resources) { - this.resources = resources; - } - - public List getPolicyItems() { - return policyItems; - } - - public void setPolicyItems(List policyItems) { - this.policyItems = policyItems; - } - - public List getDenyPolicyItems() { - return denyPolicyItems; - } - - public void setDenyPolicyItems(List denyPolicyItems) { - this.denyPolicyItems = denyPolicyItems; - } - - public List getAllowExceptions() { - return allowExceptions; - } - - public void setAllowExceptions(List allowExceptions) { - this.allowExceptions = allowExceptions; - } - - public List getDenyExceptions() { - return denyExceptions; - } - - public void setDenyExceptions(List denyExceptions) { - this.denyExceptions = denyExceptions; - } - - public List getDataMaskPolicyItems() { - return dataMaskPolicyItems; - } - - public void setDataMaskPolicyItems(List dataMaskPolicyItems) { - this.dataMaskPolicyItems = dataMaskPolicyItems; - } - - public List getRowFilterPolicyItems() { - return rowFilterPolicyItems; - } - - public void setRowFilterPolicyItems(List rowFilterPolicyItems) { - this.rowFilterPolicyItems = rowFilterPolicyItems; - } - - public String getServiceType() { - return serviceType; - } - - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } - - public Map getOptions() { - return options; - } - - public void setOptions(Map options) { - this.options = options; - } - - public List getPolicyLabels() { - return policyLabels; - } - - public void setPolicyLabels(List policyLabels) { - this.policyLabels = policyLabels; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItem.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItem.java deleted file mode 100644 index 71e269a5161..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItem.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.List; - -public class RangerPolicyItem { - - private List accesses; - private List users; - private List groups; - private List conditions; - private Boolean delegateAdmin; - - public List getAccesses() { - return accesses; - } - - public void setAccesses(List accesses) { - this.accesses = accesses; - } - - public List getUsers() { - return users; - } - - public void setUsers(List users) { - this.users = users; - } - - public List getGroups() { - return groups; - } - - public void setGroups(List groups) { - this.groups = groups; - } - - public List getConditions() { - return conditions; - } - - public void setConditions(List conditions) { - this.conditions = conditions; - } - - public Boolean getDelegateAdmin() { - return delegateAdmin; - } - - public void setDelegateAdmin(Boolean delegateAdmin) { - this.delegateAdmin = delegateAdmin; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemAccess.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemAccess.java deleted file mode 100644 index e1d9038a4e3..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemAccess.java +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerPolicyItemAccess { - - private String type; - private Boolean isAllowed; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getAllowed() { - return isAllowed; - } - - public void setAllowed(Boolean allowed) { - isAllowed = allowed; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemCondition.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemCondition.java deleted file mode 100644 index eeaef059c90..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemCondition.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.List; - -public class RangerPolicyItemCondition { - - private String type; - private List values; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public List getValues() { - return values; - } - - public void setValues(List values) { - this.values = values; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemDataMaskInfo.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemDataMaskInfo.java deleted file mode 100644 index 5be2acbc322..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemDataMaskInfo.java +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerPolicyItemDataMaskInfo { - - private String dataMaskType; - private String conditionExpr; - private String valueExpr; - - public String getDataMaskType() { - return dataMaskType; - } - - public void setDataMaskType(String dataMaskType) { - this.dataMaskType = dataMaskType; - } - - public String getConditionExpr() { - return conditionExpr; - } - - public void setConditionExpr(String conditionExpr) { - this.conditionExpr = conditionExpr; - } - - public String getValueExpr() { - return valueExpr; - } - - public void setValueExpr(String valueExpr) { - this.valueExpr = valueExpr; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemRowFilterInfo.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemRowFilterInfo.java deleted file mode 100644 index 3687df274f2..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyItemRowFilterInfo.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerPolicyItemRowFilterInfo { - - private String filterExpr; - - public String getFilterExpr() { - return filterExpr; - } - - public void setFilterExpr(String filterExpr) { - this.filterExpr = filterExpr; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyResource.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyResource.java deleted file mode 100644 index 967a173973d..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerPolicyResource.java +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.List; -import java.util.Objects; - -public class RangerPolicyResource { - - private List values; - private Boolean isExcludes; - private Boolean isRecursive; - - public List getValues() { - return values; - } - - public void setValues(List values) { - this.values = values; - } - - public Boolean getExcludes() { - return isExcludes; - } - - public void setExcludes(Boolean excludes) { - isExcludes = excludes; - } - - public Boolean getRecursive() { - return isRecursive; - } - - public void setRecursive(Boolean recursive) { - isRecursive = recursive; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - RangerPolicyResource that = (RangerPolicyResource) o; - return values.equals(that.values) && - isExcludes.equals(that.isExcludes) && - isRecursive.equals(that.isRecursive); - } - - @Override - public int hashCode() { - return Objects.hash(values, isExcludes, isRecursive); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerRowFilterPolicyItem.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerRowFilterPolicyItem.java deleted file mode 100644 index 67dbd9e737c..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerRowFilterPolicyItem.java +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerRowFilterPolicyItem extends RangerPolicyItem { - - private RangerPolicyItemRowFilterInfo rowFilterInfo; - - public RangerPolicyItemRowFilterInfo getRowFilterInfo() { - return rowFilterInfo; - } - - public void setRowFilterInfo(RangerPolicyItemRowFilterInfo rowFilterInfo) { - this.rowFilterInfo = rowFilterInfo; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerSecurityServicePolicies.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerSecurityServicePolicies.java deleted file mode 100644 index 857b4c115a7..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerSecurityServicePolicies.java +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.Date; -import java.util.List; - -public class RangerSecurityServicePolicies { - - private String serviceName; - private Long serviceId; - private Long policyVersion; - private Date policyUpdateTime; - private List policies; - private RangerServiceDef serviceDef; - private String auditMode; - - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public Long getServiceId() { - return serviceId; - } - - public void setServiceId(Long serviceId) { - this.serviceId = serviceId; - } - - public Long getPolicyVersion() { - return policyVersion; - } - - public void setPolicyVersion(Long policyVersion) { - this.policyVersion = policyVersion; - } - - public Date getPolicyUpdateTime() { - return policyUpdateTime; - } - - public void setPolicyUpdateTime(Date policyUpdateTime) { - this.policyUpdateTime = policyUpdateTime; - } - - public List getPolicies() { - return policies; - } - - public void setPolicies(List policies) { - this.policies = policies; - } - - public RangerServiceDef getServiceDef() { - return serviceDef; - } - - public void setServiceDef(RangerServiceDef serviceDef) { - this.serviceDef = serviceDef; - } - - public String getAuditMode() { - return auditMode; - } - - public void setAuditMode(String auditMode) { - this.auditMode = auditMode; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceDef.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceDef.java deleted file mode 100644 index 68320971372..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceDef.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.Map; - -public class RangerServiceDef extends RangerBaseObject { - - private String name; - private String implClass; - private String label; - private String description; - private String rbKeyLabel; - private String rbKeyDescription; - private Map options; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getImplClass() { - return implClass; - } - - public void setImplClass(String implClass) { - this.implClass = implClass; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getRbKeyLabel() { - return rbKeyLabel; - } - - public void setRbKeyLabel(String rbKeyLabel) { - this.rbKeyLabel = rbKeyLabel; - } - - public String getRbKeyDescription() { - return rbKeyDescription; - } - - public void setRbKeyDescription(String rbKeyDescription) { - this.rbKeyDescription = rbKeyDescription; - } - - public Map getOptions() { - return options; - } - - public void setOptions(Map options) { - this.options = options; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceResource.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceResource.java deleted file mode 100644 index bd0c3847765..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerServiceResource.java +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.Map; -import java.util.Objects; - -public class RangerServiceResource extends RangerBaseObject { - - private String serviceName; - private Map resourceElements; - - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public Map getResourceElements() { - return resourceElements; - } - - public void setResourceElements(Map resourceElements) { - this.resourceElements = resourceElements; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - RangerServiceResource resource = (RangerServiceResource) o; - return Objects.equals(serviceName, resource.serviceName) && - Objects.equals(resourceElements, resource.resourceElements); - } - - @Override - public int hashCode() { - return Objects.hash(serviceName, resourceElements); - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTag.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTag.java deleted file mode 100644 index e30b3eb8db8..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTag.java +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -import java.util.Map; -import java.util.Objects; - -public class RangerTag extends RangerBaseObject { - - private Boolean isEnabled; - private Short owner; - private String type; - private Map attributes; - private Map options; - - public Boolean getEnabled() { - return isEnabled; - } - - public void setEnabled(Boolean enabled) { - isEnabled = enabled; - } - - public Short getOwner() { - return owner; - } - - public void setOwner(Short owner) { - this.owner = owner; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Map getAttributes() { - return attributes; - } - - public void setAttributes(Map attributes) { - this.attributes = attributes; - } - - public Map getOptions() { - return options; - } - - public void setOptions(Map options) { - this.options = options; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - RangerTag rangerTag = (RangerTag) o; - return this.getGuid().equals(rangerTag.getGuid()) && - type.equals(rangerTag.type); - } - - @Override - public int hashCode() { - return Objects.hash(this.getGuid(), type); - } - - @Override - public String toString() { - return "RangerTag{" + - "isEnabled=" + isEnabled + - ", owner=" + owner + - ", type='" + type + '\'' + - ", attributes=" + attributes + - ", options=" + options + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTagDef.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTagDef.java deleted file mode 100644 index 8edacc3b6b7..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/RangerTagDef.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class RangerTagDef extends RangerBaseObject { - - private Boolean isEnabled; - private String name; - - public Boolean getEnabled() { - return isEnabled; - } - - public void setEnabled(Boolean enabled) { - isEnabled = enabled; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "RangerTagDef{" + - "isEnabled=" + isEnabled + - ", name='" + name + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/ResourceTagMapper.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/ResourceTagMapper.java deleted file mode 100644 index 75a5b896e2b..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/model/ResourceTagMapper.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model; - -public class ResourceTagMapper { - - private Long id; - private String guid; - private Long tagId; - private Long resourceId; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getGuid() { - return guid; - } - - public void setGuid(String guid) { - this.guid = guid; - } - - public Long getTagId() { - return tagId; - } - - public void setTagId(Long tagId) { - this.tagId = tagId; - } - - public Long getResourceId() { - return resourceId; - } - - public void setResourceId(Long resourceId) { - this.resourceId = resourceId; - } - - @Override - public String toString() { - return "ResourceTagMapper{" + - "id=" + id + - ", guid='" + guid + '\'' + - ", tagId=" + tagId + - ", resourceId=" + resourceId + - '}'; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/util/Constants.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/util/Constants.java deleted file mode 100644 index 773c78a1fa3..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/securitysync/rangerconnector/util/Constants.java +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util; - -public class Constants { - - public static final String DEFAULT_SCHEMA_NAME = "gaian"; - public static final String RANGER_CONNECTOR = "Egeria - Ranger Connector"; - public static final String SECURITY_TAGS = "SecurityTags"; - public static final String SECURITY_SYNC_SERVER = "SecuritySyncServer"; - /** - * In Ranger, the default owner is 0 and the global owner is 1. - */ - public static final Short OPEN_METADATA_OWNER = 2; - public static final String TABLE = "table"; - public static final String COLUMN = "column"; - public static final String SCHEMA = "schema"; - public static final String NAME = "name"; - public static final String SERVICE_TAGS_RESOURCE_BY_GUID = "{0}/service/tags/resource/guid/{1}"; - public static final String SERVICE_TAGS_TAG_RESOURCE_MAPS = "{0}/service/tags/tagresourcemaps"; - public static final String GOVERNANCE_ENGINE_OMAS_URL = "{0}/servers/{1}/open-metadata/access-services/governance-engine/users/{2}/assets?classification={3}"; - public static final String TAG_RESOURCE_ASSOCIATION = "{0}/service/tags/tagresourcemap/{1}"; - public static final String SERVICE_TAGS_MAP_TAG_GUID_RESOURCE_GUI = "{0}/service/tags/tagresourcemaps?tag-guid={1}&resource-guid={2}"; - public static final String SERVICE_TAGS_RESOURCES = "{0}/service/tags/resources/"; - public static final String SERVICE_TAGS = "{0}/service/tags/tags"; - public static final String SERVICE_TAGS_TAGDEF = "{0}/service/tags/tagdefs"; - public static final String SERVICE_POLICIES = "{0}/service/plugins/policies/download/{1}?lastKnownVersion={2}"; - public static final String SECURITY_SERVER_AUTHORIZATION = "securityServerAuthorization"; - - private Constants() { - } -} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/README.md b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/README.md deleted file mode 100644 index 4c3affe988e..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/README.md +++ /dev/null @@ -1,18 +0,0 @@ - - - -![InDev](../../../../../open-metadata-publication/website/images/egeria-content-status-in-development.png#pagewidth) - -# View Generator Connectors - -The view generator connectors provide plugins to the governance daemon -that automatically configure data virtualization platforms from -open metadata. - - ----- -Return to [governance-daemon-connectors](..) module. - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/build.gradle b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/build.gradle deleted file mode 100644 index c781c9e7b8e..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:access-services:information-view:information-view-api') - implementation project(':open-metadata-implementation:governance-servers:virtualization-services:virtualization-services-api') - implementation 'org.slf4j:slf4j-api' - implementation 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'View Generator Connectors' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/pom.xml b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/pom.xml deleted file mode 100644 index dbaa49cf7a5..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - governance-daemon-connectors - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - View Generator Connectors - - The view generator connectors provide plugins to the governance daemon - that automatically configures data virtualization platforms from - open metadata. - - - view-generator-connectors - - - - - org.odpi.egeria - audit-log-framework - - - - org.odpi.egeria - open-connector-framework - - - - org.odpi.egeria - repository-services-apis - compile - - - - org.odpi.egeria - information-view-api - - - - org.odpi.egeria - virtualization-services-api - - - - org.slf4j - slf4j-api - - - - - diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnector.java deleted file mode 100644 index 47faa75ad16..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnector.java +++ /dev/null @@ -1,445 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.viewgenerator.derby; - -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.AdditionalProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.ViewGeneratorConnectorBase; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.viewgenerator.derby.auditlog.DerbyViewConnectorAuditCode; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.model.LogicTable; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.model.MappedColumn; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; -import java.util.function.Function; - -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.utils.ConnectorUtils; - -import static org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.utils.ConnectorUtils.BUSINESS_PREFIX; -import static org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.utils.ConnectorUtils.TECHNICAL_PREFIX; - -/** - * This is the interface for the generic operations on data virtualization solutions - */ -public class ViewGeneratorDerbyConnector extends ViewGeneratorConnectorBase { - - private static final Logger log = LoggerFactory.getLogger(ViewGeneratorDerbyConnector.class); - - private String databaseUrl; - private java.sql.Connection derbyConnection; - private java.sql.Statement derbyStatement; - - /* - * Variables for building the connection to the Derby database - */ - private String serverAddress; - private String username; - private String password; - private String isCreate; - private String databaseName; - private int timeoutInSecond; - private String gdbNode; - private String logicTableName; - private String logicTableDefinition; - private String getLogicTablesQuery; - private String gaianFrontendName; - - /** - * Initialize the connector. - * - * @param connectorInstanceId - unique id for the connector instance - useful for messages etc - * @param connectionProperties - POJO for the configuration used to create the connector. - */ - @Override - public void initialize(String connectorInstanceId, ConnectionProperties connectionProperties) { - - final String actionDescription = "initialize"; - - super.initialize(connectorInstanceId, connectionProperties); - - this.connectorInstanceId = connectorInstanceId; - this.connectionProperties = connectionProperties; - - AdditionalProperties connectionAdditionalProperties = connectionProperties.getAdditionalProperties(); - EndpointProperties endpoint = connectionProperties.getEndpoint(); - - if (auditLog != null) { - auditLog.logMessage(actionDescription, DerbyViewConnectorAuditCode.CONNECTOR_INITIALIZING.getMessageDefinition()); - } - - if (endpoint != null) { - serverAddress = endpoint.getAddress(); - AdditionalProperties endpointAdditionalProperties = endpoint.getAdditionalProperties(); - if (serverAddress != null && endpointAdditionalProperties != null) { - username = connectionProperties.getUserId(); - password = connectionProperties.getClearPassword(); - isCreate = endpointAdditionalProperties.getProperty("create"); - databaseName = connectionAdditionalProperties.getProperty("databaseName"); - timeoutInSecond = Integer.parseInt(endpointAdditionalProperties.getProperty("timeoutInSecond")); - databaseUrl = serverAddress + "/" + databaseName + - ";create=" + isCreate + - ";user=" + username + - ";password=" + password + - ";proxy-user=" + username + - ";proxy-pwd=" + password; - log.debug("The generated databased url is {}.", databaseUrl); - } else { - log.error("Errors in the server configuration. The address of the server cannot be extracted"); - if (auditLog != null) { - String additionalPropertiesContents = ""; - if (endpointAdditionalProperties != null) - { - additionalPropertiesContents = endpointAdditionalProperties.toString(); - } - auditLog.logMessage(actionDescription, - DerbyViewConnectorAuditCode.ENDPOINT_CONFIGURATION_ERROR.getMessageDefinition(serverAddress, - additionalPropertiesContents), - connectionProperties.toString()); - } - } - } else { - log.error("Errors in server address. The endpoint containing the server address is missing!"); - if (auditLog != null) { - auditLog.logMessage(actionDescription, - DerbyViewConnectorAuditCode.NO_ENDPOINT.getMessageDefinition(), - connectionProperties.toString()); - } - } - - if (connectionAdditionalProperties != null) { - logicTableName = connectionAdditionalProperties.getProperty("logicTableName"); - logicTableDefinition = connectionAdditionalProperties.getProperty("logicTableDefinition"); - gdbNode = connectionAdditionalProperties.getProperty("gdbNode"); - getLogicTablesQuery = connectionAdditionalProperties.getProperty("getLogicTables"); - gaianFrontendName = connectionAdditionalProperties.getProperty("frontendName"); - } else { - log.error("Errors in settings of the GaianDB"); - if (auditLog != null) { - auditLog.logMessage(actionDescription, - DerbyViewConnectorAuditCode.CONNECTION_CONFIGURATION_ERROR.getMessageDefinition(), - connectionProperties.toString()); - } - } - - createDerbyConnection(); - - if (derbyConnection != null && auditLog != null) { - if (auditLog != null) - { - auditLog.logMessage(actionDescription, - DerbyViewConnectorAuditCode.CONNECTOR_INITIALIZED.getMessageDefinition(databaseName, serverAddress), - connectionProperties.toString()); - } - } - } - - - /** - * Delete a table - * - * @param tableName table name - * @return boolean whether the table is deleted successfully - */ - private boolean deleteLogicalTable(String tableName) { - final String actionDescription = "deleteLogicalTable"; - - try { - derbyStatement = derbyConnection.createStatement(); - derbyStatement.setQueryTimeout(timeoutInSecond); - derbyStatement.executeUpdate("call removelt('" + tableName + "')"); - - log.debug("Successfully deleted table: {}.", tableName); - return true; - - } catch (SQLException e) { - log.error("Error deleting table", e); - if (auditLog != null) { - auditLog.logException(actionDescription, - DerbyViewConnectorAuditCode.CONNECTOR_QUERY_ERROR.getMessageDefinition(), - derbyStatement.toString(), - e); - } - return false; - } - } - - private List getAllLogicTables() { - final String actionDescription = "getAllLogicTables"; - - List logicTableList = new ArrayList<>(); - - try { - derbyStatement = derbyConnection.createStatement(); - derbyStatement.setQueryTimeout(timeoutInSecond); - ResultSet resultSet = derbyStatement.executeQuery(getLogicTablesQuery); - while (resultSet.next()) { - logicTableList.add(extractLogicTableDefinition(resultSet)); - } - - } catch (SQLException e) { - log.error("Error in getting all the logic tables: ", e); - if (auditLog != null) { - auditLog.logException(actionDescription, - DerbyViewConnectorAuditCode.CONNECTOR_QUERY_ERROR.getMessageDefinition(), - derbyStatement.toString(), - e); - } - } - return logicTableList; - } - - - public boolean executeCustomizedUpdate(String update) { - - final String actionDescription = "executeCustomizedUpdate: " + update; - - try { - derbyStatement = derbyConnection.createStatement(); - derbyStatement.setQueryTimeout(timeoutInSecond); - derbyStatement.executeUpdate(update); - - log.debug("Successfully executed query: {}.", update); - return true; - } catch (SQLException e) { - log.error("Error in executing a customized update!", e); - if (auditLog != null) { - auditLog.logException(actionDescription, - DerbyViewConnectorAuditCode.CONNECTOR_QUERY_ERROR.getMessageDefinition(), - derbyStatement.toString(), - e); - } - return false; - } - } - - /** - * Process the serialized information view event - * - * @param tableContextEvent event - * @return the table sent to Gaian - */ - @Override - public Map processInformationViewEvent(TableContextEvent tableContextEvent) { - /*Do Nothing*/ - final String actionDescription = "processInformationViewTopic"; - if (tableContextEvent == null) { - log.debug("Object TableContextEvent is null"); - if (auditLog != null) { - auditLog.logMessage(actionDescription, DerbyViewConnectorAuditCode.CONNECTOR_INBOUND_EVENT_ERROR.getMessageDefinition()); - return Collections.emptyMap(); - } - } - - try { - String gaianNodeName = tableContextEvent.getTableSource().getDatabaseSource().getEndpointSource().getNetworkAddress().replace(".", "").toLowerCase(); - String technicalTableName = ConnectorUtils.getLogicTableName(TECHNICAL_PREFIX, tableContextEvent, gaianNodeName); - String businessTableName = ConnectorUtils.getLogicTableName(BUSINESS_PREFIX, tableContextEvent, gaianNodeName); - String logicalTableName = ConnectorUtils.getLogicTableName(ConnectorUtils.GENERAL, tableContextEvent, gaianNodeName); - List mappedColumns = ConnectorUtils.getMappedColumns(tableContextEvent); - - if (mappedColumns == null || mappedColumns.isEmpty()){ - log.info("There are no business term associations to columns in the received event, removing existing definitions"); - if (getMatchingTables(gaianNodeName, Arrays.asList(businessTableName, technicalTableName)) != null){ - deleteLogicalTable(businessTableName); - deleteLogicalTable(technicalTableName); - } - } - else { - return createTableDefinitions(tableContextEvent, gaianNodeName, technicalTableName, businessTableName, logicalTableName, mappedColumns); - } - } catch (Exception e){ - log.error("Unable to process the event.", e); - } - - - return null; - } - - - /** - * Establish the connection to database - */ - private void createDerbyConnection() { - - final String actionDescription = "createDerbyConnection"; - final String driverClass = "org.apache.derby.jdbc.ClientDriver"; - - try { - - Class.forName(driverClass).newInstance(); - //Get a connection - derbyConnection = DriverManager.getConnection(databaseUrl); - log.info("The connection to database is successfully established!"); - } catch (Exception e) { - log.error("Error in creating the connection to derby: ", e); - if (auditLog != null) { - auditLog.logException(actionDescription, - DerbyViewConnectorAuditCode.CONNECTOR_SERVER_CONNECTION_ERROR.getMessageDefinition(databaseName, - serverAddress, - driverClass), - databaseUrl, - e); - } - } - } - - - private LogicTable getMatchingTables(String gaianNodeName, List tables) { - log.debug("gaianNodeName: {}", gaianNodeName); - log.debug("tables to match in gaian: {}", tables); - List logicTableList = getAllLogicTables(); - - if (logicTableList != null && !logicTableList.isEmpty()) { - return logicTableList.stream().filter(e -> (e.getNodeName().equals(gaianNodeName) && tables.contains(e.getLogicalTableName()))).findFirst().orElse(null); - } - return null; - } - - - private LogicTable extractLogicTableDefinition(ResultSet sqlResults) throws SQLException { - LogicTable logicTable = new LogicTable(); - Map defLists = new HashMap<>(); - logicTable.setNodeName(sqlResults.getString(gdbNode)); - logicTable.setLogicalTableName(sqlResults.getString(logicTableName)); - String def = sqlResults.getString(logicTableDefinition); - String[] defs = def.split(", ");//here we need to split with ,+space, it is showed in Gaian LTDEF - for (String column : defs) { - String[] temp = column.split(" "); - defLists.put(temp[0], temp[1]); - } - logicTable.setLogicalTableDefinition(defLists); - return logicTable; - } - - - private Map createTableDefinitions(TableContextEvent tableContextEvent, String gaianNodeName, String technicalTableName, String businessTableName, String logicalTableName, List mappedColumns){ - String methodName = "createTableDefinitions"; - Map createdTables = new HashMap<>(); - LogicTable backendTable = getMatchingTables(gaianNodeName, Collections.singletonList(logicalTableName)); - if (backendTable != null) { - if (!backendTable.getNodeName().equals(gaianFrontendName)) { - createMirroringLogicalTable(logicalTableName, gaianNodeName); - } - ConnectorUtils.updateColumnDataType(mappedColumns, backendTable); - - String updatedTable = createTableDefinition(tableContextEvent.getTableSource().getDatabaseSource().getName(), businessTableName, (c -> c.getBusinessName()), mappedColumns, gaianNodeName, logicalTableName); - if (updatedTable != null) { - createdTables.put(ConnectorUtils.BUSINESS_PREFIX, updatedTable); - } - - updatedTable = createTableDefinition(tableContextEvent.getTableSource().getDatabaseSource().getName(), technicalTableName, (c -> c.getTechnicalName()), mappedColumns, gaianNodeName, logicalTableName); - if (updatedTable != null) { - createdTables.put(ConnectorUtils.TECHNICAL_PREFIX, updatedTable); - } - - if (!backendTable.getNodeName().equals(gaianFrontendName)) { - log.info("Remove mirrored logical table: {}", logicalTableName); - deleteLogicalTable(logicalTableName); - } - return createdTables; - } else { - log.error("error"); - return null; - } - } - - - /** - * Set Logical Table mirroring the definition for the given Logical Table Name on another GaianDB node, so its data can be queried remotely. - * - * @param logicalTableName string name - * @param gaianNodeName string name - */ - private void createMirroringLogicalTable(String logicalTableName, String gaianNodeName) { - log.debug("Set up Logical Table {} for Gaian node {}", logicalTableName, gaianNodeName); - String setLogicalTableForNode = "call setltfornode('" + - logicalTableName + "','" + - gaianNodeName + "')"; - - executeCustomizedUpdate(setLogicalTableForNode); - } - - private String createTableDefinition(String databaseName, String tableName, Function function, List mappedColumns, String gaianNodeName, String logicalTableName) { - String businessTableCreateStatement = buildTableCreateStatement(tableName, mappedColumns, function); - String setBusinessTableDataSource = buildCreateTableDataSourceStatement(databaseName, tableName, gaianNodeName, mappedColumns, logicalTableName); - - boolean queryStatus = executeCustomizedUpdate(businessTableCreateStatement); - if (queryStatus){ - queryStatus = executeCustomizedUpdate(setBusinessTableDataSource); - } - - if (queryStatus) { - log.debug("Successfully created table {}", tableName); - return tableName; - } else { - log.error("Failed to create table {}", tableName); - } - return null; - } - - /** - * - * @param tableName name of the table to be created - * @param mappedColumns columns to be added to table definition - * @param function to retrieve the value to be used as column name; it is either technical or business name - * @return - */ - private String buildTableCreateStatement(String tableName, List mappedColumns, Function function) { - StringBuilder statement = new StringBuilder("call setlt('" + - tableName + - "','"); - for (MappedColumn mappedColumn : mappedColumns) { - statement.append(function.apply(mappedColumn)).append(" ").append(mappedColumn.getType()).append(","); - } - statement = new StringBuilder(statement.substring(0, (statement.length() - 1))); - statement.append("','')"); - return statement.toString(); - } - - - private String buildCreateTableDataSourceStatement(String databaseName, String tableName, String gaianNodeName, List mappedColumns, String logicalTableName) { - String connectionName = gaianNodeName.toUpperCase(); - String statementForCreatingDataSource = "call setdsrdbtable('" + - tableName + - "', '', '" + - connectionName + - "', '" + - logicalTableName + - "','', '"; - - for (MappedColumn mappedColumn : mappedColumns) { - statementForCreatingDataSource += mappedColumn.getTechnicalName() + ","; - } - statementForCreatingDataSource = statementForCreatingDataSource.substring(0, (statementForCreatingDataSource.length() - 1)); - statementForCreatingDataSource += "')"; - return statementForCreatingDataSource; - } - - - /** - * Free up any resources held since the connector is no longer needed. - * - * @throws ConnectorCheckedException there is a problem within the connector. - */ - public void disconnect() throws ConnectorCheckedException - { - super.disconnect(); - - if (auditLog != null) - { - final String actionDescription = "Connector Disconnect"; - - auditLog.logMessage(actionDescription, - DerbyViewConnectorAuditCode.CONNECTOR_SHUTDOWN.getMessageDefinition(databaseName, serverAddress), - connectionProperties.toString()); - } - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnectorProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnectorProvider.java deleted file mode 100644 index 1484c721c3d..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/ViewGeneratorDerbyConnectorProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * This is the interface for the generic operations on data virtualization solutions - */ -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.viewgenerator.derby; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.ViewGeneratorConnectorProvider; - -public class ViewGeneratorDerbyConnectorProvider extends ViewGeneratorConnectorProvider { - private static final String connectorTypeGUID = "35657b2b-c472-494f-81c5-99f08bbf8a36"; - private static final String connectorTypeName = "Derby Database Connector"; - private static final String connectorTypeDescription = "Connector supports retrieving the data via derby connection."; - - public ViewGeneratorDerbyConnectorProvider(){ - Class connectorClass = ViewGeneratorDerbyConnector.class; - - super.setConnectorClassName(connectorClass.getName()); - - ConnectorType connectorType = new ConnectorType(); - connectorType.setType(ConnectorType.getConnectorTypeType()); - connectorType.setGUID(connectorTypeGUID); - connectorType.setQualifiedName(connectorTypeName); - connectorType.setDisplayName(connectorTypeName); - connectorType.setDescription(connectorTypeDescription); - connectorType.setConnectorProviderClassName(this.getClass().getName()); - - super.connectorTypeBean = connectorType; - } -} diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/auditlog/DerbyViewConnectorAuditCode.java b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/auditlog/DerbyViewConnectorAuditCode.java deleted file mode 100644 index 7bad7e67f78..00000000000 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors/src/main/java/org/odpi/openmetadata/openconnectors/governancedaemonconnectors/viewgenerator/derby/auditlog/DerbyViewConnectorAuditCode.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.openconnectors.governancedaemonconnectors.viewgenerator.derby.auditlog; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -/** - * This is the interface for the generic operations on data virtualization solutions - */ -public enum DerbyViewConnectorAuditCode implements AuditLogMessageSet -{ - CONNECTOR_INITIALIZING("DERBY-VIEW-CONNECTOR-0001", - OMRSAuditLogRecordSeverity.INFO, - "The connector is being initialized", - "The OMAG server has started up a new instance of the derby view generating connector.", - "Validate that this connector is running in a Virtualizer Server."), - CONNECTOR_INITIALIZED("DERBY-VIEW-CONNECTOR-0002", - OMRSAuditLogRecordSeverity.INFO, - "The derby view generating connector has initialized a new instance. It is connected to database {0} at {1}", - "The virtualizer server has completed initialization of a new instance of this connector.", - "Verify that the connector has started and it able to connect both to the metadata server/access point and the " + - "virtualization platform hosting the database where the views are to be configured."), - CONNECTOR_SHUTDOWN("DERBY-VIEW-CONNECTOR-0003", - OMRSAuditLogRecordSeverity.INFO, - "The derby view generating connector is shutting down its instance for database {0} at {1}", - "The local server has requested shut down of a derby view generating connector.", - "Verify that shutdown has been requested and that all of the resources this connector was using have been released."), - ENDPOINT_CONFIGURATION_ERROR("DERBY-VIEW-CONNECTOR-0004", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The connection for the derby view generating connector is not valid. The endpoint server address is {0} and the additional properties " + - "are {1}", - "The local server is unable to create an instance of the derby view generating connector because the " + - "endpoint of this connector's connection either is missing the address of the data virtualization platform" + - " or critical properties for the additional properties collection.", - "The missing values need to be added to the connection object for this connector. This is located in the " + - "configuration document for the virtualizer server"), - NO_ENDPOINT("DERBY-VIEW-CONNECTOR-0005", - OMRSAuditLogRecordSeverity.EXCEPTION, - "There is no endpoint linked to the connection object for this connector.", - "The local server is unable to initialize this connector because there is no endpoint. The endpoint is where critical" + - "properties about the data virtualization platform that it is configuring are located.", - "Reconfigure the connection object for this connector in the configuration document of the hosting " + - "Virtualizer Server to ensure it has the correct endpoint values."), - CONNECTION_CONFIGURATION_ERROR("DERBY-VIEW-CONNECTOR-0006.", - OMRSAuditLogRecordSeverity.EXCEPTION, - "There are no additional properties in the connection object for this connector", - "The local server is unable to initialize a derby view generating connector because the additional" + - " properties are not configured in the connection object for this connector. The connection object is " + - "located in the configuration document for the hosting Virtualizer Server.", - "Reconfigure this connector's connection object to include the additional properties it needs to create logical " + - "tables."), - CONNECTOR_SERVER_CONNECTION_ERROR("DERBY-VIEW-CONNECTOR-0007.", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Unable to connect to the data virtualization platform {0} at {1} using driver {2}.", - "The local server is unable to establish a connection to the data virtualization platform.", - "Validate/correct the database name, address and the driver being used."), - CONNECTOR_QUERY_ERROR("DERBY-VIEW-CONNECTOR-0008", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The logical table cannot be queried.", - "No query result will be provided.", - "Check if the query is valid."), - CONNECTOR_INBOUND_EVENT_ERROR("DERBY-VIEW-CONNECTOR-0009", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Provided inbound event is invalid.", - "No action on database will be executed.", - "Check if the event is valid."); - - - private AuditLogMessageDefinition messageDefinition; - - - /** - * The constructor for DerbyViewConnectorAuditCode expects to be passed one of the enumeration rows defined in - * DerbyViewConnectorAuditCode above. For example: - * - * DerbyViewConnectorAuditCode auditCode = DerbyViewConnectorAuditCode.SERVER_NOT_AVAILABLE; - * - * This will expand out to the 4 parameters shown below. - * - * @param messageId unique Id for the message - * @param severity severity of the message - * @param message text for the message - * @param systemAction description of the action taken by the system when the condition happened - * @param userAction instructions for resolving the situation, if any - */ - DerbyViewConnectorAuditCode(String messageId, - OMRSAuditLogRecordSeverity severity, - String message, - String systemAction, - String userAction) - { - messageDefinition = new AuditLogMessageDefinition(messageId, - severity, - message, - systemAction, - userAction); - } - - - /** - * Retrieve a message definition object for logging. This method is used when there are no message inserts. - * - * @return message definition object. - */ - @Override - public AuditLogMessageDefinition getMessageDefinition() - { - return messageDefinition; - } - - - /** - * Retrieve a message definition object for logging. This method is used when there are values to be inserted into the message. - * - * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text. - * @return message definition object. - */ - @Override - public AuditLogMessageDefinition getMessageDefinition(String ...params) - { - messageDefinition.setMessageParameters(params); - return messageDefinition; - } -} diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AdminServicesConfigHeader.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AdminServicesConfigHeader.java index 76269c1f631..5ad4f299acc 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AdminServicesConfigHeader.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AdminServicesConfigHeader.java @@ -35,9 +35,7 @@ @JsonSubTypes.Type(value = OpenLineageServerConfig.class, name = "OpenLineageConfig"), @JsonSubTypes.Type(value = RepositoryServicesConfig.class, name = "RepositoryServicesConfig"), @JsonSubTypes.Type(value = ResourceEndpointConfig.class, name = "ResourceEndpointConfig"), - @JsonSubTypes.Type(value = SecuritySyncConfig.class, name = "SecuritySyncConfig"), @JsonSubTypes.Type(value = StewardshipEngineServicesConfig.class, name = "StewardshipServicesConfig"), - @JsonSubTypes.Type(value = VirtualizationConfig.class, name = "VirtualizationConfig"), @JsonSubTypes.Type(value = DataEngineProxyConfig.class, name = "DataEngineProxyConfig"), @JsonSubTypes.Type(value = DataPlatformServicesConfig.class, name = "DataPlatformServicesConfig") }) diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java index 02529f7289b..6c7a3c94986 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java @@ -109,9 +109,7 @@ public class OMAGServerConfig extends AdminServicesConfigHeader private EngineHostServicesConfig engineHostServicesConfig = null; private OpenLineageServerConfig openLineageServerConfig = null; private StewardshipEngineServicesConfig stewardshipEngineServicesConfig = null; - private SecuritySyncConfig securitySyncConfig = null; private SecurityOfficerConfig securityOfficerConfig = null; - private VirtualizationConfig virtualizationConfig = null; private DataEngineProxyConfig dataEngineProxyConfig = null; private DataPlatformServicesConfig dataPlatformServicesConfig = null; private List auditTrail = null; @@ -158,9 +156,7 @@ public OMAGServerConfig(OMAGServerConfig template) dataEngineProxyConfig = template.getDataEngineProxyConfig(); discoveryEngineServicesConfig = template.getDiscoveryEngineServicesConfig(); stewardshipEngineServicesConfig = template.getStewardshipEngineServicesConfig(); - securitySyncConfig = template.getSecuritySyncConfig(); securityOfficerConfig = template.getSecurityOfficerConfig(); - virtualizationConfig = template.getVirtualizationConfig(); dataPlatformServicesConfig = template.getDataPlatformServicesConfig(); auditTrail = template.getAuditTrail(); } @@ -639,29 +635,6 @@ public void setStewardshipEngineServicesConfig(StewardshipEngineServicesConfig s } - /** - * Return the configuration for the security synchronization services. - * - * @return SecuritySyncConfig properties - */ - @Deprecated - public SecuritySyncConfig getSecuritySyncConfig() - { - return securitySyncConfig; - } - - - /** - * Set up the configuration for the security synchronization services. - * - * @param securitySyncConfig SecuritySyncConfig properties - */ - @Deprecated - public void setSecuritySyncConfig(SecuritySyncConfig securitySyncConfig) - { - this.securitySyncConfig = securitySyncConfig; - } - /** * Return the configuration for the security officer services. * @@ -684,28 +657,6 @@ public void setSecurityOfficerConfig(SecurityOfficerConfig securityOfficerConfig this.securityOfficerConfig = securityOfficerConfig; } - /** - * Return the configuration for the virtualization services. - * - * @return VirtualizationConfig properties - */ - @Deprecated - public VirtualizationConfig getVirtualizationConfig() - { - return virtualizationConfig; - } - - /** - * Set up the configuration for the virtualization services. - * - * @param virtualizationConfig properties - */ - @Deprecated - public void setVirtualizationConfig(VirtualizationConfig virtualizationConfig) - { - this.virtualizationConfig = virtualizationConfig; - } - /** * Return the configuration for the data platform services. * @@ -780,9 +731,7 @@ public String toString() ", discoveryEngineServicesConfig=" + discoveryEngineServicesConfig + ", openLineageServerConfig=" + openLineageServerConfig + ", stewardshipEngineServicesConfig=" + stewardshipEngineServicesConfig + - ", securitySyncConfig=" + securitySyncConfig + ", securityOfficerConfig=" + securityOfficerConfig + - ", virtualizationConfig=" + virtualizationConfig + ", dataEngineProxyConfig=" + dataEngineProxyConfig + ", dataPlatformServicesConfig=" + dataPlatformServicesConfig + ", auditTrail=" + auditTrail + @@ -828,9 +777,7 @@ public boolean equals(Object objectToCompare) Objects.equals(getDiscoveryEngineServicesConfig(), that.getDiscoveryEngineServicesConfig()) && Objects.equals(getOpenLineageServerConfig(), that.getOpenLineageServerConfig()) && Objects.equals(getStewardshipEngineServicesConfig(), that.getStewardshipEngineServicesConfig()) && - Objects.equals(getSecuritySyncConfig(), that.getSecuritySyncConfig()) && Objects.equals(getSecurityOfficerConfig(), that.getSecurityOfficerConfig()) && - Objects.equals(getVirtualizationConfig(), that.getVirtualizationConfig()) && Objects.equals(getDataEngineProxyConfig(), that.getDataEngineProxyConfig()) && Objects.equals(getDataPlatformServicesConfig(), that.getDataPlatformServicesConfig()) && Objects.equals(getAuditTrail(), that.getAuditTrail()); @@ -851,7 +798,7 @@ public int hashCode() getAccessServicesConfig(), getIntegrationServicesConfig(), getEngineHostServicesConfig(), getViewServicesConfig(), getRepositoryServicesConfig(), getConformanceSuiteConfig(), getDiscoveryEngineServicesConfig(), getOpenLineageServerConfig(), - getStewardshipEngineServicesConfig(), getSecuritySyncConfig(), getSecurityOfficerConfig(), getVirtualizationConfig(), + getStewardshipEngineServicesConfig(), getSecurityOfficerConfig(), getDataEngineProxyConfig(), getDataPlatformServicesConfig(), getAuditTrail()); } } diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/SecuritySyncConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/SecuritySyncConfig.java deleted file mode 100644 index 20fc8709c46..00000000000 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/SecuritySyncConfig.java +++ /dev/null @@ -1,397 +0,0 @@ -/* SPDX-License-Identifier: Apache 2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adminservices.configuration.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SecuritySyncConfig provides the properties for the deprecated security-sync-services. This function - * is replaced by the Security Integrator OMIS that runs in the Integration Daemon OMAG Server. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SecuritySyncConfig extends AdminServicesConfigHeader -{ - private static final long serialVersionUID = 1L; - - private String accessServiceRootURL; - private String accessServiceServerName; - - private String securityServerURL; - private String securitySyncServerType; - private String securitySyncServerAuthorization; - private String securitySyncTagServiceName; - private String securitySyncAccessResourceServiceName; - private Long pollingInterval; - private Connection securitySyncServerConnection; - - private String securitySyncInTopicName; - private Connection securitySyncInTopic; - private String securitySyncOutTopicName; - private Connection securitySyncOutTopic; - - /** - * Default constructor - */ - public SecuritySyncConfig() { - super(); - } - - - /** - * Set up the default values for security sync - * - * @param template fixed properties about security sync - */ - public SecuritySyncConfig(SecuritySyncConfig template) { - super(template); - - if (template != null) { - accessServiceRootURL = template.accessServiceRootURL; - accessServiceServerName = template.accessServiceServerName; - - securityServerURL = template.securityServerURL; - securitySyncServerType = template.securitySyncServerType; - securitySyncServerAuthorization = template.securitySyncServerAuthorization; - securitySyncTagServiceName = template.securitySyncTagServiceName; - securitySyncAccessResourceServiceName = template.securitySyncAccessResourceServiceName; - pollingInterval = template.pollingInterval; - securitySyncServerConnection = template.securitySyncServerConnection; - - securitySyncInTopic = template.securitySyncInTopic; - securitySyncInTopicName = template.securitySyncInTopicName; - securitySyncOutTopic = template.securitySyncOutTopic; - securitySyncOutTopicName = template.securitySyncOutTopicName; - } - } - - /** - * Return the URL for the Security Server used in the Governance Server Connector - * - * @return String URL - */ - public String getSecurityServerURL() { - return securityServerURL; - } - - - /** - * Set up the URL for the Security Server used in the Governance Server Connector. - * - * @param securityServerURL String for Governance Server URL - */ - public void setSecurityServerURL(String securityServerURL) { - this.securityServerURL = securityServerURL; - } - - - /** - * Return the URL for the Governance Engine Server used in the Governance Server Connector - * - * @return String URL - */ - public String getAccessServiceRootURL() { - return accessServiceRootURL; - } - - - /** - * Set up the URL for the Governance Engine Server used in the Governance Server Connector. - * - * @param accessServiceRootURL String for Governance Server URL - */ - public void setAccessServiceRootURL(String accessServiceRootURL) { - this.accessServiceRootURL = accessServiceRootURL; - } - - - /** - * Return the name of the server where Governance Engine OMAS is running - * - * @return string name - */ - public String getAccessServiceServerName() { - return accessServiceServerName; - } - - /** - * Set up the name of the server where Governance Engine OMAS is running - * - * @param accessServiceServerName string name - */ - public void setAccessServiceServerName(String accessServiceServerName) { - this.accessServiceServerName = accessServiceServerName; - } - - /** - * Return the server type in order to identify the Governance Connector. - * - * @return String Server type - */ - public String getSecuritySyncServerType() { - return securitySyncServerType; - } - - - /** - * Set up the server type in order to identify the Governance Connector. - * - * @param securitySyncServerType String - */ - public void setSecuritySyncServerType(String securitySyncServerType) { - this.securitySyncServerType = securitySyncServerType; - } - - - /** - * Return the authorization needed in the Governance Services Connector - * - * @return String with basic authorization header - */ - public String getSecuritySyncServerAuthorization() { - return securitySyncServerAuthorization; - } - - - /** - * Set up the authorization needed in the Governance Services Connector. - * - * @param securitySyncServerAuthorization String with basic authorization header - */ - public void setSecuritySyncServerAuthorization(String securitySyncServerAuthorization) { - this.securitySyncServerAuthorization = securitySyncServerAuthorization; - } - - /** - * Return the Tag Service Named used in the Governance Services Connector to synchronize the governed classifications. - * - * @return String tag service name - */ - public String getSecuritySyncTagServiceName() { - return securitySyncTagServiceName; - } - - - /** - * Set up the Tag Service Named used in the Governance Services Connector to synchronize the governed classifications. - * - * @param securitySyncTagServiceName the name of the tag service - */ - public void setSecuritySyncTagServiceName(String securitySyncTagServiceName) { - this.securitySyncTagServiceName = securitySyncTagServiceName; - } - - /** - * Return the Access Resource Service Named used in the Governance Services Connector to synchronize the access resource policies. - * - * @return Resource access based policies - */ - public String getSecuritySyncAccessResourceServiceName() { - return securitySyncAccessResourceServiceName; - } - - /** - * Set up the Access Resource Service Named used in the Governance Services Connector to synchronize the access resource policies. - * - * @param securitySyncAccessResourceServiceName string name - */ - public void setSecuritySyncAccessResourceServiceName(String securitySyncAccessResourceServiceName) { - this.securitySyncAccessResourceServiceName = securitySyncAccessResourceServiceName; - } - - /** - * @return the polling interval in milli seconds - */ - public Long getPollingInterval() { - return pollingInterval; - } - - /** - * Set up the polling interval in milli seconds - * - * @param pollingInterval polling interval in milli seconds - */ - public void setPollingInterval(Long pollingInterval) { - this.pollingInterval = pollingInterval; - } - - /** - * Return the Input Topic Name for Security Sync - * - * @return String Input Topic name - */ - public String getSecuritySyncInTopicName() { - return securitySyncInTopicName; - } - - - /** - * Set up the Security Sync In Topic Name - * - * @param securitySyncInTopicName String Security Sync Name - */ - public void setSecuritySyncInTopicName(String securitySyncInTopicName) { - this.securitySyncInTopicName = securitySyncInTopicName; - } - - - /** - * Return the OCF Connection for the In Topic used to pass requests to this Security Sync. - * For example, the output topic of Governance Engine OMAS can be provided - * (e.g. "omas.accessservices.governanceengine.outTopic") - * - * @return Connection for In Topic - */ - public Connection getSecuritySyncInTopic() { - return securitySyncInTopic; - } - - - /** - * Set up the OCF Connection for the Out Topic used to pass requests to this Security Sync. - * - * @param securitySyncInTopic Connection for In Topic - */ - public void setSecuritySyncInTopic(Connection securitySyncInTopic) { - this.securitySyncInTopic = securitySyncInTopic; - } - - - /** - * Return the Security Sync Out Topic Name - * - * @return String security out topic name - */ - public String getSecuritySyncOutTopicName() { - return securitySyncOutTopicName; - } - - /** - * Set up the Security Sync Out Name - * - * @param securitySyncOutTopicName String Security Out Topic Name - */ - public void setSecuritySyncOutTopicName(String securitySyncOutTopicName) { - this.securitySyncOutTopicName = securitySyncOutTopicName; - } - - /** - * Return the OCF Connection for the topic used to pass requests to Security Sync. - * The default values are constructed from the Security Sync Server Name. - * - * @return Connection for Out Topic - */ - public Connection getSecuritySyncOutTopic() { - return securitySyncOutTopic; - } - - - /** - * Set up the OCF Connection for the Out Topic used to pass requests to this Security Sync. - * - * @param securitySyncOutTopic Connection for Out Topic - */ - public void setSecuritySyncOutTopic(Connection securitySyncOutTopic) { - this.securitySyncOutTopic = securitySyncOutTopic; - } - - - /** - * Return the OCF Connection for the Security Server used to push the Security Tags. - * - * @return Connection for Security Server - */ - public Connection getSecuritySyncServerConnection() { - return securitySyncServerConnection; - } - - /** - * Set up the OCF Connection for the Security Server used to pass requests to this Security Sync. - * - * @param securitySyncServerConnection Connection for Security Server - */ - public void setSecuritySyncServerConnection(Connection securitySyncServerConnection) { - this.securitySyncServerConnection = securitySyncServerConnection; - } - - - @Override - public String toString() { - return "SecuritySyncConfig{" + - " securityServerURL='" + securityServerURL + '\'' + - ", accessServiceRootURL='" + accessServiceRootURL + '\'' + - ", accessServiceServerName='" + accessServiceServerName + '\'' + - ", securitySyncServerType='" + securitySyncServerType + '\'' + - ", securitySyncServerAuthorization='" + securitySyncServerAuthorization + '\'' + - ", securitySyncTagServiceName='" + securitySyncTagServiceName + '\'' + - ", securitySyncAccessResourceServiceName='" + securitySyncAccessResourceServiceName + '\'' + - ", pollingInterval='" + pollingInterval + '\'' + - ", securitySyncInTopicName='" + securitySyncInTopicName + '\'' + - ", securitySyncInTopic=" + securitySyncInTopic + - ", securitySyncOutTopicName='" + securitySyncOutTopicName + '\'' + - ", securitySyncOutTopic=" + securitySyncOutTopic + - ", securitySyncServerConnection=" + securitySyncServerConnection + - '}'; - } - - /** - * Validate that an object is equal depending on their stored values. - * - * @param objectToCompare object - * @return boolean result - */ - @Override - public boolean equals(Object objectToCompare) { - if (this == objectToCompare) { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) { - return false; - } - SecuritySyncConfig that = (SecuritySyncConfig) objectToCompare; - return Objects.equals(getSecurityServerURL(), that.getSecurityServerURL()) && - Objects.equals(getAccessServiceRootURL(), that.getAccessServiceRootURL()) && - Objects.equals(getAccessServiceServerName(), that.getAccessServiceServerName()) && - Objects.equals(getSecuritySyncServerAuthorization(), that.getSecuritySyncServerAuthorization()) && - Objects.equals(getSecuritySyncTagServiceName(), that.getSecuritySyncTagServiceName()) && - Objects.equals(getSecuritySyncAccessResourceServiceName(), that.getSecuritySyncAccessResourceServiceName()) && - Objects.equals(getPollingInterval(), that.getPollingInterval()) && - Objects.equals(getSecuritySyncInTopic(), that.getSecuritySyncInTopic()) && - Objects.equals(getSecuritySyncOutTopic(), that.getSecuritySyncOutTopic()) && - Objects.equals(getSecuritySyncInTopicName(), that.getSecuritySyncInTopicName()) && - Objects.equals(getSecuritySyncServerConnection(), that.getSecuritySyncServerConnection()) && - Objects.equals(getSecuritySyncOutTopicName(), that.getSecuritySyncOutTopicName()); - } - - /** - * Return a hash code based on the values of this object. - * - * @return in hash code - */ - @Override - public int hashCode() { - return Objects.hash( - getSecurityServerURL(), - getAccessServiceRootURL(), - getAccessServiceServerName(), - getSecuritySyncServerAuthorization(), - getSecuritySyncTagServiceName(), - getSecuritySyncAccessResourceServiceName(), - getPollingInterval(), - getSecuritySyncInTopic(), - getSecuritySyncOutTopic(), - getSecuritySyncInTopicName(), - getSecuritySyncOutTopicName(), - getSecuritySyncServerConnection()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/VirtualizationConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/VirtualizationConfig.java deleted file mode 100644 index 40f3f58618e..00000000000 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/VirtualizationConfig.java +++ /dev/null @@ -1,200 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adminservices.configuration.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * VirtualizationConfig is the configuration for the deprecated Virtualizer OMAG Server. This function - * is replaced by the new Database Integrator OMIS that runs in the Integration Daemon OMAG Server. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class VirtualizationConfig extends AdminServicesConfigHeader -{ - private static final long serialVersionUID = 1L; - - private String virtualizationProvider; - private String virtualizerOutboundTopicName; - private Connection virtualizerOutboundTopic; - private String virtualizerInboundTopicName; - private Connection virtualizerInboundTopic; - private Connection virtualizationSolutionConnection; - private Map virtualizationSolutionConfig; - - - /** - * Default constructor - */ - public VirtualizationConfig() { - super(); - } - - /** - * Copy data from template - * - * @param template object to copy - */ - public VirtualizationConfig(VirtualizationConfig template) { - super(template); - if (template != null) { - this.virtualizationProvider = template.virtualizationProvider; - this.virtualizerOutboundTopicName = template.virtualizerOutboundTopicName; - this.virtualizerOutboundTopic = template.virtualizerOutboundTopic; - this.virtualizerInboundTopicName = template.virtualizerInboundTopicName; - this.virtualizerInboundTopic = template.virtualizerInboundTopic; - this.virtualizationSolutionConnection = template.virtualizationSolutionConnection; - this.virtualizationSolutionConfig = template.virtualizationSolutionConfig; - } - } - - - /** - * Provide the name of virtualization provider - * @return String virtualizationProvider - */ - public String getVirtualizationProvider() { - return virtualizationProvider; - } - - /** - * Set the name of virtualization provider - * @param virtualizationProvider connector provider - */ - public void setVirtualizationProvider(String virtualizationProvider) { - this.virtualizationProvider = virtualizationProvider; - } - - /** - * Provide the name of the information view in topic - * @return String virtualizerOutboundTopicName - */ - public String getVirtualizerOutboundTopicName() { - return virtualizerOutboundTopicName; - } - - - /** - * Set the name of the information view in topic - * @param virtualizerOutboundTopicName String - */ - public void setVirtualizerOutboundTopicName(String virtualizerOutboundTopicName) { - this.virtualizerOutboundTopicName = virtualizerOutboundTopicName; - } - - /** - * Provide the connection of the information view in topic - * @return Connection virtualizerOutboundTopic - */ - public Connection getVirtualizerOutboundTopic() { - return virtualizerOutboundTopic; - } - - /** - * Set the connection of the information view in topic - * @param virtualizerOutboundTopic Connection - */ - public void setVirtualizerOutboundTopic(Connection virtualizerOutboundTopic) { - this.virtualizerOutboundTopic = virtualizerOutboundTopic; - } - - /** - * Provide the name of the information view out topic - * @return String virtualizerInboundTopicName - */ - public String getVirtualizerInboundTopicName() { - return virtualizerInboundTopicName; - } - - - /** - * Set the name of the information view out topic - * @param virtualizerInboundTopicName String - */ - public void setVirtualizerInboundTopicName(String virtualizerInboundTopicName) { - this.virtualizerInboundTopicName = virtualizerInboundTopicName; - } - - /** - * Provide the connection of the information view out topic - * @return Connection virtualizerInboundTopic - */ - public Connection getVirtualizerInboundTopic() { - return virtualizerInboundTopic; - } - - /** - * Set the connection of the information view out topic - * @param virtualizerInboundTopic Connection - */ - public void setVirtualizerInboundTopic(Connection virtualizerInboundTopic) { - this.virtualizerInboundTopic = virtualizerInboundTopic; - } - - /** - * Provide the connection of the virtualization solution - * @return Connection virtualizationSolutionConnection - */ - public Connection getVirtualizationSolutionConnection() { - return virtualizationSolutionConnection; - } - - /** - * Set the connection of the information view out topic - * @param virtualizationSolutionConnection Connection - */ - public void setVirtualizationSolutionConnection(Connection virtualizationSolutionConnection) { - this.virtualizationSolutionConnection = virtualizationSolutionConnection; - } - - /** - * Provide the connection of the virtualization configuration - * @return virtualizationSolutionConfig - */ - public Map getVirtualizationSolutionConfig() { - return virtualizationSolutionConfig; - } - - /** - * Set the connection of the virtualization configuration - * @param virtualizationSolutionConfig Config - */ - public void setVirtualizationSolutionConfig(Map virtualizationSolutionConfig) { - this.virtualizationSolutionConfig = virtualizationSolutionConfig; - } - - @Override - public String toString() - { - return "VirtualizationConfig{" + "virtualizationProvider='" + virtualizationProvider + '\'' + ", virtualizerOutboundTopicName='" + virtualizerOutboundTopicName + '\'' + ", virtualizerOutboundTopic=" + virtualizerOutboundTopic + ", virtualizerInboundTopicName='" + virtualizerInboundTopicName + '\'' + ", virtualizerInboundTopic=" + virtualizerInboundTopic + ", virtualizationSolutionConnection=" + virtualizationSolutionConnection + ", virtualizationSolutionConfig=" + virtualizationSolutionConfig + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof VirtualizationConfig)) return false; - VirtualizationConfig that = (VirtualizationConfig) o; - return Objects.equals(getVirtualizationProvider(), that.getVirtualizationProvider()) && - Objects.equals(getVirtualizerOutboundTopicName(), that.getVirtualizerOutboundTopicName()) && - Objects.equals(getVirtualizerOutboundTopic(), that.getVirtualizerOutboundTopic()) && - Objects.equals(getVirtualizerInboundTopicName(), that.getVirtualizerInboundTopicName()) && - Objects.equals(getVirtualizerInboundTopic(), that.getVirtualizerInboundTopic()) && - Objects.equals(getVirtualizationSolutionConnection(), that.getVirtualizationSolutionConnection()) && - Objects.equals(getVirtualizationSolutionConfig(), that.getVirtualizationSolutionConfig()); - } - - @Override - public int hashCode() { - return Objects.hash(getVirtualizationProvider(), getVirtualizerOutboundTopicName(), getVirtualizerOutboundTopic(), getVirtualizerInboundTopicName(), getVirtualizerInboundTopic(), getVirtualizationSolutionConnection(), getVirtualizationSolutionConfig()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java index 297045da7c2..e39eb6db6e9 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java @@ -141,12 +141,6 @@ public enum AccessServiceDescription implements Serializable "governance-program", "Manage the governance program", "https://egeria.odpi.org/open-metadata-implementation/access-services/governance-program/"), - INFORMATION_VIEW_OMAS (1014, - "Information View", - "Information View OMAS", - "information-view", - "Support information virtualization and data set definitions", - "https://egeria.odpi.org/open-metadata-implementation/access-services/information-view/"), PROJECT_MANAGEMENT_OMAS (1017, "Project Management", "Project Management OMAS", diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/GovernanceServicesDescription.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/GovernanceServicesDescription.java index 4659f6a62b4..e70f7e463ef 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/GovernanceServicesDescription.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/GovernanceServicesDescription.java @@ -23,11 +23,6 @@ public enum GovernanceServicesDescription implements Serializable "open-lineage", "Store and query asset lineage", "https://egeria.odpi.org/open-metadata-implementation/governance-servers/open-lineage-services/"), - VIRTUALIZATION_SERVICES (2004, - "Virtualization Services", - null, - "Run virtualization services", - "https://egeria.odpi.org/open-metadata-implementation/governance-servers/virtualization-services/"), CONFORMANCE_SUITE_SERVICES (2005, "Conformance Suite Services", "conformance-suite", diff --git a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java index 1677b869a4c..eda14908039 100644 --- a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java +++ b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java @@ -434,14 +434,6 @@ private void validateConfigurationDocumentNotNull(String serverName, methodName); } - if (configurationDocument.getSecuritySyncConfig() != null) - { - throw new OMAGInvalidParameterException(OMAGAdminErrorCode.OLD_CONFIGURATION.getMessageDefinition(serverName, - configurationDocument.getSecuritySyncConfig().toString()), - this.getClass().getName(), - methodName); - } - if (configurationDocument.getStewardshipEngineServicesConfig() != null) { throw new OMAGInvalidParameterException(OMAGAdminErrorCode.OLD_CONFIGURATION.getMessageDefinition(serverName, @@ -449,14 +441,6 @@ private void validateConfigurationDocumentNotNull(String serverName, this.getClass().getName(), methodName); } - - if (configurationDocument.getVirtualizationConfig() != null) - { - throw new OMAGInvalidParameterException(OMAGAdminErrorCode.OLD_CONFIGURATION.getMessageDefinition(serverName, - configurationDocument.getVirtualizationConfig().toString()), - this.getClass().getName(), - methodName); - } } diff --git a/open-metadata-implementation/admin-services/docs/user/configuring-the-access-services.md b/open-metadata-implementation/admin-services/docs/user/configuring-the-access-services.md index f39b8451e92..b7f7ce4fa0b 100644 --- a/open-metadata-implementation/admin-services/docs/user/configuring-the-access-services.md +++ b/open-metadata-implementation/admin-services/docs/user/configuring-the-access-services.md @@ -144,12 +144,6 @@ The result looks something like this: "serviceDescription": "Set up an operational governance engine", "serviceWiki": "https://egeria.odpi.org/open-metadata-implementation/access-services/governance-engine/" }, - { - "serviceName": "Information View", - "serviceURLMarker": "information-view", - "serviceDescription": "Support information virtualization and data set definitions", - "serviceWiki": "https://egeria.odpi.org/open-metadata-implementation/access-services/information-view/" - }, { "serviceName": "Digital Architecture", "serviceURLMarker": "digital-architecture", diff --git a/open-metadata-implementation/governance-servers/docs/README.md b/open-metadata-implementation/governance-servers/docs/README.md index b3f0cd4ab62..f537ba4aa29 100644 --- a/open-metadata-implementation/governance-servers/docs/README.md +++ b/open-metadata-implementation/governance-servers/docs/README.md @@ -21,7 +21,6 @@ entirely by changes in metadata and the IT landscape. | Open Lineage Server | Provides a historic reporting warehouse for lineage. | [Open Lineage Services](../open-lineage-services) | [Asset Lineage OMAS](../../access-services/asset-lineage) | No | | Security Officer Server | Provide operational support for the security policies defined by the security officer. | [Security Officer Services](../security-officer-services) | [Security Officer OMAS](../../access-services/security-officer) | No | | Security Synchronization Server | Keep security enforcement engines supplied with the latest metadata. | [Security Sync Services](../security-sync-services) | [Governance Engine OMAS](../../access-services/governance-engine) | Yes | -| Virtualizer | Automatically configure a data virtualization platform based on available data sources. | [Virtualization Services](../virtualization-services) | [Information View OMAS](../../access-services/information-view) | Yes | ## Further information diff --git a/open-metadata-implementation/governance-servers/pom.xml b/open-metadata-implementation/governance-servers/pom.xml index 2dce2e0bfcd..f7d11455319 100644 --- a/open-metadata-implementation/governance-servers/pom.xml +++ b/open-metadata-implementation/governance-servers/pom.xml @@ -36,7 +36,6 @@ open-lineage-services data-engine-proxy-services data-platform-services - virtualization-services diff --git a/open-metadata-implementation/governance-servers/security-officer-services/README.md b/open-metadata-implementation/governance-servers/security-officer-services/README.md deleted file mode 100644 index 42b00670cc0..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -![Deprecated](../../../open-metadata-publication/website/images/egeria-content-status-deprecated.png#pagewidth) - -# Security Officer Services - -The security officer services provide operational support for the -the security policies defined by the security officer. - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-officer-services/pom.xml b/open-metadata-implementation/governance-servers/security-officer-services/pom.xml deleted file mode 100644 index 9924ef3c654..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - governance-servers - org.odpi.egeria - 2.11-SNAPSHOT - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Security Officer Services - Security Officer Server manages security tags and other operational security settings - - security-officer-services - pom - - - security-officer-services-server - - - - diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/build.gradle b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/build.gradle deleted file mode 100644 index 479cc334cc7..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'org.springframework:spring-web' - implementation 'com.fasterxml.jackson.core:jackson-core' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:access-services:security-officer:security-officer-api') - implementation project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-officer-connectors:security-officer-tag-connector') -} - -description = 'Security Officer Service Server-Side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/pom.xml b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/pom.xml deleted file mode 100644 index 3b0634fc84a..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - security-officer-services - org.odpi.egeria - 2.11-SNAPSHOT - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Security Officer Service Server-Side - Server side implementation of the Security Officer Services. - - security-officer-services-server - - - - org.springframework - spring-web - - - - com.fasterxml.jackson.core - jackson-core - - - - org.odpi.egeria - audit-log-framework - - - - org.odpi.egeria - open-connector-framework - - - - com.fasterxml.jackson.core - jackson-databind - - - - org.slf4j - slf4j-api - - - - org.odpi.egeria - repository-services-apis - - - - org.odpi.egeria - admin-services-api - compile - - - - org.odpi.egeria - security-officer-api - - - - org.odpi.egeria - security-officer-tag-connector - - - - - diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/auditlog/SecurityOfficerAuditCode.java b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/auditlog/SecurityOfficerAuditCode.java deleted file mode 100644 index 1f2014fee46..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/auditlog/SecurityOfficerAuditCode.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -package org.odpi.openmetadata.securityofficerservices.auditlog; - -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -import java.text.MessageFormat; - -public enum SecurityOfficerAuditCode { - - SERVICE_INITIALIZING("SECURITY-OFFICER-SERVER-0001", - OMRSAuditLogRecordSeverity.INFO, - "The Security Officer Server is initializing a new server instance", - "The local server has started up a new instance of the Security Officer Server.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_INITIALIZED("SECURITY-OFFICER-SERVER-0002", - OMRSAuditLogRecordSeverity.INFO, - "The Security Officer Server has initialized a new instance for server {0}", - "The Security Officer Server has completed initialization of a new instance.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_SHUTDOWN("SECURITY-OFFICER-SERVER-0003", - OMRSAuditLogRecordSeverity.INFO, - "The Security Officer Server is shutting down its instance for server {0}", - "The local server has requested shut down of a Security Officer Server instance.", - "No action is required. This is part of the normal operation of the service."), - ERROR_INITIALIZING_SECURITY_OFFICER_SERVER_TOPIC_CONNECTION("SECURITY-OFFICER-SERVER-0004", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Security Officer Server is unable to initialize the connection to topic {0} in the instance for server {1} ", - "The connection to topic could not be initialized.", - "Review the exception and resolve the configuration."); - - private String logMessageId; - private OMRSAuditLogRecordSeverity severity; - private String logMessage; - private String systemAction; - private String userAction; - - - /** - * The constructor for OMRSAuditCode expects to be passed one of the enumeration rows defined in - * OMRSAuditCode above. For example: - *

- * OMRSAuditCode auditCode = OMRSAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 4 parameters shown below. - * - * @param messageId - unique Id for the message - * @param message - text for the message - * @param severity - the severity of the message - * @param systemAction - description of the action taken by the system when the condition happened - * @param userAction - instructions for resolving the situation, if any - */ - SecurityOfficerAuditCode(String messageId, OMRSAuditLogRecordSeverity severity, String message, String systemAction, String userAction) { - this.logMessageId = messageId; - this.severity = severity; - this.logMessage = message; - this.systemAction = systemAction; - this.userAction = userAction; - } - - /** - * Returns the unique identifier for the error message. - * - * @return logMessageId - */ - public String getLogMessageId() { - return logMessageId; - } - - /** - * Returns the log message with the placeholders filled out with the supplied parameters. - * - * @param params - strings that plug into the placeholders in the logMessage - * @return logMessage (formatted with supplied parameters) - */ - public String getFormattedLogMessage(String... params) { - MessageFormat mf = new MessageFormat(logMessage); - return mf.format(params); - } - - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction String - */ - public String getSystemAction() { - return systemAction; - } - - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction String - */ - public String getUserAction() { - return userAction; - } - - /** - * Return the severity of the audit log record. - * - * @return OMRSAuditLogRecordSeverity enum - */ - public OMRSAuditLogRecordSeverity getSeverity() { - return severity; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/ffdc/SecurityOfficerErrorCode.java b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/ffdc/SecurityOfficerErrorCode.java deleted file mode 100644 index 4d21f616161..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/ffdc/SecurityOfficerErrorCode.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.securityofficerservices.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The OMRSErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMRS - * It is used in conjunction with all OMRS Exceptions, both Checked and Runtime (unchecked). - * - * The 5 fields in the enum are: - *

    - *
  • HTTP Error Code for translating between REST and JAVA. Typically the numbers used are:
  • - *
    • - *
    • 500: internal error
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: to uniquely identify the message
  • - *
  • Error Message Text: includes placeholder to allow additional values to be captured
  • - *
  • SystemAction: describes the result of the error
  • - *
  • UserAction: describes how a user should correct the error
  • - *
- */ -public enum SecurityOfficerErrorCode implements ExceptionMessageSet -{ - - NULL_TOPIC_CONNECTOR(400, "SECURITY-OFFICER-400-001", - "Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize", - "The local server will not connect to the cohort.", - "The connection to the connector is configured in the server configuration. " + - "Review previous error messages to determine the precise error in the " + - "start up configuration. " + - "Correct the configuration and reconnect the server to the cohort. "), - - ; - - private ExceptionMessageDefinition messageDefinition; - - - /** - * The constructor for DiscoveryEngineServicesErrorCode expects to be passed one of the enumeration rows defined in - * DiscoveryEngineServicesErrorCode above. For example: - * - * DiscoveryEngineServicesErrorCode errorCode = DiscoveryEngineServicesErrorCode.UNKNOWN_ENDPOINT; - * - * This will expand out to the 5 parameters shown below. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique Id for the message - * @param errorMessage text for the message - * @param systemAction description of the action taken by the system when the error condition happened - * @param userAction instructions for resolving the error - */ - SecurityOfficerErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * Retrieve a message definition object for an exception. This method is used when there are no message inserts. - * - * @return message definition object. - */ - public ExceptionMessageDefinition getMessageDefinition() - { - return messageDefinition; - } - - - /** - * Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message. - * - * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text. - * @return message definition object. - */ - public ExceptionMessageDefinition getMessageDefinition(String... params) - { - messageDefinition.setMessageParameters(params); - - return messageDefinition; - } - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "OMRSErrorCode{" + - "messageDefinition=" + messageDefinition + - '}'; - } -} diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/listener/SecurityOfficerEventListener.java b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/listener/SecurityOfficerEventListener.java deleted file mode 100644 index 3e3df57c8f3..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/listener/SecurityOfficerEventListener.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -package org.odpi.openmetadata.securityofficerservices.listener; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.accessservices.securityofficer.api.events.SecurityOfficerEventType; -import org.odpi.openmetadata.accessservices.securityofficer.api.events.SecurityOfficerTagEvent; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener; -import org.odpi.openmetadata.securityofficerservices.processor.SecurityOfficerEventProcessor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SecurityOfficerEventListener implements OpenMetadataTopicListener { - - private static final Logger log = LoggerFactory.getLogger(SecurityOfficerEventListener.class); - private static ObjectMapper objectMapper = new ObjectMapper(); - private SecurityOfficerEventProcessor securityOfficerEventProcessor; - - public SecurityOfficerEventListener(SecurityOfficerEventProcessor securitySyncEventProcessor) { - this.securityOfficerEventProcessor = securitySyncEventProcessor; - } - - @Override - public void processEvent(String receivedEvent) { - log.info("[Security Officer Server] Event Received"); - - try { - SecurityOfficerTagEvent event = objectMapper.readValue(receivedEvent, SecurityOfficerTagEvent.class); - if (event.getEventType() == SecurityOfficerEventType.NEW_SECURITY_ASSIGNMENT || - event.getEventType() == SecurityOfficerEventType.UPDATED_SECURITY_ASSIGNMENT) { - securityOfficerEventProcessor.processNewAssignment(event.getSchemaElementEntity()); - } else if (event.getEventType() == SecurityOfficerEventType.DELETED_SECURITY_ASSIGNMENT) { - securityOfficerEventProcessor.processDeletedSecurityTag(event.getSchemaElementEntity()); - } else { - log.debug("Unknown event type"); - } - } catch (Exception e) { - log.debug("Security Sync Server is unable to process the event."); - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/processor/SecurityOfficerEventProcessor.java b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/processor/SecurityOfficerEventProcessor.java deleted file mode 100644 index 64494def473..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/processor/SecurityOfficerEventProcessor.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -package org.odpi.openmetadata.securityofficerservices.processor; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.SchemaElementEntity; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.SecurityClassification; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.rest.SecurityOfficerOMASAPIResponse; -import org.odpi.openmetadata.adminservices.configuration.properties.SecurityOfficerConfig; -import org.odpi.openmetadata.openconnector.governancedarmonconnectors.securityofficerconnectors.SecurityOfficerConnector; -import org.odpi.openmetadata.openconnector.governancedarmonconnectors.securityofficerconnectors.securitytagconnector.SecurityTagConnector; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RestTemplate; - -import java.text.MessageFormat; -import java.util.Collections; - -public class SecurityOfficerEventProcessor { - - private static final Logger log = LoggerFactory.getLogger(SecurityOfficerEventProcessor.class); - private static final String SECURITY_OFFICER_SERVER = "SecurityOfficerServer"; - private static final String SECURITY_OFFICER_OMAS_URL = "{0}/servers/{1}/open-metadata/access-services/security-officer/users/{2}/security-tag/element/{3}"; - - private OMRSAuditLog auditLog; - private SecurityOfficerConfig securitySyncConfig; - private SecurityOfficerConnector connector; - - public SecurityOfficerEventProcessor(SecurityOfficerConfig securityOfficerConfig, OMRSAuditLog auditLog) { - this.auditLog = auditLog; - this.securitySyncConfig = securityOfficerConfig; - connector = new SecurityTagConnector(); - } - - public void processNewAssignment(SchemaElementEntity schemaElementEntity) { - if (schemaElementEntity == null) { - return; - } - - SecurityClassification securityClassification = connector.resolveSecurityClassification(schemaElementEntity); - setSecurityTag(schemaElementEntity.getGuid(), securityClassification); - } - - public void processDeletedSecurityTag(SchemaElementEntity schemaElementEntity) { - if (schemaElementEntity == null) { - return; - } - - deleteSecurityTag(schemaElementEntity.getGuid()); - } - - private void deleteSecurityTag(String schemaElementGuid) { - String securityOMASURL = getSecurityOMASURL(schemaElementGuid); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(getBasicHTTPHeaders()); - - try { - restTemplate.exchange(securityOMASURL, HttpMethod.DELETE, entity, SchemaElementEntity.class); - } catch (HttpStatusCodeException exception) { - log.debug("Unable to delete the security tag for schema element {}", schemaElementGuid); - } - } - - private void setSecurityTag(String guid, SecurityClassification securityClassification) { - String securityOMASURL = getSecurityOMASURL(guid); - String securityClassificationBody = getBody(securityClassification); - - RestTemplate restTemplate = new RestTemplate(); - HttpEntity entity = new HttpEntity<>(securityClassificationBody, getBasicHTTPHeaders()); - - try { - ResponseEntity elementEntity = restTemplate.exchange(securityOMASURL, HttpMethod.POST, entity, SecurityOfficerOMASAPIResponse.class); - if (elementEntity.getBody() != null) { - log.debug("result of setting the security tag: {}", elementEntity.getBody()); - } - } catch (HttpStatusCodeException exception) { - log.debug("Unable to set/update the security tag for schema element {}", guid); - } - } - - private String getBody(Object resource) { - ObjectMapper objectMapper = new ObjectMapper(); - try { - return objectMapper.writeValueAsString(resource); - } catch (JsonProcessingException e) { - log.error("error write json "); - } - return null; - } - - private String getSecurityOMASURL(String guid) { - - return MessageFormat.format( - SECURITY_OFFICER_OMAS_URL, - securitySyncConfig.getAccessServiceRootURL(), - securitySyncConfig.getAccessServiceServerName(), - SECURITY_OFFICER_SERVER, - guid); - } - - private HttpHeaders getBasicHTTPHeaders() { - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); - headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); - return headers; - } - -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/registration/SecurityOfficerOperationalServices.java b/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/registration/SecurityOfficerOperationalServices.java deleted file mode 100644 index 58990797a9e..00000000000 --- a/open-metadata-implementation/governance-servers/security-officer-services/security-officer-services-server/src/main/java/org/odpi/openmetadata/securityofficerservices/registration/SecurityOfficerOperationalServices.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -package org.odpi.openmetadata.securityofficerservices.registration; - -import org.odpi.openmetadata.adminservices.configuration.properties.SecurityOfficerConfig; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSConfigErrorException; -import org.odpi.openmetadata.securityofficerservices.auditlog.SecurityOfficerAuditCode; -import org.odpi.openmetadata.securityofficerservices.ffdc.SecurityOfficerErrorCode; -import org.odpi.openmetadata.securityofficerservices.listener.SecurityOfficerEventListener; -import org.odpi.openmetadata.securityofficerservices.processor.SecurityOfficerEventProcessor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SecurityOfficerOperationalServices { - - private static final Logger log = LoggerFactory.getLogger(SecurityOfficerConfig.class); - private OpenMetadataTopicConnector inTopic; - private String localServerName; /* Initialized in constructor */ - private String localServerType; /* Initialized in constructor */ - private String localMetadataCollectionName; /* Initialized in constructor */ - private String localOrganizationName; /* Initialized in constructor */ - private String localServerUserId; /* Initialized in constructor */ - private String localServerURL; /* Initialized in constructor */ - private int maxPageSize; /* Initialized in constructor */ - private OMRSAuditLog auditLog; - - /** - * Constructor used at server startup. - * - * @param localServerName name of the local server - * @param localServerType type of the local server - * @param localOrganizationName name of the organization that owns the local server - * @param localServerUserId user id for this server to use if processing inbound messages. - * @param localServerURL URL root for this server. - * @param maxPageSize maximum number of records that can be requested on the pageSize parameter - */ - public SecurityOfficerOperationalServices(String localServerName, - String localServerType, - String localOrganizationName, - String localServerUserId, - String localServerURL, - int maxPageSize) { - this.localServerName = localServerName; - this.localServerType = localServerType; - this.localOrganizationName = localOrganizationName; - this.localServerUserId = localServerUserId; - this.localServerURL = localServerURL; - this.maxPageSize = maxPageSize; - } - - public void initialize(SecurityOfficerConfig securityOfficerConfig, OMRSAuditLog auditLog) throws OMAGConfigurationErrorException { - if (securityOfficerConfig != null) { - final String actionDescription = "initialize"; - this.auditLog = auditLog; - - logAudit(SecurityOfficerAuditCode.SERVICE_INITIALIZING, actionDescription); - - SecurityOfficerEventProcessor securityOfficerEventProcessor = new SecurityOfficerEventProcessor(securityOfficerConfig, auditLog); - - inTopic = getTopicConnector(securityOfficerConfig.getSecurityOfficerServerInTopic(), auditLog); - OpenMetadataTopicListener securityOfficerEventListener = new SecurityOfficerEventListener(securityOfficerEventProcessor); - - inTopic.registerListener(securityOfficerEventListener); - - startTopic(inTopic, securityOfficerConfig.getSecurityOfficerServerInTopicName()); - - logAudit(SecurityOfficerAuditCode.SERVICE_INITIALIZED, actionDescription); - } - } - - - /** - * Returns the connector created from topic connection properties - * - * @param topicConnection properties of the topic connection - * @return the connector created based on the topic connection properties - */ - private OpenMetadataTopicConnector getTopicConnector(Connection topicConnection, OMRSAuditLog auditLog) { - try { - ConnectorBroker connectorBroker = new ConnectorBroker(); - - OpenMetadataTopicConnector topicConnector = (OpenMetadataTopicConnector) connectorBroker.getConnector(topicConnection); - topicConnector.setAuditLog(auditLog); - - return topicConnector; - } catch (Exception error) { - final String methodName = "getTopicConnector"; - - throw new OMRSConfigErrorException(SecurityOfficerErrorCode.NULL_TOPIC_CONNECTOR.getMessageDefinition(methodName), - this.getClass().getName(), - methodName, - error); - - } - } - - /** - * Shutdown the Security Officer Services. - * - * @return boolean indicated whether the disconnect was successful. - */ - public boolean disconnect() { - - try { - inTopic.disconnect(); - } catch (ConnectorCheckedException e) { - log.error("Error disconnecting in topic connector"); - } - - final String actionDescription = "shutdown"; - logAudit(SecurityOfficerAuditCode.SERVICE_SHUTDOWN, actionDescription); - - return false; - } - - private void startTopic(OpenMetadataTopicConnector topic, String topicName) throws OMAGConfigurationErrorException { - try { - topic.start(); - } catch (ConnectorCheckedException e) { - String action = "Unable to initialize the topic connection"; - SecurityOfficerAuditCode auditCode = SecurityOfficerAuditCode.ERROR_INITIALIZING_SECURITY_OFFICER_SERVER_TOPIC_CONNECTION; - auditLog.logRecord(action, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(topicName, localServerName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - throw new OMAGConfigurationErrorException(400, - this.getClass().getSimpleName(), - action, - auditCode.getFormattedLogMessage(), - auditCode.getSystemAction(), - auditCode.getUserAction() - ); - } - } - - private void logAudit(SecurityOfficerAuditCode auditCode, String actionDescription) { - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - OMRSAuditLogRecordSeverity.INFO, - auditCode.getFormattedLogMessage("Security Officer Server"), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/README.md b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/README.md deleted file mode 100644 index 327eae63800..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - - -# Security Synchronization Services Server - -The security sync services server module contains the server-side -implementation of the security synchronization services. - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/build.gradle b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/build.gradle deleted file mode 100644 index 0960f54804b..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-sync-connectors:ranger-connector') - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:common-services:ffdc-services') - implementation 'org.springframework:spring-web' - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-api') - implementation 'com.mikesamuel:json-sanitizer' -} - -description = 'Security Sync Services Server-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/pom.xml b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/pom.xml deleted file mode 100644 index 7236ed75924..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - security-sync-services - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Security Sync Services Server-side - - Server side implementation of the security sync services. - - - security-sync-services-server - - - - - org.odpi.egeria - ranger-connector - - - - org.odpi.egeria - admin-services-api - - - - org.springframework - spring-web - - - - org.odpi.egeria - audit-log-framework - - - - org.odpi.egeria - open-connector-framework - - - - com.fasterxml.jackson.core - jackson-databind - - - - org.slf4j - slf4j-api - - - - org.odpi.egeria - repository-services-apis - - - - org.odpi.egeria - governance-engine-api - - - - com.mikesamuel - json-sanitizer - - - - - diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/auditlog/SecuritySyncAuditCode.java b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/auditlog/SecuritySyncAuditCode.java deleted file mode 100644 index 4c61b6c8f73..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/auditlog/SecuritySyncAuditCode.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.securitysyncservices.auditlog; - -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -import java.text.MessageFormat; - -public enum SecuritySyncAuditCode { - - SERVICE_INITIALIZING("SECURITY-SYNC-0001", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync is initializing a new server instance", - "The local server has started up a new instance of the Security Sync.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_INITIALIZED("SECURITY-SYNC-0002", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync has initialized a new instance for server {0}", - "The Security Sync has completed initialization of a new instance.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_SHUTDOWN("SECURITY-SYNC-0003", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync is shutting down its instance for server {0}", - "The local server has requested shut down of a Security Sync instance.", - "No action is required. This is part of the normal operation of the service."), - ERROR_INITIALIZING_SECURITY_SYNC_TOPIC_CONNECTION("SECURITY-SYNC-0004", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The Security Sync is unable to initialize the connection to topic {0} in the instance for server {1} ", - "The connection to topic could not be initialized.", - "Review the exception and resolve the configuration."), - CLASSIFIED_GOVERNED_ASSET_INITIAL_LOAD("SECURITY-SYNC--0005", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync exchange the classified governed asset from Open Metadata Repository with configured Security Sync Server", - "The Security Sync instance synchronize the Ranger Server with the repository for initial loading of existing governed assets", - "No action is required. This is part of the normal flow of the initial load."), - CLASSIFIED_GOVERNED_ASSET_EVENT_RECEIVED("SECURITY-SYNC--0006", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync received a new event for classified governed asset", - "The Security Sync instance should synchronize the Ranger Server instance with the repository.", - "No action is required. This is part of the normal flow."), - RE_CLASSIFIED_GOVERNED_ASSET_EVENT_RECEIVED("SECURITY-SYNC--0007", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync received a new event for re-classified governed asset", - "The Security Sync instance should synchronize the Ranger Server instance with the repository.", - "No action is required. This is part of the normal flow."), - DE_CLASSIFIED_GOVERNED_ASSET_EVENT_RECEIVED("SECURITY-SYNC--0008", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync received an event for de-classified governed asset", - "The Security Sync instance should synchronize the Ranger Server instance with the repository.", - "No action is required. This is part of the normal flow."), - DELETED_GOVERNED_ASSET_EVENT_RECEIVED("SECURITY-SYNC--0009", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync received an event for deleted governed asset", - "The Security Sync instance should synchronize the Ranger Server instance with the repository.", - "No action is required. This is part of the normal flow."), - SYNCHRONIZE_POLICIES_STARTED("SECURITY-SYNC--0010", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync Server started the synchronization of policies from external policies enforcement tool", - "The Security Sync instance should synchronize the policies defined in the external policies enforcement tool the repository.", - "No action is required. This is part of the normal flow."), - SYNCHRONIZE_POLICIES_FINISHED("SECURITY-SYNC--0011", - OMRSAuditLogRecordSeverity.INFO, - "The Security Sync Server finished the synchronization of policies from external policies enforcement tool", - "The Security Sync instance synchronized the policies defined in the external policies enforcement tool the repository.", - "No action is required. This is part of the normal flow."); - private String logMessageId; - private OMRSAuditLogRecordSeverity severity; - private String logMessage; - private String systemAction; - private String userAction; - - - /** - * The constructor for OMRSAuditCode expects to be passed one of the enumeration rows defined in - * OMRSAuditCode above. For example: - *

- * OMRSAuditCode auditCode = OMRSAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 4 parameters shown below. - * - * @param messageId - unique Id for the message - * @param message - text for the message - * @param severity - the severity of the message - * @param systemAction - description of the action taken by the system when the condition happened - * @param userAction - instructions for resolving the situation, if any - */ - SecuritySyncAuditCode(String messageId, OMRSAuditLogRecordSeverity severity, - String message, String systemAction, String userAction) { - this.logMessageId = messageId; - this.severity = severity; - this.logMessage = message; - this.systemAction = systemAction; - this.userAction = userAction; - } - - /** - * Returns the unique identifier for the error message. - * - * @return logMessageId - */ - public String getLogMessageId() { - return logMessageId; - } - - /** - * Returns the log message with the placeholders filled out with the supplied parameters. - * - * @param params - strings that plug into the placeholders in the logMessage - * @return logMessage (formatted with supplied parameters) - */ - public String getFormattedLogMessage(String... params) { - MessageFormat mf = new MessageFormat(logMessage); - return mf.format(params); - } - - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction String - */ - public String getSystemAction() { - return systemAction; - } - - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction String - */ - public String getUserAction() { - return userAction; - } - - /** - * Return the severity of the audit log record. - * - * @return OMRSAuditLogRecordSeverity enum - */ - public OMRSAuditLogRecordSeverity getSeverity() { - return severity; - } -} diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/ffdc/SecuritySyncErrorCode.java b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/ffdc/SecuritySyncErrorCode.java deleted file mode 100644 index 520a3a0fd86..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/ffdc/SecuritySyncErrorCode.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.securitysyncservices.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The OMRSErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMRS - * It is used in conjunction with all OMRS Exceptions, both Checked and Runtime (unchecked). - * - * The 5 fields in the enum are: - *

    - *
  • HTTP Error Code for translating between REST and JAVA. Typically the numbers used are:
  • - *
    • - *
    • 500: internal error
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: to uniquely identify the message
  • - *
  • Error Message Text: includes placeholder to allow additional values to be captured
  • - *
  • SystemAction: describes the result of the error
  • - *
  • UserAction: describes how a user should correct the error
  • - *
- */ -public enum SecuritySyncErrorCode implements ExceptionMessageSet -{ - - NULL_TOPIC_CONNECTOR(400, "SECURITY-SYNC-400-001", - "Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize", - "The local server will not connect to the cohort.", - "The connection to the connector is configured in the server configuration. " + - "Review previous error messages to determine the precise error in the " + - "start up configuration. " + - "Correct the configuration and reconnect the server to the cohort. ") - - ; - - private ExceptionMessageDefinition messageDefinition; - - - /** - * The constructor for DiscoveryEngineServicesErrorCode expects to be passed one of the enumeration rows defined in - * DiscoveryEngineServicesErrorCode above. For example: - * - * DiscoveryEngineServicesErrorCode errorCode = DiscoveryEngineServicesErrorCode.UNKNOWN_ENDPOINT; - * - * This will expand out to the 5 parameters shown below. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique Id for the message - * @param errorMessage text for the message - * @param systemAction description of the action taken by the system when the error condition happened - * @param userAction instructions for resolving the error - */ - SecuritySyncErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * Retrieve a message definition object for an exception. This method is used when there are no message inserts. - * - * @return message definition object. - */ - public ExceptionMessageDefinition getMessageDefinition() - { - return messageDefinition; - } - - - /** - * Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message. - * - * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text. - * @return message definition object. - */ - public ExceptionMessageDefinition getMessageDefinition(String... params) - { - messageDefinition.setMessageParameters(params); - - return messageDefinition; - } - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "OMRSErrorCode{" + - "messageDefinition=" + messageDefinition + - '}'; - } -} diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/listener/SecuritySyncEventListener.java b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/listener/SecuritySyncEventListener.java deleted file mode 100644 index 06cd5cd2c1d..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/listener/SecuritySyncEventListener.java +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.securitysyncservices.listener; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.accessservices.securityofficer.api.events.GovernedAssetEvent; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener; -import org.odpi.openmetadata.securitysyncservices.processor.SecuritySyncEventProcessor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SecuritySyncEventListener implements OpenMetadataTopicListener { - - private static final Logger log = LoggerFactory.getLogger(SecuritySyncEventListener.class); - private static ObjectMapper objectMapper = new ObjectMapper(); - private SecuritySyncEventProcessor securitySyncEventProcessor; - - public SecuritySyncEventListener(SecuritySyncEventProcessor securitySyncEventProcessor) { - this.securitySyncEventProcessor = securitySyncEventProcessor; - } - - @Override - public void processEvent(String receivedEvent) { - log.info("[Security Sync] Event Received"); - - try { - GovernedAssetEvent event = objectMapper.readValue(receivedEvent, GovernedAssetEvent.class); - switch (event.getEventType()) { - case NEW_CLASSIFIED_ASSET: - securitySyncEventProcessor.processClassifiedGovernedAssetEvent(event.getGovernedAsset()); - break; - case RE_CLASSIFIED_ASSET: - securitySyncEventProcessor.processReClassifiedGovernedAssetEvent(event.getGovernedAsset()); - break; - case DE_CLASSIFIED_ASSET: - securitySyncEventProcessor.processDeClassifiedGovernedAssetEvent(event.getGovernedAsset()); - break; - case DELETED_ASSET: - securitySyncEventProcessor.processDeletedGovernedAssetEvent(event.getGovernedAsset()); - break; - default: - log.debug("Unknown event type"); - break; - } - } catch (Exception e) { - log.debug("Security Sync Server is unable to process the event."); - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/processor/SecuritySyncEventProcessor.java b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/processor/SecuritySyncEventProcessor.java deleted file mode 100644 index 91d008c8598..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/processor/SecuritySyncEventProcessor.java +++ /dev/null @@ -1,241 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.securitysyncservices.processor; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.GovernanceClassification; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.GovernedAsset; -import org.odpi.openmetadata.accessservices.securityofficer.api.model.rest.GovernedAssetListResponse; -import org.odpi.openmetadata.adminservices.configuration.properties.SecuritySyncConfig; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.RangerSecurityServiceConnector; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerSecurityServicePolicies; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerServiceResource; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.RangerTag; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.model.ResourceTagMapper; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; -import org.odpi.openmetadata.securitysyncservices.auditlog.SecuritySyncAuditCode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RestTemplate; - -import java.io.IOException; -import java.text.MessageFormat; -import java.util.List; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; - -import static java.util.concurrent.TimeUnit.SECONDS; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.GOVERNANCE_ENGINE_OMAS_URL; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SECURITY_SYNC_SERVER; -import static org.odpi.openmetadata.openconnectors.governancedaemonconnectors.securitysync.rangerconnector.util.Constants.SECURITY_TAGS; - -import static com.google.json.JsonSanitizer.sanitize; - - -public class SecuritySyncEventProcessor { - - private static final Logger log = LoggerFactory.getLogger(SecuritySyncEventProcessor.class); - private static final Long DEFAULT_POLLING_INTERVAL = 360L; - - private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); - private OMRSAuditLog auditLog; - private SecuritySyncConfig securitySyncConfig; - private RangerSecurityServiceConnector rangerOpenConnector; - private Long tagPoliciesLastKnownVersion = 0L; - private Long accessPoliciesLastKnownVersion = 0L; - - public SecuritySyncEventProcessor(SecuritySyncConfig securitySyncConfig, OMRSAuditLog auditLog) { - this.auditLog = auditLog; - this.securitySyncConfig = securitySyncConfig; - rangerOpenConnector = new RangerSecurityServiceConnector(securitySyncConfig.getSecuritySyncServerConnection()); - } - - public void processExistingGovernedAssetsFromRepository() { - logProcessing("processExistingGovernedAssetsFromRepository", SecuritySyncAuditCode.CLASSIFIED_GOVERNED_ASSET_INITIAL_LOAD); - - GovernedAssetListResponse governedAssetResponse = getGovernedAssets(); - if (governedAssetResponse == null || governedAssetResponse.getRelatedHTTPCode() != 200) { - return; - } - - List governedAssets = governedAssetResponse.getGovernedAssetList(); - - rangerOpenConnector.importTaggedResources(governedAssets); - } - - public void syncSecurityPolicies() { - final Runnable syncSecurityServicePolicies = () -> - { - log.debug("Re-sync policies from external tool"); - processSecurityServicePolicies(); - }; - scheduler.scheduleAtFixedRate(syncSecurityServicePolicies, - securitySyncConfig.getPollingInterval() != null ? securitySyncConfig.getPollingInterval() : DEFAULT_POLLING_INTERVAL, - securitySyncConfig.getPollingInterval() != null ? securitySyncConfig.getPollingInterval() : DEFAULT_POLLING_INTERVAL, - SECONDS); - } - - public void processSecurityServicePolicies() { - String methodName = "processSecurityServicePolicies"; - logProcessing(methodName, SecuritySyncAuditCode.SYNCHRONIZE_POLICIES_STARTED); - - syncSecurityServicePolicies(securitySyncConfig.getSecuritySyncTagServiceName(), tagPoliciesLastKnownVersion); - syncSecurityServicePolicies(securitySyncConfig.getSecuritySyncAccessResourceServiceName(), accessPoliciesLastKnownVersion); - - logProcessing(methodName, SecuritySyncAuditCode.SYNCHRONIZE_POLICIES_FINISHED); - } - - public void processClassifiedGovernedAssetEvent(GovernedAsset governedAsset) { - logProcessing("processClassifiedGovernedAssetEvent", SecuritySyncAuditCode.CLASSIFIED_GOVERNED_ASSET_EVENT_RECEIVED); - - List securityTags = rangerOpenConnector.createSecurityTags(governedAsset.getAssignedGovernanceClassification()); - if (securityTags == null || securityTags.isEmpty()) { - return; - } - RangerServiceResource resource = rangerOpenConnector.createResource(governedAsset); - - for (RangerTag securityTag : securityTags) { - rangerOpenConnector.createAssociationResourceToSecurityTag(resource.getGuid(), securityTag.getGuid()); - } - } - - public void processReClassifiedGovernedAssetEvent(GovernedAsset governedAsset) { - logProcessing("processReClassifiedGovernedAssetEvent", SecuritySyncAuditCode.RE_CLASSIFIED_GOVERNED_ASSET_EVENT_RECEIVED); - - RangerServiceResource resource = declassifiedGovernedAsset(governedAsset); - - if (governedAsset.getAssignedGovernanceClassification() == null) { - return; - } - - GovernanceClassification classification = governedAsset.getAssignedGovernanceClassification(); - if (classification.getSecurityLabels() == null || classification.getSecurityLabels().isEmpty()) { - return; - } - - List securityTags = rangerOpenConnector.createSecurityTags(classification); - - if (resource != null && resource.getGuid() != null) { - for (RangerTag securityTag : securityTags) { - rangerOpenConnector.createAssociationResourceToSecurityTag(resource.getGuid(), securityTag.getGuid()); - } - } - } - - public void processDeClassifiedGovernedAssetEvent(GovernedAsset governedAsset) { - logProcessing("processDeclassifiedGovernedAssetEvent", SecuritySyncAuditCode.DE_CLASSIFIED_GOVERNED_ASSET_EVENT_RECEIVED); - - declassifiedGovernedAsset(governedAsset); - } - - public void processDeletedGovernedAssetEvent(GovernedAsset governedAsset) { - logProcessing("processDeclassifiedGovernedAssetEvent", SecuritySyncAuditCode.DELETED_GOVERNED_ASSET_EVENT_RECEIVED); - - RangerServiceResource resource = declassifiedGovernedAsset(governedAsset); - - if (resource != null && resource.getGuid() != null) { - rangerOpenConnector.deleteResource(resource.getGuid()); - } - } - - private void logProcessing(String action, SecuritySyncAuditCode auditCode) { - - auditLog.logRecord(action, - auditCode.getLogMessageId(), - OMRSAuditLogRecordSeverity.INFO, - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - - private GovernedAssetListResponse getGovernedAssets() { - String governanceEngineURL = getGovernanceEngineURL(); - - RestTemplate restTemplate = new RestTemplate(); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); - HttpEntity entity = new HttpEntity<>(headers); - - try { - - ResponseEntity result = restTemplate.exchange(governanceEngineURL, HttpMethod.GET, entity, String.class); - return (GovernedAssetListResponse) mapToObject(result, GovernedAssetListResponse.class); - } catch (HttpStatusCodeException exception) { - log.error("Unable to get the governed assets: ", exception); - } - return null; - } - - private String getGovernanceEngineURL() { - - return MessageFormat.format(GOVERNANCE_ENGINE_OMAS_URL, - securitySyncConfig.getAccessServiceRootURL(), - securitySyncConfig.getAccessServiceServerName(), - SECURITY_SYNC_SERVER, - SECURITY_TAGS); - } - - private Object mapToObject(ResponseEntity result, Class className) { - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - - try { - String resultString = sanitize(result.getBody()); - return mapper.readValue(resultString, className); - } catch (IOException e) { - log.error("403 {} - {}", e.getMessage(), e); - } - - return null; - } - - private RangerServiceResource declassifiedGovernedAsset(GovernedAsset governedAsset) { - if (governedAsset == null) { - return null; - } - - log.debug("de-classified entity: {}", governedAsset.getGuid()); - - RangerServiceResource resource = rangerOpenConnector.getResourceByGUID(governedAsset.getGuid()); - if (resource == null) { - return null; - } - - List resourceTagMapper = rangerOpenConnector.getTagsAssociatedWithTheResource(resource.getId()); - - if (resourceTagMapper != null) { - resourceTagMapper.forEach(mapping -> rangerOpenConnector.deleteAssociationResourceToSecurityTag(mapping)); - } - - return resource; - } - - private void syncSecurityServicePolicies(String securitySyncServiceName, Long tagPoliciesLastKnownVersion) { - if (securitySyncServiceName == null) { - return; - } - - RangerSecurityServicePolicies securityServicePolicies = rangerOpenConnector.getSecurityServicePolicies(securitySyncServiceName, tagPoliciesLastKnownVersion); - if (securityServicePolicies != null) { - setLastKnownVersion(securitySyncServiceName, securityServicePolicies); - //TODO: process the policies and sync MR - } - } - - private void setLastKnownVersion(String securitySyncTagServiceName, RangerSecurityServicePolicies securityServicePolicies) { - if (securitySyncTagServiceName.startsWith("tag")) { - tagPoliciesLastKnownVersion = securityServicePolicies.getPolicyVersion(); - } else { - accessPoliciesLastKnownVersion = securityServicePolicies.getPolicyVersion(); - } - } -} \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/registration/SecuritySyncOperationalServices.java b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/registration/SecuritySyncOperationalServices.java deleted file mode 100644 index 4a174c629d2..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-server/src/main/java/org/odpi/openmetadata/securitysyncservices/registration/SecuritySyncOperationalServices.java +++ /dev/null @@ -1,158 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.securitysyncservices.registration; - -import org.odpi.openmetadata.adminservices.configuration.properties.SecuritySyncConfig; -import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSConfigErrorException; -import org.odpi.openmetadata.securitysyncservices.auditlog.SecuritySyncAuditCode; -import org.odpi.openmetadata.securitysyncservices.ffdc.SecuritySyncErrorCode; -import org.odpi.openmetadata.securitysyncservices.listener.SecuritySyncEventListener; -import org.odpi.openmetadata.securitysyncservices.processor.SecuritySyncEventProcessor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SecuritySyncOperationalServices { - - private static final Logger log = LoggerFactory.getLogger(SecuritySyncOperationalServices.class); - private OpenMetadataTopicConnector inTopic; - private String localServerName; /* Initialized in constructor */ - private String localServerType; /* Initialized in constructor */ - private String localMetadataCollectionName; /* Initialized in constructor */ - private String localOrganizationName; /* Initialized in constructor */ - private String localServerUserId; /* Initialized in constructor */ - private String localServerURL; /* Initialized in constructor */ - private int maxPageSize; /* Initialized in constructor */ - private OMRSAuditLog auditLog; - - /** - * Constructor used at server startup. - * - * @param localServerName name of the local server - * @param localServerType type of the local server - * @param localOrganizationName name of the organization that owns the local server - * @param localServerUserId user id for this server to use if processing inbound messages. - * @param localServerURL URL root for this server. - * @param maxPageSize maximum number of records that can be requested on the pageSize parameter - */ - public SecuritySyncOperationalServices(String localServerName, - String localServerType, - String localOrganizationName, - String localServerUserId, - String localServerURL, - int maxPageSize) { - this.localServerName = localServerName; - this.localServerType = localServerType; - this.localOrganizationName = localOrganizationName; - this.localServerUserId = localServerUserId; - this.localServerURL = localServerURL; - this.maxPageSize = maxPageSize; - } - - public void initialize(SecuritySyncConfig securitySyncConfig, OMRSAuditLog auditLog) throws OMAGConfigurationErrorException { - if (securitySyncConfig != null) { - final String actionDescription = "initialize"; - this.auditLog = auditLog; - - logAudit(SecuritySyncAuditCode.SERVICE_INITIALIZING, actionDescription); - - SecuritySyncEventProcessor securitySyncEventProcessor = new SecuritySyncEventProcessor(securitySyncConfig, auditLog); - - inTopic = getTopicConnector(securitySyncConfig.getSecuritySyncInTopic(), auditLog); - OpenMetadataTopicListener governanceEventListener = new SecuritySyncEventListener(securitySyncEventProcessor); - inTopic.registerListener(governanceEventListener); - - startTopic(inTopic, securitySyncConfig.getSecuritySyncInTopicName()); - - securitySyncEventProcessor.processExistingGovernedAssetsFromRepository(); - securitySyncEventProcessor.processSecurityServicePolicies(); - securitySyncEventProcessor.syncSecurityPolicies(); - logAudit(SecuritySyncAuditCode.SERVICE_INITIALIZED, actionDescription); - } - } - - - /** - * Returns the connector created from topic connection properties - * - * @param topicConnection properties of the topic connection - * @return the connector created based on the topic connection properties - */ - private OpenMetadataTopicConnector getTopicConnector(Connection topicConnection, OMRSAuditLog auditLog) { - try { - ConnectorBroker connectorBroker = new ConnectorBroker(); - - OpenMetadataTopicConnector topicConnector = (OpenMetadataTopicConnector) connectorBroker.getConnector(topicConnection); - topicConnector.setAuditLog(auditLog); - - return topicConnector; - } catch (Exception error) { - final String methodName = "getTopicConnector"; - - throw new OMRSConfigErrorException(SecuritySyncErrorCode.NULL_TOPIC_CONNECTOR.getMessageDefinition(methodName), - this.getClass().getName(), - methodName, - error); - - } - } - - /** - * Shutdown the Security Sync Services. - * - * @return boolean indicated whether the disconnect was successful. - */ - public boolean disconnect() { - - try { - inTopic.disconnect(); - } catch (ConnectorCheckedException e) { - log.error("Error disconnecting in topic connector"); - } - - final String actionDescription = "shutdown"; - logAudit(SecuritySyncAuditCode.SERVICE_SHUTDOWN, actionDescription); - - return false; - } - - private void startTopic(OpenMetadataTopicConnector topic, String topicName) throws OMAGConfigurationErrorException { - try { - topic.start(); - } catch (ConnectorCheckedException e) { - String action = "Unable to initialize the topic connection"; - SecuritySyncAuditCode auditCode = SecuritySyncAuditCode.ERROR_INITIALIZING_SECURITY_SYNC_TOPIC_CONNECTION; - auditLog.logRecord(action, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(topicName, localServerName), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - throw new OMAGConfigurationErrorException(400, - this.getClass().getSimpleName(), - action, - auditCode.getFormattedLogMessage(), - auditCode.getSystemAction(), - auditCode.getUserAction() - ); - } - } - - private void logAudit(SecuritySyncAuditCode auditCode, String actionDescription) { - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - OMRSAuditLogRecordSeverity.INFO, - auditCode.getFormattedLogMessage("Security Sync"), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/README.md b/open-metadata-implementation/governance-servers/virtualization-services/README.md deleted file mode 100644 index 607f64259a0..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/README.md +++ /dev/null @@ -1,97 +0,0 @@ - - - -![Deprecated](../../../open-metadata-publication/website/images/egeria-content-status-deprecated.png#pagewidth) - -# Virtualizer Server - -The Virtualizer communicates with Information View OMAS and virtualization tool which is currently Gaian. -The design of the server allows for other data virtualization platforms to be -plugged in by changing the view generation connector. - -Virtualizer has three main functions: -1. listen to Information View OMAS Out topic(specified by property information-view-out-topic) and retrieve InformationViewEvent event (json structure); -2. create Business Logical View(business terms are used as column names) and Technical Logical View(source table column names are used as view column names), containing only the columns with business terms assigned -3. create Business View json file and Technical View json file, notify Information View OMAS through publishing on Information View OMAS In topic (specified by property information-view-in-topic). - -## OMAG server configuration - -The Virtualizer is a server that runs on the [OMAG Server Platform](../../../open-metadata-publication/website/omag-server). -In this case, the service should be configured and initialized by the restful APIs provided by the platform. - -Here are the steps to run Virtualizer -1. Start an [OMAG Server Platform](../../../open-metadata-resources/open-metadata-tutorials/omag-server-tutorial) - -- Configure event bus - -**POST** following JSON object - -```json -{ - "consumer": - { - "bootstrap.servers" : "{kafkaServerAddress}" - }, - "producer": - { - "bootstrap.servers" : "{kafkaServerAddress}", - "key.serializer": "org.apache.kafka.common.serialization.StringSerializer", - "value.serializer": "org.apache.kafka.common.serialization.StringSerializer" - } -} -``` - -to the following address - -``` -{serverURLRoot}/open-metadata/admin-services/users/{userId}/servers/{serverName}/event-bus?topicURLRoot={topicRoot} -``` - -- Set up virtualizer configuration - -**POST** following JSON object - -```json -{ - "class": "VirtualizationConfig", - "virtualizationProvider": "{fullyQualifiedJavaClassName}", - "virtualizerOutboundTopicName": "{iv-in-topic-name}", - "virtualizerInboundTopicName": "{iv-out-topic-name}", - "virtualizationSolutionConfig": - { - "frontendName": "", - "serverAddress": "", - "databaseName": "", - "schema": "", - "username": "", - "password": "", - "timeoutInSecond": 5, - "create": true, - "derbyDriver": "org.apache.derby.jdbc.ClientDriver", - "gdbNode": "GDB_NODE", - "logicTableName": "LTNAME", - "logicTableDefinition": "LTDEF", - "getLogicTables": "call listlts()" - } -} -``` - -to the following address - -``` -{serverURLRoot}/open-metadata/admin-services/users/{userId}/servers/{serverName}/virtualization-service/configuration -``` - -The object *virtualizationSolutionConfig* is the information required to implement the specific connector to the virtualization solutions. The keys should be modified based on the information needed by the connector. - -- Start the instance of the OMAG Server - -**POST** to the following address - -``` -{serverURLRoot}/open-metadata/admin-services/users/{userId}/servers/{serverName}/instance -``` - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/virtualization-services/pom.xml b/open-metadata-implementation/governance-servers/virtualization-services/pom.xml deleted file mode 100644 index 75137ddd41b..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - governance-servers - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Virtualization Services - - The virtualization services manage the data exchange between virtualization solutions and information view OMAS. - - - virtualization-services - pom - - virtualization-services-api - - - - diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/build.gradle b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/build.gradle deleted file mode 100644 index a86d7cad576..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:access-services:information-view:information-view-api') - implementation project(':open-metadata-implementation:access-services:data-platform:data-platform-api') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') -} - -description = 'Virtualizer API for Processing Event' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/pom.xml b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/pom.xml deleted file mode 100644 index 60792df5c00..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Virtualizer API for Processing Event - - The API will facilitate virtualizer to process the event that is picked up for view creation. - - - - - virtualization-services - org.odpi.egeria - 2.11-SNAPSHOT - - - virtualization-services-api - - - - com.fasterxml.jackson.core - jackson-databind - - - - org.slf4j - slf4j-api - - - - org.odpi.egeria - repository-services-apis - - - - org.odpi.egeria - information-view-api - - - - org.odpi.egeria - data-platform-api - - - - org.odpi.egeria - audit-log-framework - - - - org.odpi.egeria - open-connector-framework - - - - - - diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/event/VirtualizerTopicListener.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/event/VirtualizerTopicListener.java deleted file mode 100644 index 013a0fcac91..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/event/VirtualizerTopicListener.java +++ /dev/null @@ -1,227 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.event; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.accessservices.dataplatform.events.NewViewEvent; -import org.odpi.openmetadata.accessservices.informationview.events.*; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.utils.ConnectorUtils; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.ViewGeneratorConnectorBase; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * This is the event listener for the virtualizer. When the out topic of the IV OMAS is received, - * the listener will consume the event and process correspondingly. - */ - -public class VirtualizerTopicListener implements OpenMetadataTopicListener { - - private static final Logger log = LoggerFactory.getLogger(VirtualizerTopicListener.class); - - private OpenMetadataTopicConnector virtualizerOutboundTopicConnector; - private ViewGeneratorConnectorBase viewGeneratorConnector; - private EndpointSource endpointSource; - private String databaseName; - private String dataSchema; - - - /** - * Default constructor. - * @param virtualizerOutboundTopicConnector the event connector to sent out the processed topic - */ - public VirtualizerTopicListener(OpenMetadataTopicConnector virtualizerOutboundTopicConnector, - ViewGeneratorConnectorBase viewGeneratorConnector, - EndpointSource endpointSource, - String databaseName, - String dataSchema){ - this.virtualizerOutboundTopicConnector = virtualizerOutboundTopicConnector; - this.viewGeneratorConnector = viewGeneratorConnector; - this.endpointSource = endpointSource; - this.databaseName = databaseName; - this.dataSchema = dataSchema; - - } - - /** - * Process the received event. - * @param event inbound event - */ - @Override - public void processEvent (String event){ - log.info("The following event is received: " + event); - ObjectMapper objectMapper = new ObjectMapper(); - try{ - TableContextEvent eventObject; - try { - eventObject = objectMapper.readValue(event, TableContextEvent.class); - } catch (Exception e){ - log.info("An event is not Table Context Event, discarded!"); - eventObject = null; - } - if (eventObject != null){ - Map views = viewGeneratorConnector.processInformationViewEvent(eventObject); - List viewEvents = generateViewEvents(eventObject, views); - for (NewViewEvent item : viewEvents){ - virtualizerOutboundTopicConnector.sendEvent(objectMapper.writeValueAsString(item)); - } - } - }catch (Exception e){ - log.error("Error in processing the event from Information View OMAS", e); - } - } - - /** - * notify Information View OMAS - * - * @param tableContextEvent it contains the information from json which is sent from Information View - * @param createdViews the table definitions created in gaian - * - * @return list of events published to kafka topic - */ - public List generateViewEvents(TableContextEvent tableContextEvent, Map createdViews) { - List events = new ArrayList<>(); - try { - if (createdViews == null || createdViews.isEmpty()) { - log.info("No views were created, nothing to publish"); - } else { - for (Map.Entry entry : createdViews.entrySet()) { - if (entry.getValue() == null) { - log.info("No view was created for " + entry.getKey()); - } else { - events.add(createDataPlatformEvent(entry.getKey(), entry.getValue(), tableContextEvent)); - } - } - log.debug("Notification is sent out to Information View OMAS"); - } - } catch (Exception e) { - log.error("Exception: Not able to create views or notify Information View OMAS.", e); - - } - return events; - } - - /** - * create technical view and technical view - * - * @param tableContextEvent it contains the information from json which is sent from Information View - * @return two string which are jsons for technical view and business view - */ - - - private NewViewEvent createDataPlatformEvent(String viewType, String tableName, TableContextEvent tableContextEvent) { - NewViewEvent view = addConnectionDetailsAndTableContext(new NewViewEvent(), tableName); - view.setOriginalTableSource(convertTableSource(tableContextEvent.getTableSource())); - List derivedColumn = new ArrayList<>(); - for (TableColumn databaseColumn : tableContextEvent.getTableColumns()) { - if (databaseColumn.getBusinessTerms() != null && !databaseColumn.getBusinessTerms().isEmpty()) { - org.odpi.openmetadata.accessservices.dataplatform.properties.DerivedColumn column = new org.odpi.openmetadata.accessservices.dataplatform.properties.DerivedColumn(); - if (viewType.equals(ConnectorUtils.BUSINESS_PREFIX)) { - column.setName(databaseColumn.getBusinessTerms().get(0).getName().replace(" ", "_"));//TODO logic for handling multiple business terms - } else { - column.setName(databaseColumn.getName()); - } - column.setPosition(databaseColumn.getPosition()); - column.setType(databaseColumn.getType()); - column.setSourceColumn(convertSourceColumn(databaseColumn)); - derivedColumn.add(column); - } - } - - view.setDerivedColumns(derivedColumn); - - return view; - } - - private List convertBusinessTerm(List businessTerms) { - if(businessTerms != null && !businessTerms.isEmpty()) { - List businessTermList= new ArrayList<>(); - - for (org.odpi.openmetadata.accessservices.informationview.events.BusinessTerm businessTerm : businessTerms) - { - org.odpi.openmetadata.accessservices.dataplatform.properties.BusinessTerm businessTermCount = new org.odpi.openmetadata.accessservices.dataplatform.properties.BusinessTerm(); - businessTermCount.setAbbreviation(businessTerm.getAbbreviation()); - businessTermCount.setDescription(businessTerm.getDescription()); - businessTermCount.setDisplayName(businessTerm.getDisplayName()); - businessTermCount.setExamples(businessTerm.getExamples()); - businessTermCount.setGuid(businessTerm.getGuid()); - businessTermCount.setQuery(businessTerm.getQuery()); - businessTermCount.setName(businessTerm.getName()); - businessTermList.add(businessTermCount); - } - return businessTermList; - } - return null; - } - - private org.odpi.openmetadata.accessservices.dataplatform.properties.TableColumn convertSourceColumn(TableColumn databaseColumn) { - org.odpi.openmetadata.accessservices.dataplatform.properties.TableColumn tableColumn = new org.odpi.openmetadata.accessservices.dataplatform.properties.TableColumn(); - tableColumn.setName(databaseColumn.getName()); - tableColumn.setCardinality(databaseColumn.getCardinality()); - tableColumn.setGuid(databaseColumn.getGuid()); - tableColumn.setPosition(databaseColumn.getPosition()); - tableColumn.setPrimaryKey(databaseColumn.isPrimaryKey()); - tableColumn.setDefaultValueOverride(databaseColumn.getDefaultValueOverride()); - tableColumn.setNullable(databaseColumn.isNullable()); - tableColumn.setQualifiedName(databaseColumn.getQualifiedName()); - tableColumn.setType(databaseColumn.getType()); - tableColumn.setUnique(databaseColumn.isUnique()); - tableColumn.setBusinessTerms(convertBusinessTerm(databaseColumn.getBusinessTerms())); - return tableColumn; - } - - private NewViewEvent addConnectionDetailsAndTableContext(NewViewEvent informationViewEvent, String tableName) { - org.odpi.openmetadata.accessservices.dataplatform.properties.TableSource tableSource = new org.odpi.openmetadata.accessservices.dataplatform.properties.TableSource(); - org.odpi.openmetadata.accessservices.dataplatform.properties.DatabaseSource databaseSource = new org.odpi.openmetadata.accessservices.dataplatform.properties.DatabaseSource(); - tableSource.setDatabaseSource(databaseSource); - org.odpi.openmetadata.accessservices.dataplatform.properties.EndpointSource endpointSource1 = convertEndpointSource(endpointSource); - databaseSource.setEndpointSource(endpointSource1); - tableSource.setName(tableName); - databaseSource.setName(databaseName); - tableSource.setSchemaName(dataSchema); - informationViewEvent.setTableSource(tableSource); - return informationViewEvent; - } - - private org.odpi.openmetadata.accessservices.dataplatform.properties.TableSource convertTableSource(TableSource tableSource) { - org.odpi.openmetadata.accessservices.dataplatform.properties.TableSource tableSource1 = new org.odpi.openmetadata.accessservices.dataplatform.properties.TableSource(); - tableSource1.setName(tableSource.getName()); - tableSource1.setSchemaName(tableSource.getSchemaName()); - tableSource1.setGuid(tableSource.getGuid()); - tableSource1.setQualifiedName(tableSource.getQualifiedName()); - tableSource1.setGuid(tableSource.getGuid()); - tableSource1.setAdditionalProperties(tableSource.getAdditionalProperties()); - tableSource1.setDatabaseSource(convertDatabaseSource(tableSource.getDatabaseSource())); - return tableSource1; - } - - private org.odpi.openmetadata.accessservices.dataplatform.properties.DatabaseSource convertDatabaseSource(DatabaseSource databaseSource) { - org.odpi.openmetadata.accessservices.dataplatform.properties.DatabaseSource databaseSource1 = new org.odpi.openmetadata.accessservices.dataplatform.properties.DatabaseSource(); - databaseSource1.setName(databaseSource.getName()); - databaseSource1.setGuid(databaseSource.getGuid()); - databaseSource1.setQualifiedName(databaseSource.getQualifiedName()); - databaseSource1.setAdditionalProperties(databaseSource.getAdditionalProperties()); - databaseSource1.setEndpointSource(convertEndpointSource(databaseSource.getEndpointSource())); - return databaseSource1; - } - - private org.odpi.openmetadata.accessservices.dataplatform.properties.EndpointSource convertEndpointSource(EndpointSource endpointSource) { - org.odpi.openmetadata.accessservices.dataplatform.properties.EndpointSource endpointSource1 = new org.odpi.openmetadata.accessservices.dataplatform.properties.EndpointSource(); - endpointSource1.setConnectorProviderName(endpointSource.getConnectorProviderName()); - endpointSource1.setNetworkAddress(endpointSource.getNetworkAddress()); - endpointSource1.setProtocol(endpointSource.getProtocol()); - endpointSource1.setUser(endpointSource.getUser()); - endpointSource1.setAdditionalProperties(endpointSource.getAdditionalProperties()); - endpointSource1.setGuid(endpointSource.getGuid()); - endpointSource1.setQualifiedName(endpointSource.getQualifiedName()); - return endpointSource1; - } - - -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/ffdc/VirtualizationErrorCode.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/ffdc/VirtualizationErrorCode.java deleted file mode 100644 index 3838ecd278a..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/ffdc/VirtualizationErrorCode.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet; - - -/** - * The OMRSErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMRS - * It is used in conjunction with all OMRS Exceptions, both Checked and Runtime (unchecked). - * - * The 5 fields in the enum are: - *
    - *
  • HTTP Error Code for translating between REST and JAVA. Typically the numbers used are:
  • - *
    • - *
    • 500: internal error
    • - *
    • 501: not implemented
    • - *
    • 503: Service not available
    • - *
    • 400: invalid parameters
    • - *
    • 401: unauthorized
    • - *
    • 404: not found
    • - *
    • 405: method not allowed
    • - *
    • 409: data conflict errors, for example an item is already defined
    • - *
  • - *
  • Error Message Id: to uniquely identify the message
  • - *
  • Error Message Text: includes placeholder to allow additional values to be captured
  • - *
  • SystemAction: describes the result of the error
  • - *
  • UserAction: describes how a user should correct the error
  • - *
- */ -public enum VirtualizationErrorCode implements ExceptionMessageSet -{ - - NULL_TOPIC_CONNECTOR(400, "VIRTUALIZER-400-001", - "Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize", - "The local server will not connect to the cohort.", - "The connection to the connector is configured in the server configuration. " + - "Review previous error messages to determine the precise error in the " + - "start up configuration. " + - "Correct the configuration and reconnect the server to the cohort. ") - - ; - - private ExceptionMessageDefinition messageDefinition; - - - /** - * The constructor for DiscoveryEngineServicesErrorCode expects to be passed one of the enumeration rows defined in - * DiscoveryEngineServicesErrorCode above. For example: - * - * DiscoveryEngineServicesErrorCode errorCode = DiscoveryEngineServicesErrorCode.UNKNOWN_ENDPOINT; - * - * This will expand out to the 5 parameters shown below. - * - * @param httpErrorCode error code to use over REST calls - * @param errorMessageId unique Id for the message - * @param errorMessage text for the message - * @param systemAction description of the action taken by the system when the error condition happened - * @param userAction instructions for resolving the error - */ - VirtualizationErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction) - { - this.messageDefinition = new ExceptionMessageDefinition(httpErrorCode, - errorMessageId, - errorMessage, - systemAction, - userAction); - } - - - /** - * Retrieve a message definition object for an exception. This method is used when there are no message inserts. - * - * @return message definition object. - */ - public ExceptionMessageDefinition getMessageDefinition() - { - return messageDefinition; - } - - - /** - * Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message. - * - * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text. - * @return message definition object. - */ - public ExceptionMessageDefinition getMessageDefinition(String... params) - { - messageDefinition.setMessageParameters(params); - - return messageDefinition; - } - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "OMRSErrorCode{" + - "messageDefinition=" + messageDefinition + - '}'; - } -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGenerationInterface.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGenerationInterface.java deleted file mode 100644 index 1db9b58a445..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGenerationInterface.java +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * This is the interface for the generic operations on data virtualization solutions - */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator; - -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; - -import java.util.Map; - -public interface ViewGenerationInterface { - - /** - * Process the serialized information view event - * - * @param tableContextEvent event - * @return the table of created views for generating the kafka events - */ - Map processInformationViewEvent(TableContextEvent tableContextEvent); - -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorBase.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorBase.java deleted file mode 100644 index bc30b898981..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorBase.java +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * This is the interface for the generic operations on data virtualization solutions - */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator; - -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBase; - -import java.util.Map; - -public class ViewGeneratorConnectorBase extends ConnectorBase implements ViewGenerationInterface, AuditLoggingComponent -{ - protected AuditLog auditLog; - - - /** - * Process the serialized information view event - * - * @param tableContextEvent event - * @return the table sent to Gaian - */ - @Override - public Map processInformationViewEvent(TableContextEvent tableContextEvent) { - /*Do Nothing*/ - return null; - } - - - /** - * Save the instance of the Audit Log for this connector - * @param auditLog audit log object - */ - @Override - public void setAuditLog(AuditLog auditLog) { - this.auditLog = auditLog; - } -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorProvider.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorProvider.java deleted file mode 100644 index f5dd94fdc22..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/ViewGeneratorConnectorProvider.java +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator; - -import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase; - -public class ViewGeneratorConnectorProvider extends ConnectorProviderBase { - - public ViewGeneratorConnectorProvider() { - super(); - } - -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/LogicTable.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/LogicTable.java deleted file mode 100644 index 3737d603824..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/LogicTable.java +++ /dev/null @@ -1,89 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.model; - -import java.util.Map; -import java.util.Objects; - -/** - * LogicTable is a POJO which stores Logical Table information - */ -public class LogicTable { - - private String logicalTableName; - private String nodeName; - private Map logicalTableDefinition; - - /** - * Provide the content of the logical table - * @return content of logical table - */ - public Map getLogicalTableDefinition() { - return logicalTableDefinition; - } - - /** - * Set the content of the logical table - * @param logicalTableDefinition {@code Map} - */ - public void setLogicalTableDefinition(Map logicalTableDefinition) { - this.logicalTableDefinition = logicalTableDefinition; - } - - /** - * Provide the node name - * @return Node name - */ - public String getNodeName() { - return nodeName; - } - - /** - * Set the node name - * @param nodeName String - */ - public void setNodeName(String nodeName) { - this.nodeName = nodeName; - } - - - /** - * Provide the logical table name - * @return logical table name - */ - public String getLogicalTableName() { - return logicalTableName; - } - - /** - * Set the logical table name - * @param logicalTableName String - */ - public void setLogicalTableName(String logicalTableName) { - this.logicalTableName = logicalTableName; - } - - /** - * Compare object - * @param o object to compare - * @return boolean if the objects are equal - */ - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof LogicTable)) return false; - LogicTable that = (LogicTable) o; - return Objects.equals(getLogicalTableName(), that.getLogicalTableName()) && - Objects.equals(getNodeName(), that.getNodeName()) && - Objects.equals(getLogicalTableDefinition(), that.getLogicalTableDefinition()); - } - - /** - * Hash - * @return hash value of the object - */ - @Override - public int hashCode() { - return Objects.hash(getLogicalTableName(), getNodeName(), getLogicalTableDefinition()); - } -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/MappedColumn.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/MappedColumn.java deleted file mode 100644 index ae36d7c5f78..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/model/MappedColumn.java +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.model; - -/** - * MappedColumn is used to find mapped columns which contain business term in a table - */ -public class MappedColumn { - /** - * business name assigned to the column - */ - private String businessName; - /** - * data type of the column. The type sometimes is different from the original - * data source. This information is necessary for creating Logical Table in Gaian. - */ - private String type; - /** - * technical name of the column. It is the name stored in database. - */ - private String technicalName; - - public String getBusinessName() { - return businessName; - } - - public void setBusinessName(String businessName) { - this.businessName = businessName; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getTechnicalName() { - return technicalName; - } - - public void setTechnicalName(String technicalName) { - this.technicalName = technicalName; - } -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/utils/ConnectorUtils.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/utils/ConnectorUtils.java deleted file mode 100644 index 9bcb41afb5e..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/viewgenerator/utils/ConnectorUtils.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - -package org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.utils; - -import org.odpi.openmetadata.accessservices.informationview.events.TableColumn; -import org.odpi.openmetadata.accessservices.informationview.events.TableContextEvent; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.model.LogicTable; -import org.odpi.openmetadata.governanceservers.virtualizationservices.viewgenerator.model.MappedColumn; - - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ConnectorUtils { - public static final String TECHNICAL_PREFIX = "LTT"; - public static final String BUSINESS_PREFIX = "LTB"; - public static final String GENERAL = "General"; - - /** - * get Logical Table name bas - * @param event IV event - * @param type business or technical - * @return Logical Table's name - */ - public static String getLogicTableName(String type, TableContextEvent event, String gaianNodeName) { - - String connectorProviderType = event.getTableSource().getDatabaseSource().getEndpointSource().getConnectorProviderName().toLowerCase(); - - String name; - if (type.equals(GENERAL)) { - //form Logical Table's name for the back-end Gaian - name = connectorProviderType + "_" + event.getTableSource().getDatabaseSource().getName() + "_" + event.getTableSource().getSchemaName() + "_" + event.getTableSource().getName(); - } else { - //form Logical Table's name for the front-end Gaian - name = type + "_" + gaianNodeName + "_" + connectorProviderType + "_" + event.getTableSource().getDatabaseSource().getName() + "_" + event.getTableSource().getSchemaName() + "_" + event.getTableSource().getName(); - } - return name.toUpperCase(); - } - - /** - * provide the list of the mapped columns - * @param tableContextEvent the event containing full context for a table - * @return the list of columns with assigned business terms - */ - public static List getMappedColumns(TableContextEvent tableContextEvent) { - - List mappedColumns = new ArrayList<>(); - List databaseColumnList = tableContextEvent.getTableColumns(); - for (TableColumn databaseColumn : databaseColumnList) { - if (databaseColumn.getBusinessTerms() != null && !databaseColumn.getBusinessTerms().isEmpty()) { - MappedColumn mappedColumn = new MappedColumn(); - mappedColumn.setBusinessName(databaseColumn.getBusinessTerms().get(0).getName().replace(" ", "_"));//TODO logic for having only one business term - mappedColumn.setType(databaseColumn.getType()); - mappedColumn.setTechnicalName(databaseColumn.getName()); - mappedColumns.add(mappedColumn); - } - } - return mappedColumns; - } - - - /** - * set the real column data type to columns - * - * @param mappedColumns - * @param backEndTable - */ - public static void updateColumnDataType(List mappedColumns, LogicTable backEndTable) { - for (MappedColumn mappedColumn : mappedColumns) { - for (Map.Entry column : backEndTable.getLogicalTableDefinition().entrySet()) { - if (mappedColumn.getTechnicalName().equals(column.getKey())) { - mappedColumn.setType(column.getValue()); - break; - } - } - } - } -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/build.gradle b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/build.gradle deleted file mode 100644 index 413e799d8f7..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -dependencies { - implementation project(':open-metadata-implementation:access-services:information-view:information-view-api') - implementation project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:view-generator-connectors') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'org.slf4j:slf4j-api' - implementation project(':open-metadata-implementation:admin-services:admin-services-api') - implementation project(':open-metadata-implementation:governance-servers:virtualization-services:virtualization-services-api') - implementation 'com.fasterxml.jackson.core:jackson-annotations' - -} - -description = 'Virtualization Services Server-side' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/pom.xml b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/pom.xml deleted file mode 100644 index b86c3d4e1e2..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - - virtualization-services - org.odpi.egeria - 2.11-SNAPSHOT - - - Virtualization Services Server-side - - The virtualization services server-side implementation. - - - virtualization-services-server - - - - - org.odpi.egeria - information-view-api - - - - org.odpi.egeria - view-generator-connectors - - - - org.odpi.egeria - open-connector-framework - - - - org.odpi.egeria - repository-services-apis - - - - org.slf4j - slf4j-api - - - - org.odpi.egeria - admin-services-api - compile - - - - org.odpi.egeria - virtualization-services-api - compile - - - - diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/admin/VirtualizationOperationalServices.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/admin/VirtualizationOperationalServices.java deleted file mode 100644 index 32544b1a767..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/admin/VirtualizationOperationalServices.java +++ /dev/null @@ -1,287 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.admin; - -import org.odpi.openmetadata.accessservices.informationview.events.EndpointSource; -import org.odpi.openmetadata.adminservices.configuration.properties.VirtualizationConfig; -import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.governanceservers.virtualizationservices.auditlog.VirtualizationAuditCode; -import org.odpi.openmetadata.governanceservers.virtualizationservices.event.VirtualizerTopicListener; -import org.odpi.openmetadata.governanceservers.virtualizationservices.ffdc.VirtualizationErrorCode; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.viewgenerator.derby.ViewGeneratorDerbyConnector; -import org.odpi.openmetadata.openconnectors.governancedaemonconnectors.viewgenerator.derby.ViewGeneratorDerbyConnectorProvider; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditingComponent; -import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector; -import org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSConfigErrorException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class VirtualizationOperationalServices { - - private static final Logger log = LoggerFactory.getLogger(VirtualizationOperationalServices.class); - - private String localServerName; /* Initialized in constructor */ - private String localServerType; /* Initialized in constructor */ - private String localMetadataCollectionName; /* Initialized in constructor */ - private String localOrganizationName; /* Initialized in constructor */ - private String localServerUserId; /* Initialized in constructor */ - private String localServerURL; /* Initialized in constructor */ - - private OMRSAuditLog auditLog; - private OpenMetadataTopicConnector virtualizerInboundTopicConnector; - private OpenMetadataTopicConnector virtualizerOutboundTopicConnector; - private ViewGeneratorDerbyConnector virtualizationSolutionConnector; - - /** - * Constructor used at server startup. - * - * @param localServerName name of the local server - * @param localServerType type of the local server - * @param localOrganizationName name of the organization that owns the local server - * @param localServerUserId user id for this server to use if processing inbound messages. - * @param localServerURL URL root for this server. - */ - public VirtualizationOperationalServices(String localServerName, - String localServerType, - String localOrganizationName, - String localServerUserId, - String localServerURL) { - this.localServerName = localServerName; - this.localServerType = localServerType; - this.localOrganizationName = localOrganizationName; - this.localServerUserId = localServerUserId; - this.localServerURL = localServerURL; - } - - /** - * Initialize the virtualization server - * - * @param virtualizationConfig Virtualization server configuration. - * @param auditLog Audition Log instance. - */ - public void initialize(VirtualizationConfig virtualizationConfig, OMRSAuditLog auditLog) { - - if (virtualizationConfig != null) { - final String actionDescription = "initialize"; - VirtualizationAuditCode auditCode = VirtualizationAuditCode.SERVICE_INITIALIZING; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - - this.auditLog = auditLog; - - - /* - Configuring the kafka connector for IV Out Topic - */ - Connection virtualizerInboundTopicConnection = virtualizationConfig.getVirtualizerInboundTopic(); - - if (virtualizerInboundTopicConnection != null) { - try { - virtualizerInboundTopicConnector = getTopicConnector(virtualizerInboundTopicConnection); - } catch (Exception e) { - auditCode = VirtualizationAuditCode.ERROR_INITIALIZING_IV_OUT_TOPIC_CONNECTION; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - } - - /* - Configuring the Kafka connector for IV In Topic - */ - Connection ivInTopicConnection = virtualizationConfig.getVirtualizerOutboundTopic(); - - if (ivInTopicConnection != null) { - try { - virtualizerOutboundTopicConnector = getTopicConnector(ivInTopicConnection); - } catch (Exception e) { - auditCode = VirtualizationAuditCode.ERROR_INITIALIZING_IV_IN_TOPIC_CONNECTION; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - } - - /* - * Configuring the derby connector - */ - Connection virtualizationSolutionConnection = virtualizationConfig.getVirtualizationSolutionConnection(); - if (virtualizationSolutionConnection != null) { - try { - ViewGeneratorDerbyConnectorProvider virtualizationConnectorProvider = new ViewGeneratorDerbyConnectorProvider(); - virtualizationSolutionConnector = (ViewGeneratorDerbyConnector) virtualizationConnectorProvider.getConnector(virtualizationSolutionConnection); - } catch (Exception e) { - log.error("Error creating derby connector: ", e); - } - } - - - /* - Starting the In Topic Connector - */ - if (virtualizerOutboundTopicConnector != null) { - try { - virtualizerOutboundTopicConnector.start(); - - EndpointSource endpointSource = new EndpointSource(); - String connectorProviderName = virtualizationSolutionConnection.getEndpoint().getAdditionalProperties().get("connectorProviderName"); - int lastIndexOf = connectorProviderName.lastIndexOf("."); - endpointSource.setConnectorProviderName(connectorProviderName.substring(lastIndexOf + 1, connectorProviderName.length())); - String aggregatedAddress = virtualizationSolutionConnection.getEndpoint().getAddress(); - endpointSource.setProtocol(aggregatedAddress.split("//")[0] + "//"); - endpointSource.setNetworkAddress(aggregatedAddress.split("//")[1].split(":")[0]); - endpointSource.setUser(virtualizationSolutionConnection.getUserId()); - /* - Binding the In Topic connector to the Topic Listener for generating In Topic - */ - VirtualizerTopicListener virtualizerTopicListener = new VirtualizerTopicListener(virtualizerOutboundTopicConnector, - virtualizationSolutionConnector, - endpointSource, - virtualizationSolutionConnection.getAdditionalProperties().get("databaseName"), - virtualizationSolutionConnection.getAdditionalProperties().get("dataSchema")); - virtualizerInboundTopicConnector.registerListener(virtualizerTopicListener); - - } catch (Exception e) { - auditCode = VirtualizationAuditCode.ERROR_INITIALIZING_IV_IN_TOPIC_CONNECTION; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - } - - /* - Starting the Out Topic Connector - */ - if (virtualizerInboundTopicConnector != null) { - try { - virtualizerInboundTopicConnector.start(); - auditCode = VirtualizationAuditCode.INBOUND_TOPIC_CONNECTOR_INITIALIZED; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } catch (Exception e) { - auditCode = VirtualizationAuditCode.ERROR_INITIALIZING_IV_OUT_TOPIC_CONNECTION; - auditLog.logRecord(actionDescription, - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - } - - if (virtualizationSolutionConnector != null) { - try { - virtualizationSolutionConnector.start(); - } catch (Exception e) { - log.error("Error in starting the derby connector: ", e); - } - } - - } - - if ((virtualizerInboundTopicConnector != null) && (virtualizerOutboundTopicConnector != null) && (virtualizationSolutionConnector != null) && - (virtualizerOutboundTopicConnector.isActive()) && (virtualizerInboundTopicConnector.isActive()) && (virtualizationSolutionConnector.isActive())) { - VirtualizationAuditCode auditCode = VirtualizationAuditCode.SERVICE_INITIALIZED; - auditLog.logRecord("Initializing", - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - } - - log.info("Virtualizer has been started!"); - - } - - /** - * Returns the connector created from topic connection properties - * - * @param topicConnection properties of the topic connection - * @return the connector created based on the topic connection properties - */ - private OpenMetadataTopicConnector getTopicConnector(Connection topicConnection) { - try { - ConnectorBroker connectorBroker = new ConnectorBroker(); - - OpenMetadataTopicConnector topicConnector = (OpenMetadataTopicConnector) connectorBroker.getConnector(topicConnection); - - topicConnector.setAuditLog(auditLog.createNewAuditLog(OMRSAuditingComponent.OPEN_METADATA_TOPIC_CONNECTOR)); - - return topicConnector; - } catch (Throwable error) { - final String methodName = "getTopicConnector"; - - if (log.isDebugEnabled()) { - log.debug("Unable to create topic connector: " + error.toString()); - } - - throw new OMRSConfigErrorException(VirtualizationErrorCode.NULL_TOPIC_CONNECTOR.getMessageDefinition(methodName), - this.getClass().getName(), - methodName, - error); - } - } - - - /** - * Shutdown the Virtualization Services. - * - * @param permanent boolean flag indicating whether this server permanently shutting down or not - * @return boolean indicated whether the disconnect was successful. - */ - public boolean disconnect(boolean permanent) { - VirtualizationAuditCode auditCode; - try { - virtualizerOutboundTopicConnector.disconnect(); - virtualizerInboundTopicConnector.disconnect(); - virtualizationSolutionConnector.disconnect(); - auditCode = VirtualizationAuditCode.SERVICE_SHUTDOWN; - auditLog.logRecord("Disconnecting", - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - return true; - } catch (Exception e) { - auditCode = VirtualizationAuditCode.ERROR_SHUTDOWN; - auditLog.logRecord("Disconnecting", - auditCode.getLogMessageId(), - auditCode.getSeverity(), - auditCode.getFormattedLogMessage(), - null, - auditCode.getSystemAction(), - auditCode.getUserAction()); - return false; - } - } - -} diff --git a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/auditlog/VirtualizationAuditCode.java b/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/auditlog/VirtualizationAuditCode.java deleted file mode 100644 index 79dac84dc2e..00000000000 --- a/open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-server/src/main/java/org/odpi/openmetadata/governanceservers/virtualizationservices/auditlog/VirtualizationAuditCode.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.governanceservers.virtualizationservices.auditlog; - -import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity; - -import java.text.MessageFormat; - -public enum VirtualizationAuditCode { - - SERVICE_INITIALIZING("VIRTUALIZER-0001", - OMRSAuditLogRecordSeverity.INFO, - "The Virtualizer is initializing a new server instance", - "The local server has started up a new instance of the Virutalizer.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_INITIALIZED("VIRTUALIZER-0002", - OMRSAuditLogRecordSeverity.INFO, - "The Virtualizer has initialized a new instance for server {0}", - "The local server has completed initialization of a new instance.", - "No action is required. This is part of the normal operation of the service."), - SERVICE_SHUTDOWN("VIRTUALIZER-0003", - OMRSAuditLogRecordSeverity.INFO, - "The Virtualizer is shutting down its instance for server {0}", - "The local server has requested shut down of a Virtualizer instance.", - "No action is required. This is part of the normal operation of the service."), - INBOUND_TOPIC_CONNECTOR_INITIALIZED("VIRTUALIZER-0004", - OMRSAuditLogRecordSeverity.INFO, - "The Virtualizer has initialized an event bus connector for Inbound Topic", - "The local server has completed initialization of a new event bus connector.", - "No action is required. This is part of the normal operation of the service."), - ERROR_INITIALIZING_IV_OUT_TOPIC_CONNECTION("VIRTUALIZER-0005", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Unable to initialize the Information View Out Topic connection", - "The connection could not be initialized.", - "Review the exception and resolve the configuration. "), - OUTBOUND_TOPIC_CONNECTOR_INITIALIZED("VIRTUALIZER-0006", - OMRSAuditLogRecordSeverity.INFO, - "The Virtualizer has initialized an event bus connector for outbound Topic", - "The local server has completed initialization of a new event bus connector.", - "No action is required. This is part of the normal operation of the service."), - ERROR_INITIALIZING_IV_IN_TOPIC_CONNECTION("VIRTUALIZER-0007", - OMRSAuditLogRecordSeverity.EXCEPTION, - "Unable to initialize the Information View In Topic connection", - "The connection could not be initialized.", - "Review the exception and resolve the configuration. "), - ERROR_SHUTDOWN("VIRTUALIZER-008", - OMRSAuditLogRecordSeverity.EXCEPTION, - "The service is not shutdown properly.", - "The connection could not be shutdown.", - "Try again. ") - ; - - private String logMessageId; - private OMRSAuditLogRecordSeverity severity; - private String logMessage; - private String systemAction; - private String userAction; - - - /** - * The constructor for OMRSAuditCode expects to be passed one of the enumeration rows defined in - * OMRSAuditCode above. For example: - *

- * OMRSAuditCode auditCode = OMRSAuditCode.SERVER_NOT_AVAILABLE; - *

- * This will expand out to the 4 parameters shown below. - * - * @param messageId - unique Id for the message - * @param message - text for the message - * @param systemAction - description of the action taken by the system when the condition happened - * @param userAction - instructions for resolving the situation, if any - */ - VirtualizationAuditCode(String messageId, OMRSAuditLogRecordSeverity severity, String message, - String systemAction, String userAction) { - this.logMessageId = messageId; - this.severity = severity; - this.logMessage = message; - this.systemAction = systemAction; - this.userAction = userAction; - } - - /** - * Returns the unique identifier for the error message. - * - * @return logMessageId - */ - public String getLogMessageId() { - return logMessageId; - } - - /** - * Return the severity object for the log - * @return severity - */ - public OMRSAuditLogRecordSeverity getSeverity() { - return severity; - } - - /** - * Returns the log message with the placeholders filled out with the supplied parameters. - * - * @param params - strings that plug into the placeholders in the logMessage - * @return logMessage (formatted with supplied parameters) - */ - public String getFormattedLogMessage(String... params) { - MessageFormat mf = new MessageFormat(logMessage); - return mf.format(params); - } - - - /** - * Returns a description of the action taken by the system when the condition that caused this exception was - * detected. - * - * @return systemAction String - */ - public String getSystemAction() { - return systemAction; - } - - - /** - * Returns instructions of how to resolve the issue reported in this exception. - * - * @return userAction String - */ - public String getUserAction() { - return userAction; - } -} diff --git a/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle b/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle index e03696c181d..b89e096aa8d 100644 --- a/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle +++ b/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle @@ -60,7 +60,6 @@ dependencies { runtimeOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-spring') runtimeOnly project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-spring') runtimeOnly project(':open-metadata-implementation:access-services:analytics-modeling:analytics-modeling-spring') - runtimeOnly project(':open-metadata-implementation:access-services:information-view:information-view-spring') runtimeOnly project(':open-metadata-implementation:access-services:subject-area:subject-area-spring') runtimeOnly project(':open-metadata-implementation:access-services:data-engine:data-engine-spring') runtimeOnly project(':open-metadata-implementation:access-services:glossary-view:glossary-view-spring') diff --git a/open-metadata-implementation/server-chassis/server-chassis-spring/pom.xml b/open-metadata-implementation/server-chassis/server-chassis-spring/pom.xml index bc7fedb9c61..3775d81cb49 100644 --- a/open-metadata-implementation/server-chassis/server-chassis-spring/pom.xml +++ b/open-metadata-implementation/server-chassis/server-chassis-spring/pom.xml @@ -262,12 +262,6 @@ runtime - - org.odpi.egeria - information-view-spring - runtime - - org.odpi.egeria subject-area-spring @@ -655,12 +649,6 @@ runtime - - org.odpi.egeria - information-view-spring - runtime - - org.odpi.egeria subject-area-spring diff --git a/open-metadata-publication/website/connector-catalog/README.md b/open-metadata-publication/website/connector-catalog/README.md index 7bec8340045..48aa5d5178c 100644 --- a/open-metadata-publication/website/connector-catalog/README.md +++ b/open-metadata-publication/website/connector-catalog/README.md @@ -67,10 +67,6 @@ The security integration connectors run in the [Security Integrator Open Metadata Integration Service (OMIS)](../../../open-metadata-implementation/integration-services/security-integrator) hosted in the [Integration Daemon](../../../open-metadata-implementation/admin-services/docs/concepts/integration-daemon.md). -* The [Apache Ranger Integration Connector](../../../open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector) - pushes assets and schemas marked up with tags and labels from the SecurityTag classification to Apache Ranger - to use in security enforcement policies. - ### Open Discovery Services [Open Discovery Services](../../../open-metadata-implementation/frameworks/open-discovery-framework/docs/discovery-service.md) @@ -218,11 +214,6 @@ and services in the digital landscape along with stored metadata from Egeria. ### Databases - -* The [Gaian connector](../../../open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector) - provides a JDBC style connector to the [Gaian](https://github.com/gaiandb/gaiandb) virtualization engine. - - ---- * Learn how to [write your own connector](../developer-guide/what-is-a-connector.md) * Return to [Home Page](../../../index.md) diff --git a/open-metadata-publication/website/java-events/information-view-EMPSALANALYSIS.json b/open-metadata-publication/website/java-events/information-view-EMPSALANALYSIS.json deleted file mode 100644 index 9b18407c0c0..00000000000 --- a/open-metadata-publication/website/java-events/information-view-EMPSALANALYSIS.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "class": "InformationViewEvent", - "eventVersionId": 1, - "tableSource": { - "class": "TableSource", - "@id": 1, - "name": "LTT_{{host}}_DB2CONNECTOR_{{database}}_DB2INST1_EMPSALARYANALYSIS", - "schemaName": "GAIANDB", - "databaseSource": { - "class": "DatabaseSource", - "@id": 2, - "name": "gaiandb", - "endpointSource": { - "class": "EndpointSource", - "@id": 3, - "networkAddress": "{{virtualserver}}:{{port}}", - "protocol": "jdbc:derby://", - "connectorProviderName": "GaianOCFConnectorProvider", - "user": "gaiandb" - } - } - }, - "originalTableSource": { - "class": "TableSource", - "@id": 4, - "guid": "b1c497ce.54bd3a08.0v9mgsb2t.fae21gd.ehu9t3.egljqf3hf176clmuugvlc", - "name": "EMPSALARYANALYSIS", - "schemaName": "DB2INST1", - "databaseSource": { - "class": "DatabaseSource", - "@id": 5, - "guid": "b1c497ce.6e83759b.0v9mgsb2t.fauo7tn.0vv57r.miqdq9fqjod6vnco6jfep", - "name": "{{database}}", - "endpointSource": { - "class": "EndpointSource", - "@id": 6, - "networkAddress": "{{host}}", - "protocol": "", - "connectorProviderName": "DB2Connector" - } - } - }, - "derivedColumns": [ - { - "name": "STATE", - "position": 20, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faunv1i.4jppgp.vcpqhhv5aub9uk5thtugp", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=STATE", - "name": "STATE", - "position": 20, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263phfe.hdcsrms.095jod.69a74ckl4hrfodcsgeu2d", - "name": "State", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=State" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "EMPSTATUS", - "position": 4, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadq4s6.5vn3hu.ehqs5908s76ig6cn8ho6g", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=EMPSTATUS", - "name": "EMPSTATUS", - "position": 4, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pfrb.66t5p8c.jk5353.69k7s3u2do49odaavci58", - "name": "Employee Status", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Employee Status represents current various status that an employee could have. Possible values: 1=Student; 2=Temporary-Assignment; 3=Board-Advisor; 4=Sabbatical; 5=Executive; 6=Part-Time-Perm; 7=Full-Time-Perm; 8=Left; 9=Retired; 10=DIS", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Employee Status" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "TAXP", - "position": 22, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadoft6.jdu07h.62mt3l35mh6qmt0lcufbv", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=TAXP", - "name": "TAXP", - "position": 22, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263phg8.gdtncls.audklp.e6or1vj80e3j7mgaqignr", - "name": "Tax State", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Tax State" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "ETYPE", - "position": 14, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faumqom.cmk73d.kvmc6iu48vo50ce1kbbq9", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=ETYPE", - "name": "ETYPE", - "position": 14, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263ph2k.b6kb0d8.k164b7.5g8ghnulmmemam4b7btsj", - "name": "Employee Contract Type", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Type of contract an employee could have. Possible contract type: Full-time, Part-time, Contractor", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Employee Contract Type" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "PNUM", - "position": 7, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faulfq7.tkbfgm.6fbbj8aa4mndhv6m7am9h", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=PNUM", - "name": "PNUM", - "position": 7, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pfur.m0g2a5b.l5676h.5imorjcftp26mv2rr93bp", - "name": "Employee Contract Number", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Employee Contract Number" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "CITY", - "position": 19, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faupbhh.4smid0.dn0qo64271l1rujkaevk5", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=CITY", - "name": "CITY", - "position": 19, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263shfh.q2hgvt3.4pqkpm.ok2o0md4t43u9do004b2v", - "name": "City", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=City" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "LVL", - "position": 9, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fauclef.b3r0s7.2s7dhdj63jngdm5ncq0ke", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=LVL", - "name": "LVL", - "position": 9, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pgh3.t31gl2q.lmuj3g.l1serkqbms76e5v8n8mes", - "name": "Job Level", - "query": "", - "description": "Job Level term identifies job level within the enterprise. Job level is from 1-9. This term is assigned to each employee.", - "abbreviation": "", - "usage": "", - "summary": "Job Level term identifies job level within the enterprise. Job level is from 1-9.", - "examples": "3", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Job Level" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "SERVICE", - "position": 3, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fado77p.i6th9j.o3t43nhabllf2j4rk9dtv", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=SERVICE", - "name": "SERVICE", - "position": 3, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pfjd.mdc3fge.hf83cl.cbijntvurs6875rtm5lig", - "name": "Years of Service", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Number of years employee worked in the company", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Years of Service" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "DEPT", - "position": 8, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faufqa8.9hehhu.0gsugkble3n4p6d4u8bhu", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=DEPT", - "name": "DEPT", - "position": 8, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pfv9.8dicae6.ms2vnv.944jep7aa2u7e0epjv35l", - "name": "Department Code", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Department Code" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "SALARY", - "position": 15, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faukjnj.4qgokh.g9hrt8eda46sviignl9ch", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=SALARY", - "name": "SALARY", - "position": 15, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263ph4a.8t5bomo.aqcege.rpl6gvjifgv1d8gh5labg", - "name": "Annual Salary", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Annual Salary" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "LNAME", - "position": 6, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fae4i6o.nsr6t8.oqmvd16tnlq9noldb0lq2", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=LNAME", - "name": "LNAME", - "position": 6, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.54865omgq.rfvlanh.nnt92o.b897ae4a46b6lji08q04c", - "name": "Last Name", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Last Name" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "LOCCODE", - "position": 11, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faur05l.8eu177.jt0tvm73e3c1ipu509aml", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=LOCCODE", - "name": "LOCCODE", - "position": 11, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pglu.ihrkrvh.kahplb.55jqueu08g5ssav2fpsqn", - "name": "Location Identifier", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Location Identifier" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "FNAME", - "position": 5, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faupu79.n0bc2c.plrlifbkvqlvu4q5atbt5", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=FNAME", - "name": "FNAME", - "position": 5, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.54865omh1.pco9ecb.c3g5f1.pfvf6bdv95dnc67jq2jli", - "name": "First Name", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=First Name" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "BONUS", - "position": 16, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fadue7h.1773qq.bgf1nnglkv2j42jlnrs7o", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=BONUS", - "name": "BONUS", - "position": 16, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263ph59.aqte17n.28ed5t.81mkudrsucorsqicli64s", - "name": "Discretionary Bonus", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Discretionary Bonus" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "STREET", - "position": 18, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fauqp0r.jqrvpc.6bo5obcmp33g86iegdc0l", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=STREET", - "name": "STREET", - "position": 18, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263ph63.beh4unk.9jn1qm.db96h9bqgj8gkjoj7qhh6", - "name": "Street", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Street" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "ROLE", - "position": 13, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.faujk0j.vo6mtu.o7rj13grce3n6kve8qhf1", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=ROLE", - "name": "ROLE", - "position": 13, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263pgul.jam2g2s.qlr9u8.b9ei1dc60fgnhvs533pvs", - "name": "Job Category", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "Official role name", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Job Category" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - { - "name": "TAX", - "position": 21, - "sourceColumn": { - "guid": "b1c497ce.60641b50.0v9mgsb2t.fae2l73.kcrel9.qck1a90qoi4ign883l4rc", - "qualifiedName": "(host_(engine))={{host}}::(database)={{database}}::(database_schema)=DB2INST1::(database_table)=EMPSALARYANALYSIS::(database_column)=TAX", - "name": "TAX", - "position": 21, - "businessTerm": { - "guid": "6662c0f2.e1b1ec6c.00263phfr.a3taqob.ppkdqn.gh65gtku5c3qt5mgfpug3", - "name": "Tax Status", - "query": "", - "description": "", - "abbreviation": "", - "usage": "", - "summary": "", - "examples": "", - "qualifiedName": "(category)=Coco Pharmaceuticals::(category)=Terms::(term)=Tax Status" - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - }, - "isUnique": false, - "isPrimaryKey": false, - "isNullable": false - } - ] -} diff --git a/open-metadata-publication/website/open-metadata-glossary.md b/open-metadata-publication/website/open-metadata-glossary.md index c040b6a7aa2..b2632531e2c 100644 --- a/open-metadata-publication/website/open-metadata-glossary.md +++ b/open-metadata-publication/website/open-metadata-glossary.md @@ -92,7 +92,6 @@ ## I * [Informal Tag](../../open-metadata-implementation/access-services/docs/concepts/attachments/informal-tags.md) -* [Information View OMAS](../../open-metadata-implementation/access-services/information-view) * [Instance Security](../../open-metadata-implementation/common-services/metadata-security) * Instances * [Metadata Instances](../../open-metadata-implementation/repository-services/docs/metadata-instances.md) diff --git a/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/Dockerfile b/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/Dockerfile deleted file mode 100644 index b5cd07792ed..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Egeria project -ARG REGISTRY=registry-1.docker.io -ARG REPO=odpi -FROM $REGISTRY/$REPO/apache-atlas:build AS build -FROM openjdk:8-jdk-alpine - -LABEL org.label-schema.schema-version = "1.0" -LABEL org.label-schema.vendor = "ODPi" -LABEL org.label-schema.name = "apache-atlas" -LABEL org.label-schema.description = "Apache Atlas image to support ODPi Egeria demonstrations." -LABEL org.label-schema.url = "https://egeria.odpi.org/open-metadata-resources/open-metadata-deployment/" -LABEL org.label-schema.vcs-url = "https://github.com/odpi/egeria/tree/master/open-metadata-resources/open-metadata-deployment/docker/apache-atlas" -LABEL org.label-schema.docker.cmd = "docker run -d -p 21000:21000 odpi/apache-atlas" -LABEL org.label-schema.docker.debug = "docker exec -it $CONTAINER /bin/sh" - -ENV JAVA_TOOL_OPTIONS="-Xmx1024m" \ - HBASE_CONF_DIR="/opt/apache/atlas/hbase/conf" \ - ATLAS_OPTS="-Dkafka.advertised.hostname=localhost" - -RUN apk --no-cache add python bash shadow && \ - apk --no-cache update && \ - apk --no-cache upgrade && \ - groupadd -r atlas -g 21000 && \ - useradd --no-log-init -r -g atlas -u 21000 -d /opt/apache/atlas atlas - -COPY --from=build --chown=atlas:atlas /opt/atlas-bin/ /opt/apache/atlas/ - -# Must use numeric userid here to meet k8s security checks -USER 21000:21000 - -WORKDIR /opt/apache/atlas -RUN sed -i "s|^atlas.graph.storage.lock.wait-time=10000|atlas.graph.storage.lock.wait-time=200|g" conf/atlas-application.properties && \ - echo "atlas.notification.relationships.enabled=true" >> conf/atlas-application.properties && \ - echo "atlas.kafka.listeners=PLAINTEXT://:9027" >> conf/atlas-application.properties && \ - echo "atlas.kafka.advertised.listeners=PLAINTEXT://\${sys:kafka.advertised.hostname}:9027" >> conf/atlas-application.properties - -EXPOSE 9026 9027 21000 -ENTRYPOINT ["/bin/bash", "-c", "/opt/apache/atlas/bin/atlas_start.py; tail -fF /opt/apache/atlas/logs/atlas*.out"] diff --git a/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/README.md b/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/README.md deleted file mode 100644 index d76046a3767..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/README.md +++ /dev/null @@ -1,26 +0,0 @@ - - - -# apache-atlas - -Docker build script for Apache atlas - - - pulls latest apache atlas tar.gz directly from ftp.apache.org - - version 2.0.0 - -## Usage - - - switch into this directory - - docker build -f Docker.build -t odpi/apache-atlas:build . - - docker build -t apache-atlas . - -## Version change in build image - -If atlas verison other 2.0.0 -- docker build --build-arg atlas_version= -f Docker.build -t odpi/apache-atlas:build . - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/pom.xml deleted file mode 100644 index d744af1fe43..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/apache-atlas/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - open-metadata-docker - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker runtime image - Apache Atlas - - Apache Atlas runtime container image - - - open-metadata-docker-apache-atlas - - pom - - - false - - - - - - com.spotify - dockerfile-maven-plugin - - - runtime-image-build - package - - build - - - Dockerfile - - ${docker.registry} - ${docker.repo} - - latest - - - - tag-version - install - - tag - - - ${apache.atlas.version} - - - - push-latest - install - - push - - - latest - - - - push-version - install - - push - - - ${apache.atlas.version} - - - - - ${docker.registry}/${docker.repo}/apache-atlas - - - - - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/Dockerfile b/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/Dockerfile deleted file mode 100644 index f8b5d14262a..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Egeria project -ARG REGISTRY=registry-1.docker.io -ARG REPO=odpi -FROM $REGISTRY/$REPO/apache-ranger:build AS build -FROM openjdk:8-jdk-alpine - -LABEL org.label-schema.schema-version = "1.0" -LABEL org.label-schema.vendor = "ODPi" -LABEL org.label-schema.name = "apache-ranger-admin" -LABEL org.label-schema.description = "Apache Ranger administration server, for use as part of ODPi Egeria Virtual Data Connector demonstrations." -LABEL org.label-schema.url = "https://egeria.odpi.org/open-metadata-resources/open-metadata-deployment/" -LABEL org.label-schema.vcs-url = "https://github.com/odpi/egeria/tree/master/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin" -LABEL org.label-schema.docker.cmd = "docker run -d -p 6080:6080 -p 6182:6182 -p 6083:6083 -p 6183:6183 -e PGUSER=postgres -e PGPASSWORD=passw0rd -e PGHOST=host -e RANGER_PASSWORD=admin999 odpi/apache-ranger-admin" -LABEL org.label-schema.docker.debug = "docker exec -it $CONTAINER /bin/sh" -LABEL org.label-schema.docker.params = "PGUSER=postgres user,PGPASSWORD=postgres password,PGHOST=postgres host,RANGER_PASSWORD=password to init for ranger admin user" - -RUN apk --no-cache add python bash java-postgresql-jdbc bc shadow procps && \ - apk --no-cache update && \ - apk --no-cache upgrade && \ - groupadd -r ranger -g 6080 && \ - useradd --no-log-init -r -g ranger -u 6080 -d /opt/apache/ranger-admin ranger && \ - groupadd -r solr -g 6083 && \ - useradd --no-log-init -r -g solr -u 6083 -d /opt/solr solr && \ - mkdir -p /var/log/solr/ranger_audits && \ - chown solr:solr /var/log/solr/ranger_audits - -COPY --from=build --chown=ranger:ranger /opt/ranger-admin-bin/ /opt/apache/ranger-admin/ -COPY --from=build --chown=solr:solr /opt/solr/ /opt/solr/ - -WORKDIR /opt/apache/ranger-admin -RUN sed -i "s|^DB_FLAVOR=MYSQL|DB_FLAVOR=POSTGRES|g" install.properties && \ - sed -i "s|^SQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar|SQL_CONNECTOR_JAR=/usr/share/java/postgresql-jdbc.jar|g" install.properties && \ - sed -i "s|^audit_solr_urls=|audit_solr_urls=http://localhost:6083/solr/ranger_audits|g" install.properties - -EXPOSE 6080 6182 6083 6183 - -ENTRYPOINT ["/bin/bash", "-c", "/opt/apache/ranger-admin/ranger-admin-start.sh"] diff --git a/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/pom.xml deleted file mode 100644 index e428cbbb2d1..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/apache-ranger-admin/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - open-metadata-docker - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker runtime image - Apache Ranger (admin) - - Admin runtime container image for Apache Ranger - - - open-metadata-docker-ranger - - pom - - - false - - - - - - com.spotify - dockerfile-maven-plugin - - - runtime-image-build - package - - build - - - Dockerfile - - ${docker.registry} - ${docker.repo} - - latest - - - - tag-version - install - - tag - - - ${apache.ranger.version} - - - - push-latest - install - - push - - - latest - - - - push-version - install - - push - - - ${apache.ranger.version} - - - - - ${docker.registry}/${docker.repo}/apache-ranger-admin - - - - - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/Dockerfile b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/Dockerfile deleted file mode 100644 index 5979f591c69..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Egeria project - -FROM maven:3.6.3-openjdk-8 -ARG DOWNLOAD_SERVER="https://archive.apache.org/dist" -ARG ATLAS_VERSION=2.0.0 - -ENV ATLAS_URL="${DOWNLOAD_SERVER}/atlas/${ATLAS_VERSION}/apache-atlas-${ATLAS_VERSION}-sources.tar.gz" \ - ATLAS_KEYS="${DOWNLOAD_SERVER}/atlas/KEYS" \ - JAVA_TOOL_OPTIONS="-Xmx1024m" - -WORKDIR /opt - -# Pull down Apache Atlas and build it into /root/atlas-bin. -RUN set -e; \ - wget -nv "$ATLAS_URL" -O "apache-atlas-$ATLAS_VERSION.tar.gz" && \ - wget -nv "$ATLAS_URL.asc" -O "apache-atlas-$ATLAS_VERSION.tar.gz.asc" && \ - wget -nv "$ATLAS_KEYS" -O "atlas-KEYS" && \ - gpg --import atlas-KEYS && \ - gpg --verify apache-atlas-$ATLAS_VERSION.tar.gz.asc apache-atlas-$ATLAS_VERSION.tar.gz && \ - tar zxf apache-atlas-$ATLAS_VERSION.tar.gz - -WORKDIR /opt/apache-atlas-sources-$ATLAS_VERSION -COPY dist/settings.xml /root/.m2/settings.xml - -# Remove -DskipTests if unit tests are to be included -RUN mvn clean -DskipTests=true install && \ - mvn clean -DskipTests=true package -Pdist,embedded-hbase-solr && \ - mkdir -p /opt/atlas-bin && \ - tar zxf /opt/apache-atlas-sources-$ATLAS_VERSION/distro/target/*server.tar.gz --strip-components 1 -C /opt/atlas-bin diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/dist/settings.xml b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/dist/settings.xml deleted file mode 100644 index a948199b766..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/dist/settings.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - odpi - - - central - Maven Central - https://repo.maven.apache.org/maven2/ - - - odpi-snapshots - ODPi Snapshots - https://odpi.jfrog.io/odpi/egeria-snapshot/ - - - - - - - odpi - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/pom.xml deleted file mode 100644 index 30af39583db..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/atlas/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - open-metadata-docker-apache-build - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker build-time image - Apache Atlas - - Build image for Apache Atlas - - - open-metadata-docker-apache-atlas-build - - pom - - - false - - - - - - com.spotify - dockerfile-maven-plugin - - - base-image-build - package - - build - - - Dockerfile - - ${apache.atlas.version} - - ${docker.build.tag} - - - - tag-version - install - - tag - - - ${apache.atlas.version}-${docker.build.tag} - - - - push-build - install - - push - - - ${docker.build.tag} - - - - push-version - install - - push - - - ${apache.atlas.version}-${docker.build.tag} - - - - - ${docker.registry}/${docker.repo}/apache-atlas - - - - - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/pom.xml deleted file mode 100644 index 384ac63bcdb..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - open-metadata-docker-build - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker build-time images for Apache - - Build images for Apache projects - - - open-metadata-docker-apache-build - - pom - - - atlas - ranger - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/Dockerfile b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/Dockerfile deleted file mode 100644 index ee33885bd61..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Egeria project - -FROM maven:3.6.3-openjdk-8 -ARG DOWNLOAD_SERVER="https://archive.apache.org/dist" -ARG RANGER_VERSION=1.2.0 -ARG SOLR_VERSION=7.7.3 - -ENV RANGER_URL="${DOWNLOAD_SERVER}/ranger/${RANGER_VERSION}/apache-ranger-${RANGER_VERSION}.tar.gz" \ - RANGER_KEYS="${DOWNLOAD_SERVER}/ranger/KEYS" - -WORKDIR /opt - -# Pull down Apache Atlas and build it into /root/atlas-bin. -RUN set -e; \ - apt-get update && \ - apt-get install -y build-essential && \ - wget -nv "$RANGER_URL" -O "apache-ranger-$RANGER_VERSION.tar.gz" && \ - wget -nv "$RANGER_URL.asc" -O "apache-ranger-$RANGER_VERSION.tar.gz.asc" && \ - wget -nv "$RANGER_KEYS" -O "ranger-KEYS" && \ - gpg --import ranger-KEYS && \ - gpg --verify apache-ranger-$RANGER_VERSION.tar.gz.asc apache-ranger-$RANGER_VERSION.tar.gz && \ - tar zxf apache-ranger-$RANGER_VERSION.tar.gz - -WORKDIR /opt/apache-ranger-$RANGER_VERSION -COPY dist/settings.xml /root/.m2/settings.xml - -# Build everything -RUN mvn -Pall -DskipTests=true clean compile package install assembly:assembly - -# Package the admin portion -RUN mkdir -p /opt/ranger-admin-bin && \ - tar zxf /opt/apache-ranger-$RANGER_VERSION/target/ranger-*-admin.tar.gz --strip-components 1 -C /opt/ranger-admin-bin - -COPY dist/ranger-admin-start.sh /opt/ranger-admin-bin/ranger-admin-start.sh -RUN chmod 755 /opt/ranger-admin-bin/ranger-admin-start.sh - -# Configure and install Solr locally (for now) -WORKDIR /opt/ranger-admin-bin/contrib/solr_for_audit_setup -RUN sed -i 's|SOLR_INSTALL=false|SOLR_INSTALL=true|' install.properties && \ - sed -i "s|SOLR_DOWNLOAD_URL=|SOLR_DOWNLOAD_URL=http://www.mirrorservice.org/sites/ftp.apache.org/lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz|" install.properties && \ - ./setup.sh && \ - sed -i 's|^SOLR_JAVA_HOME=|#SOLR_JAVA_HOME=|g' /opt/solr/ranger_audit_server/scripts/solr.in.sh diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/ranger-admin-start.sh b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/ranger-admin-start.sh deleted file mode 100644 index cf26c1d69b8..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/ranger-admin-start.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Egeria project. - -# Setup the configuration, as it seems only possible for Ranger to read it from 'install.properties' -sed -i "s|^db_root_user=root|db_root_user=${PGUSER}|g" "install.properties" -sed -i "s|^db_root_password=$|db_root_password=${PGPASSWORD}|g" "install.properties" -sed -i "s|^db_password=$|db_password=${PGPASSWORD}|g" "install.properties" -sed -i "s|^db_host=localhost|db_host=${PGHOST}:5432|g" "install.properties" -sed -i "s|^rangerAdmin_password=$|rangerAdmin_password=${RANGER_PASSWORD}|g" "install.properties" -sed -i "s|^rangerTagsync_password=$|rangerTagsync_password=${RANGER_PASSWORD}|g" "install.properties" -sed -i "s|^rangerUsersync_password=$|rangerUsersync_password=${RANGER_PASSWORD}|g" "install.properties" -sed -i "s|^keyadmin_password=$|keyadmin_password=${RANGER_PASSWORD}|g" "install.properties" - -# Run the Ranger setup (creation of database tables, directories, etc) -- needs to run as root -./setup.sh - -# Now let's start Solr (will start as 'solr') -/opt/solr/ranger_audit_server/scripts/start_solr.sh - -# And then Ranger itself (as 'ranger') -su -c "./ews/ranger-admin-services.sh start" ranger - -sleep 10 -tail -F ews/logs/*.log diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/settings.xml b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/settings.xml deleted file mode 100644 index a948199b766..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/dist/settings.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - odpi - - - central - Maven Central - https://repo.maven.apache.org/maven2/ - - - odpi-snapshots - ODPi Snapshots - https://odpi.jfrog.io/odpi/egeria-snapshot/ - - - - - - - odpi - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/pom.xml deleted file mode 100644 index 8cb2c538b41..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/apache/ranger/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - open-metadata-docker-apache-build - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker build-time image - Apache Ranger - - Build image for Apache Ranger - - - open-metadata-docker-apache-ranger-build - - pom - - - false - - - - - - com.spotify - dockerfile-maven-plugin - - - base-image-build - package - - build - - - Dockerfile - - ${apache.ranger.version} - ${apache.solr.version} - - ${docker.build.tag} - - - - tag-version - install - - tag - - - ${apache.ranger.version}-${docker.build.tag} - - - - push-build - install - - push - - - ${docker.build.tag} - - - - push-version - install - - push - - - ${apache.ranger.version}-${docker.build.tag} - - - - - ${docker.registry}/${docker.repo}/apache-ranger - - - - - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/build-images/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/build-images/pom.xml deleted file mode 100644 index d4f39185d8f..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/build-images/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - open-metadata-docker - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker build-time images - - Build images for Docker runtime images - - - open-metadata-docker-build - - pom - - apache - - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/gaian/Dockerfile b/open-metadata-resources/open-metadata-deployment/docker/gaian/Dockerfile deleted file mode 100644 index 5d4d8dd6714..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/gaian/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Egeria project. - -FROM openjdk:8-jre-alpine - -LABEL org.label-schema.schema-version = "1.0" -LABEL org.label-schema.vendor = "ODPi" -LABEL org.label-schema.name = "gaian-egeriavdc" -LABEL org.label-schema.description = "Image containing Gaian (https://github.com/gaiandb/gaiandb) for use in ODPi Egeria Virtual Data Connector demonstration." -LABEL org.label-schema.url = "https://egeria.odpi.org/open-metadata-resources/open-metadata-deployment/" -LABEL org.label-schema.vcs-url = "https://github.com/odpi/egeria/tree/master/open-metadata-resources/open-metadata-deployment/docker/gaian" -LABEL org.label-schema.docker.cmd = "docker run -d -p 6414:6414 odpi/gaian-egeriavdc" -LABEL org.label-schema.docker.debug = "docker exec -it $CONTAINER /bin/sh" - -# Working directory -WORKDIR /root/gaian -RUN wget https://github.com/gaiandb/gaiandb/blob/master/build/GAIANDB_V2.1.8_20160523.zip?raw=true -O GAIANDB.zip -RUN unzip GAIANDB.zip -RUN apk --no-cache add bash && apk --no-cache update && apk --no-cache upgrade - -EXPOSE 6414 - -CMD ["/bin/bash", "-c", "/root/gaian/launchGaianServer.sh"] diff --git a/open-metadata-resources/open-metadata-deployment/docker/gaian/README.md b/open-metadata-resources/open-metadata-deployment/docker/gaian/README.md deleted file mode 100644 index 8208edea875..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/gaian/README.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# gaian - -Docker build script for Gaian - - pulls latest gaian zip directly from github (binary) - - unpacks & creates a launch script to start the server - - no storage defined - -## Usage - - - switch into this directory - - docker build -t gaian-egeriavdc:0.1.0 . - -## Publishing the build - -As the build process is refined, this will be automated & use a more -egeria-centric id. - - - docker login - - {enter credentials} - - docker tag gaian-egeriavdc:0.1.0 planetf1/gaian-egeriavdc:0.1.0 - - docker push planetf1/gaian-egeriavdc:0.1.0 - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-resources/open-metadata-deployment/docker/gaian/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/gaian/pom.xml deleted file mode 100644 index 3e3ec470500..00000000000 --- a/open-metadata-resources/open-metadata-deployment/docker/gaian/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - open-metadata-docker - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Docker image - Gaian - - Samples, Helm charts to deploy Egeria and associated components such as docker image build scripts - - - open-metadata-docker-gaian - - pom - - - - - com.spotify - dockerfile-maven-plugin - - - build-and-tag-latest - install - - build - - - - tag-version - install - - tag - - - ${project.version} - - - - push-latest - install - - push - - - latest - - - - push-version - install - - push - - - ${project.version} - - - - - ${docker.registry}/${docker.repo}/gaian-egeriavdc - - - - - - - diff --git a/open-metadata-resources/open-metadata-deployment/docker/pom.xml b/open-metadata-resources/open-metadata-deployment/docker/pom.xml index dc47ba8086f..f6c7d2b9cf5 100644 --- a/open-metadata-resources/open-metadata-deployment/docker/pom.xml +++ b/open-metadata-resources/open-metadata-deployment/docker/pom.xml @@ -35,9 +35,6 @@ ${docker.repo} build true - 2.0.0 - 1.2.0 - 8.5.1 @@ -92,10 +89,7 @@ - build-images - apache-atlas - apache-ranger-admin - gaian + diff --git a/pom.xml b/pom.xml index df09ae4192f..6391c372ea4 100644 --- a/pom.xml +++ b/pom.xml @@ -184,11 +184,7 @@ 2.0.1.Final 1.3.5 2.3.1 - 2.1.8 1.10.2 - 10.8.3.1 - 2.9.2 - 1.2.0 3.3.0 2.3.2 8.4.1 @@ -273,9 +269,6 @@ **/generated/** **/generated/** - https://github.com/gaiandb/gaiandb/blob/master/build/GAIANDB_V2.1.8_20160523.zip?raw=true - - @@ -331,13 +324,6 @@ ${h2-database.version} - - com.ibm.gaiandb - gaian - provided - ${gaian.version} - - org.apache.avro avro @@ -432,20 +418,6 @@ ${commons-lang.version} - - org.apache.derby - derby - provided - 10.8.3.1 - - - - org.apache.hadoop - hadoop-common - compile - ${hadoop.version} - - org.apache.kafka kafka-clients @@ -453,13 +425,6 @@ ${kafka.version} - - org.apache.ranger - ranger-plugins-common - compile - ${ranger.version} - - org.apache.tinkerpop gremlin-core @@ -1681,35 +1646,6 @@ ${open-metadata.version} - - - org.odpi.egeria - information-view-api - compile - ${open-metadata.version} - - - - org.odpi.egeria - information-view-client - compile - ${open-metadata.version} - - - - org.odpi.egeria - information-view-server - compile - ${open-metadata.version} - - - - org.odpi.egeria - information-view-spring - runtime - ${open-metadata.version} - - org.odpi.egeria inmemory-open-metadata-topic-connector @@ -2109,13 +2045,6 @@ ${open-metadata.version} - - org.odpi.egeria - ranger-connector - compile - ${open-metadata.version} - - org.odpi.egeria readonly-repository-connector @@ -2571,13 +2500,6 @@ ${open-metadata.version} - - org.odpi.egeria - virtualization-services-api - compile - ${open-metadata.version} - - org.odpi.egeria server-chassis-spring @@ -3822,101 +3744,7 @@ - - thirdPartyLocalRepo - - - !skipThirdPartyLocalRepo - - - - - - - com.googlecode.maven-download-plugin - download-maven-plugin - false - - - initialize - - wget - - - - ${gaiandb.url} - - GAIANDB_V2.1.8_20160523.zip - ${project.build.directory} - - - - - - org.apache.maven.plugins - maven-antrun-plugin - false - - - initialize - - - - - - - - - - - - run - - - - - - org.apache.maven.plugins - maven-install-plugin - false - - - install-derby - initialize - - org.apache.derby - derby - ${derby.version} - jar - ${project.build.directory}/lib/derby.jar - true - - - install-file - - - - install-gaian - initialize - - com.ibm.gaiandb - gaian - ${gaian.version} - jar - ${project.build.directory}/lib/GAIANDB.jar - true - - - install-file - - - - - - - dist-github diff --git a/settings.gradle b/settings.gradle index da8b3826980..e2cfd6f04fd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -44,8 +44,6 @@ include(':open-metadata-implementation:adapters:open-connectors:repository-servi include(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-file-connector') include(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors') include(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors') -//TODO: gaian removed - convert to integration connector -//include(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:gaian-connector') include(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:basic-file-connector') include(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:csv-file-connector') include(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:avro-file-connector') @@ -57,8 +55,6 @@ include(':open-metadata-implementation:adapters:open-connectors:integration-conn include(':open-metadata-implementation:adapters:open-connectors:integration-connectors') // todo - convert to integration connectors and governance action connectors //include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:view-generator-connectors') -//include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-sync-connectors:ranger-connector') -//include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-sync-connectors') //include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-officer-connectors:security-officer-tag-connector') //include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-officer-connectors') //include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:data-platform-connectors:cassandra-metadata-extractor-connector') @@ -77,12 +73,8 @@ include(':open-metadata-implementation:adapters:open-connectors:rest-client-conn include(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors') include(':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory') include(':open-metadata-implementation:adapters:open-connectors') -//TODO: gaian ranger plugin removed -//include(':open-metadata-implementation:adapters:governance-engines-plugins:gaian-ranger-plugin') include(':open-metadata-implementation:adapters:governance-engines-plugins') include(':open-metadata-implementation:adapters:authentication-plugins:http-helper') -//TODO: gaian removed -//include(':open-metadata-implementation:adapters:authentication-plugins:gaian-impersonation') include(':open-metadata-implementation:adapters:authentication-plugins') include(':open-metadata-implementation:adapters') include(':open-metadata-implementation:common-services:ffdc-services') @@ -203,11 +195,6 @@ include(':open-metadata-implementation:access-services:governance-program:govern include(':open-metadata-implementation:access-services:governance-program:governance-program-server') include(':open-metadata-implementation:access-services:governance-program:governance-program-spring') include(':open-metadata-implementation:access-services:governance-program') -include(':open-metadata-implementation:access-services:information-view:information-view-client') -include(':open-metadata-implementation:access-services:information-view:information-view-server') -include(':open-metadata-implementation:access-services:information-view:information-view-spring') -include(':open-metadata-implementation:access-services:information-view:information-view-api') -include(':open-metadata-implementation:access-services:information-view') include(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-api') include(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-client') include(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-server') @@ -296,8 +283,6 @@ include(':open-metadata-implementation:governance-servers:open-lineage-services: include(':open-metadata-implementation:governance-servers:open-lineage-services:open-lineage-services-spring') include(':open-metadata-implementation:governance-servers:open-lineage-services') //Todo: convert to integration connector -//include(':open-metadata-implementation:governance-servers:virtualization-services:virtualization-services-api') -//include(':open-metadata-implementation:governance-servers:virtualization-services') include(':open-metadata-implementation:governance-servers:data-engine-proxy-services:data-engine-proxy-services-server') include(':open-metadata-implementation:governance-servers:data-engine-proxy-services:data-engine-proxy-connector') include(':open-metadata-implementation:governance-servers:data-engine-proxy-services') @@ -432,8 +417,6 @@ project(':open-metadata-implementation:adapters:open-connectors:repository-servi project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-file-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-file-connector') project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors') project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/repository-services-connectors') -//TODO: gaian removed -//project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:gaian-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/data-store-connectors/gaian-connector') project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:basic-file-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/basic-file-connector') project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:csv-file-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector') project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:avro-file-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/avro-file-connector') @@ -445,8 +428,6 @@ project(':open-metadata-implementation:adapters:open-connectors:integration-conn project(':open-metadata-implementation:adapters:open-connectors:integration-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/integration-connectors') // todo convert to integration connectors and governance action connectors //project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:view-generator-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/view-generator-connectors') -//project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-sync-connectors:ranger-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors/ranger-connector') -//project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-sync-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-sync-connectors') //project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-officer-connectors:security-officer-tag-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-officer-connectors/security-officer-tag-connector') //project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:security-officer-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/security-officer-connectors') //project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:data-platform-connectors:cassandra-metadata-extractor-connector').projectDir = file('open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/data-platform-connectors/cassandra-metadata-extractor-connector') @@ -465,12 +446,8 @@ project(':open-metadata-implementation:adapters:open-connectors:rest-client-conn project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/rest-client-connectors') project(':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory').projectDir = file('open-metadata-implementation/adapters/open-connectors/connector-configuration-factory') project(':open-metadata-implementation:adapters:open-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors') -//TODO: Gaian ranger plugin removed -//project(':open-metadata-implementation:adapters:governance-engines-plugins:gaian-ranger-plugin').projectDir = file('open-metadata-implementation/adapters/governance-engines-plugins/gaian-ranger-plugin') project(':open-metadata-implementation:adapters:governance-engines-plugins').projectDir = file('open-metadata-implementation/adapters/governance-engines-plugins') project(':open-metadata-implementation:adapters:authentication-plugins:http-helper').projectDir = file('open-metadata-implementation/adapters/authentication-plugins/http-helper') -//TODO: gaian removed -//project(':open-metadata-implementation:adapters:authentication-plugins:gaian-impersonation').projectDir = file('open-metadata-implementation/adapters/authentication-plugins/gaian-impersonation') project(':open-metadata-implementation:adapters:authentication-plugins').projectDir = file('open-metadata-implementation/adapters/authentication-plugins') project(':open-metadata-implementation:adapters').projectDir = file('open-metadata-implementation/adapters') project(':open-metadata-implementation:common-services:ffdc-services').projectDir = file('open-metadata-implementation/common-services/ffdc-services') @@ -582,11 +559,6 @@ project(':open-metadata-implementation:access-services:governance-program:govern project(':open-metadata-implementation:access-services:governance-program:governance-program-server').projectDir = file('open-metadata-implementation/access-services/governance-program/governance-program-server') project(':open-metadata-implementation:access-services:governance-program:governance-program-spring').projectDir = file('open-metadata-implementation/access-services/governance-program/governance-program-spring') project(':open-metadata-implementation:access-services:governance-program').projectDir = file('open-metadata-implementation/access-services/governance-program') -project(':open-metadata-implementation:access-services:information-view:information-view-client').projectDir = file('open-metadata-implementation/access-services/information-view/information-view-client') -project(':open-metadata-implementation:access-services:information-view:information-view-server').projectDir = file('open-metadata-implementation/access-services/information-view/information-view-server') -project(':open-metadata-implementation:access-services:information-view:information-view-spring').projectDir = file('open-metadata-implementation/access-services/information-view/information-view-spring') -project(':open-metadata-implementation:access-services:information-view:information-view-api').projectDir = file('open-metadata-implementation/access-services/information-view/information-view-api') -project(':open-metadata-implementation:access-services:information-view').projectDir = file('open-metadata-implementation/access-services/information-view') project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-api').projectDir = file('open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api') project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-client').projectDir = file('open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client') project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-server').projectDir = file('open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server') @@ -717,8 +689,6 @@ project(':open-metadata-implementation:governance-servers:open-lineage-services: project(':open-metadata-implementation:governance-servers:open-lineage-services:open-lineage-services-spring').projectDir = file('open-metadata-implementation/governance-servers/open-lineage-services/open-lineage-services-spring') project(':open-metadata-implementation:governance-servers:open-lineage-services').projectDir = file('open-metadata-implementation/governance-servers/open-lineage-services') // todo convert to governance action connector -//project(':open-metadata-implementation:governance-servers:virtualization-services:virtualization-services-api').projectDir = file('open-metadata-implementation/governance-servers/virtualization-services/virtualization-services-api') -//project(':open-metadata-implementation:governance-servers:virtualization-services').projectDir = file('open-metadata-implementation/governance-servers/virtualization-services') project(':open-metadata-implementation:governance-servers:data-engine-proxy-services:data-engine-proxy-services-server').projectDir = file('open-metadata-implementation/governance-servers/data-engine-proxy-services/data-engine-proxy-services-server') project(':open-metadata-implementation:governance-servers:data-engine-proxy-services:data-engine-proxy-connector').projectDir = file('open-metadata-implementation/governance-servers/data-engine-proxy-services/data-engine-proxy-connector') project(':open-metadata-implementation:governance-servers:data-engine-proxy-services').projectDir = file('open-metadata-implementation/governance-servers/data-engine-proxy-services') From da166e104c9dc7a9c925df4f65af4744dbba9a42 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Thu, 3 Jun 2021 21:50:57 +0100 Subject: [PATCH 02/10] #458 further removals of security sync etc Signed-off-by: Nigel Jones --- .../governance-daemon-connectors/README.md | 23 +---------- .../properties/OMAGServerConfig.java | 28 +------------ .../AccessServiceDescription.java | 6 +++ .../classifier/ServerTypeClassifier.java | 8 ---- .../governance-servers/docs/README.md | 2 - .../security-sync-services/README.md | 16 -------- .../security-sync-services/pom.xml | 40 ------------------- .../security-sync-services-api/README.md | 16 -------- .../security-sync-services-api/build.gradle | 11 ----- .../security-sync-services-api/pom.xml | 37 ----------------- .../website/open-metadata-glossary.md | 2 - 11 files changed, 8 insertions(+), 181 deletions(-) delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/README.md delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/pom.xml delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/README.md delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/build.gradle delete mode 100644 open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/pom.xml diff --git a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md index 3f7a3078f36..1dbffee2665 100644 --- a/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md +++ b/open-metadata-implementation/adapters/open-connectors/governance-daemon-connectors/README.md @@ -28,28 +28,7 @@ information about the data assets they host. * These connectors will become Database Integration Connectors for the [Database Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/database-integrator) running in the Integration Daemon. - -* **[security-officer-connectors](security-officer-connectors)** provide plugins to the -[Security Officer Server](../../../admin-services/docs/concepts/security-officer-server.md) -to allow the [Security Officer Services](../../../governance-servers/security-officer-services) -to set up security classifications on data assets. - - * These connectors will become [Governance Action Services](../../../frameworks/governance-action-framework/docs/governance-action-service.md) - managed by the [Governance Action Open Metadata Engine Service (OMES)](../../../engine-services/governance-action) - running in the Engine Host. - -* **[security-sync-connectors](security-sync-connectors)** provide plugins to the -[Security Sync Server](../../../admin-services/docs/concepts/security-sync-server.md) -to synchronize classifications, user information and governance definitions -with security enforcement points. - - * These connectors will become Security Integration Connectors for the - [Security Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/security-integrator) - running in the Integration Daemon. - - * These connectors will become Database Integration Connectors for the - [Database Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/database-integrator) - running in the Integration Daemon. + ---- * Return to the [open-connectors](..) module. diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java index 6c7a3c94986..b8058da6fe8 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/OMAGServerConfig.java @@ -109,7 +109,6 @@ public class OMAGServerConfig extends AdminServicesConfigHeader private EngineHostServicesConfig engineHostServicesConfig = null; private OpenLineageServerConfig openLineageServerConfig = null; private StewardshipEngineServicesConfig stewardshipEngineServicesConfig = null; - private SecurityOfficerConfig securityOfficerConfig = null; private DataEngineProxyConfig dataEngineProxyConfig = null; private DataPlatformServicesConfig dataPlatformServicesConfig = null; private List auditTrail = null; @@ -156,7 +155,6 @@ public OMAGServerConfig(OMAGServerConfig template) dataEngineProxyConfig = template.getDataEngineProxyConfig(); discoveryEngineServicesConfig = template.getDiscoveryEngineServicesConfig(); stewardshipEngineServicesConfig = template.getStewardshipEngineServicesConfig(); - securityOfficerConfig = template.getSecurityOfficerConfig(); dataPlatformServicesConfig = template.getDataPlatformServicesConfig(); auditTrail = template.getAuditTrail(); } @@ -635,28 +633,6 @@ public void setStewardshipEngineServicesConfig(StewardshipEngineServicesConfig s } - /** - * Return the configuration for the security officer services. - * - * @return SecurityOfficerConfig properties - */ - @Deprecated - public SecurityOfficerConfig getSecurityOfficerConfig() - { - return securityOfficerConfig; - } - - /** - * Set up the configuration for the security officer services. - * - * @param securityOfficerConfig SecurityOfficerConfig properties - */ - @Deprecated - public void setSecurityOfficerConfig(SecurityOfficerConfig securityOfficerConfig) - { - this.securityOfficerConfig = securityOfficerConfig; - } - /** * Return the configuration for the data platform services. * @@ -731,7 +707,6 @@ public String toString() ", discoveryEngineServicesConfig=" + discoveryEngineServicesConfig + ", openLineageServerConfig=" + openLineageServerConfig + ", stewardshipEngineServicesConfig=" + stewardshipEngineServicesConfig + - ", securityOfficerConfig=" + securityOfficerConfig + ", dataEngineProxyConfig=" + dataEngineProxyConfig + ", dataPlatformServicesConfig=" + dataPlatformServicesConfig + ", auditTrail=" + auditTrail + @@ -777,7 +752,6 @@ public boolean equals(Object objectToCompare) Objects.equals(getDiscoveryEngineServicesConfig(), that.getDiscoveryEngineServicesConfig()) && Objects.equals(getOpenLineageServerConfig(), that.getOpenLineageServerConfig()) && Objects.equals(getStewardshipEngineServicesConfig(), that.getStewardshipEngineServicesConfig()) && - Objects.equals(getSecurityOfficerConfig(), that.getSecurityOfficerConfig()) && Objects.equals(getDataEngineProxyConfig(), that.getDataEngineProxyConfig()) && Objects.equals(getDataPlatformServicesConfig(), that.getDataPlatformServicesConfig()) && Objects.equals(getAuditTrail(), that.getAuditTrail()); @@ -798,7 +772,7 @@ public int hashCode() getAccessServicesConfig(), getIntegrationServicesConfig(), getEngineHostServicesConfig(), getViewServicesConfig(), getRepositoryServicesConfig(), getConformanceSuiteConfig(), getDiscoveryEngineServicesConfig(), getOpenLineageServerConfig(), - getStewardshipEngineServicesConfig(), getSecurityOfficerConfig(), + getStewardshipEngineServicesConfig(), getDataEngineProxyConfig(), getDataPlatformServicesConfig(), getAuditTrail()); } } diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java index e39eb6db6e9..297045da7c2 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/AccessServiceDescription.java @@ -141,6 +141,12 @@ public enum AccessServiceDescription implements Serializable "governance-program", "Manage the governance program", "https://egeria.odpi.org/open-metadata-implementation/access-services/governance-program/"), + INFORMATION_VIEW_OMAS (1014, + "Information View", + "Information View OMAS", + "information-view", + "Support information virtualization and data set definitions", + "https://egeria.odpi.org/open-metadata-implementation/access-services/information-view/"), PROJECT_MANAGEMENT_OMAS (1017, "Project Management", "Project Management OMAS", diff --git a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java index eda14908039..56866e06a68 100644 --- a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java +++ b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java @@ -426,14 +426,6 @@ private void validateConfigurationDocumentNotNull(String serverName, methodName); } - if (configurationDocument.getSecurityOfficerConfig() != null) - { - throw new OMAGInvalidParameterException(OMAGAdminErrorCode.OLD_CONFIGURATION.getMessageDefinition(serverName, - configurationDocument.getSecurityOfficerConfig().toString()), - this.getClass().getName(), - methodName); - } - if (configurationDocument.getStewardshipEngineServicesConfig() != null) { throw new OMAGInvalidParameterException(OMAGAdminErrorCode.OLD_CONFIGURATION.getMessageDefinition(serverName, diff --git a/open-metadata-implementation/governance-servers/docs/README.md b/open-metadata-implementation/governance-servers/docs/README.md index f537ba4aa29..fd9e3aae899 100644 --- a/open-metadata-implementation/governance-servers/docs/README.md +++ b/open-metadata-implementation/governance-servers/docs/README.md @@ -19,8 +19,6 @@ entirely by changes in metadata and the IT landscape. | Data Engine Proxy Server | Manages capture of metadata from a data engine. | [Data Engine Proxy Services](../data-engine-proxy-services) | [Data Engine OMAS](../../access-services/data-engine) | Yes | | Integration Daemon | Manages the capture of metadata through configured integration services. | [Integration Daemon Services](../integration-daemon-services) | Defined in each [integration service](../../integration-services) | Yes | | Open Lineage Server | Provides a historic reporting warehouse for lineage. | [Open Lineage Services](../open-lineage-services) | [Asset Lineage OMAS](../../access-services/asset-lineage) | No | -| Security Officer Server | Provide operational support for the security policies defined by the security officer. | [Security Officer Services](../security-officer-services) | [Security Officer OMAS](../../access-services/security-officer) | No | -| Security Synchronization Server | Keep security enforcement engines supplied with the latest metadata. | [Security Sync Services](../security-sync-services) | [Governance Engine OMAS](../../access-services/governance-engine) | Yes | ## Further information diff --git a/open-metadata-implementation/governance-servers/security-sync-services/README.md b/open-metadata-implementation/governance-servers/security-sync-services/README.md deleted file mode 100644 index 259234e009f..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -![Deprecated](../../../open-metadata-publication/website/images/egeria-content-status-deprecated.png#pagewidth) - -# Security Synchronization Services - -The security synchronization services are responsible for keeping a security -enforcement engine supplied with the latest metadata settings. - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-sync-services/pom.xml b/open-metadata-implementation/governance-servers/security-sync-services/pom.xml deleted file mode 100644 index 548fd1aa22a..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - governance-servers - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - Security Synchronization Services - - The security synchronization services support the configuration of a security enforcement engine. - - - security-sync-services - pom - - security-sync-services-api - security-sync-services-server - - - - - - - diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/README.md b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/README.md deleted file mode 100644 index c762df08063..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -# Security Synchronization Services API - -The security synchronization services API provides the property structures and -REST structures used to synchronize metadata with a security enforcement engine. - - - - - - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/build.gradle b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/build.gradle deleted file mode 100644 index f9249c499a9..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright Contributors to the ODPi Egeria project. - */ - - -description = 'Security Synchronization Services API' - -java { - withJavadocJar() -} diff --git a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/pom.xml b/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/pom.xml deleted file mode 100644 index aab6b2cba70..00000000000 --- a/open-metadata-implementation/governance-servers/security-sync-services/security-sync-services-api/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - security-sync-services - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - - Security Synchronization Services API - - Provides the definitions that make up the APIs used by external components when communicating - with the security synchronization services. - - - security-sync-services-api - - - - - - diff --git a/open-metadata-publication/website/open-metadata-glossary.md b/open-metadata-publication/website/open-metadata-glossary.md index b2632531e2c..1a7fa37a3ee 100644 --- a/open-metadata-publication/website/open-metadata-glossary.md +++ b/open-metadata-publication/website/open-metadata-glossary.md @@ -190,8 +190,6 @@ ## S * [Security](../../open-metadata-implementation/common-services/metadata-security) -* [Security Officer Server](../../open-metadata-implementation/admin-services/docs/concepts/security-officer-server.md) -* [Security Sync Server](../../open-metadata-implementation/admin-services/docs/concepts/security-sync-server.md) * [Server Capabilities](../../open-metadata-implementation/access-services/docs/concepts/server-capabilities) * [Server Chassis](../../open-metadata-implementation/server-chassis) * [Servers for Governance](../../open-metadata-implementation/governance-servers) From d06265f2e53ddc1eab3de7c23a6dcd54432f5839 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Thu, 3 Jun 2021 21:57:09 +0100 Subject: [PATCH 03/10] #458 remove empty governance engine plugins module Signed-off-by: Nigel Jones --- .../governance-engines-plugins/README.md | 16 --------- .../governance-engines-plugins/pom.xml | 35 ------------------- open-metadata-implementation/adapters/pom.xml | 1 - settings.gradle | 2 -- 4 files changed, 54 deletions(-) delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/README.md delete mode 100644 open-metadata-implementation/adapters/governance-engines-plugins/pom.xml diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/README.md b/open-metadata-implementation/adapters/governance-engines-plugins/README.md deleted file mode 100644 index c45297a835d..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/README.md +++ /dev/null @@ -1,16 +0,0 @@ - - - -![InDev](../../../open-metadata-publication/website/images/egeria-content-status-in-development.png#pagewidth) - -# Governance Engines Plugins - -Governance Engines Plugins support plugins to governance engines -to enable them to use open metadata settings in their validation -and enforcement decisions they make and the resulting actions they take. - -Return to [adapters](..) module. - - ---- - License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), - Copyright Contributors to the ODPi Egeria project. diff --git a/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml b/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml deleted file mode 100644 index 3df10ef1065..00000000000 --- a/open-metadata-implementation/adapters/governance-engines-plugins/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - adapters - org.odpi.egeria - 2.11-SNAPSHOT - - - 4.0.0 - - - scm:git:git://github.com/odpi/egeria.git - scm:git:ssh://github.com/odpi/egeria.git - http://github.com/odpi/egeria/tree/master - - - pom - - Governance Engine Plugins - - Governance Engines Plugins support plugins to governance engines - to enable them to use open metadata settings in their validation - and enforcement decisions they make and the resulting actions they take. - - - governance-engines-plugins - - - diff --git a/open-metadata-implementation/adapters/pom.xml b/open-metadata-implementation/adapters/pom.xml index c8194a4b90a..0fc653d6503 100644 --- a/open-metadata-implementation/adapters/pom.xml +++ b/open-metadata-implementation/adapters/pom.xml @@ -31,7 +31,6 @@ pom open-connectors - governance-engines-plugins authentication-plugins diff --git a/settings.gradle b/settings.gradle index e2cfd6f04fd..20735631eb2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -73,7 +73,6 @@ include(':open-metadata-implementation:adapters:open-connectors:rest-client-conn include(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors') include(':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory') include(':open-metadata-implementation:adapters:open-connectors') -include(':open-metadata-implementation:adapters:governance-engines-plugins') include(':open-metadata-implementation:adapters:authentication-plugins:http-helper') include(':open-metadata-implementation:adapters:authentication-plugins') include(':open-metadata-implementation:adapters') @@ -446,7 +445,6 @@ project(':open-metadata-implementation:adapters:open-connectors:rest-client-conn project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors/rest-client-connectors') project(':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory').projectDir = file('open-metadata-implementation/adapters/open-connectors/connector-configuration-factory') project(':open-metadata-implementation:adapters:open-connectors').projectDir = file('open-metadata-implementation/adapters/open-connectors') -project(':open-metadata-implementation:adapters:governance-engines-plugins').projectDir = file('open-metadata-implementation/adapters/governance-engines-plugins') project(':open-metadata-implementation:adapters:authentication-plugins:http-helper').projectDir = file('open-metadata-implementation/adapters/authentication-plugins/http-helper') project(':open-metadata-implementation:adapters:authentication-plugins').projectDir = file('open-metadata-implementation/adapters/authentication-plugins') project(':open-metadata-implementation:adapters').projectDir = file('open-metadata-implementation/adapters') From da1f6e70c732669b94ef4e463123628bd78cc009 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Fri, 4 Jun 2021 10:16:18 +0100 Subject: [PATCH 04/10] #458 update content-organization (content index) Signed-off-by: Nigel Jones --- Content-Organization.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Content-Organization.md b/Content-Organization.md index 7473ff0fadf..35146b38140 100644 --- a/Content-Organization.md +++ b/Content-Organization.md @@ -47,7 +47,6 @@ The Egeria core repository contains the core Egeria functionality, and is organi * **[adapters](open-metadata-implementation/adapters)** - pluggable component implementations. * **[authentication-plugins](open-metadata-implementation/adapters/authentication-plugins)** support extensions to technology such as LDAP that are used to verify the identity of an individual or service requesting access to data/metadata. - * **[governance-engines-plugins](open-metadata-implementation/adapters/governance-engines-plugins)** support plugins to governance engines to enable them to use open metadata settings in their validation and enforcement decisions, and the resulting actions they take. * **[open-connectors](open-metadata-implementation/adapters/open-connectors)** are connectors that support the Open Connector Framework (OCF). * **[configuration-store-connectors](open-metadata-implementation/adapters/open-connectors/configuration-store-connectors)** contains the connectors that manage the open metadata configuration. * **[connector-configuration-factory](open-metadata-implementation/adapters/open-connectors/connector-configuration-factory)** creates **Connection** objects to configure the open connectors. From b2bce863d40ec9be573b98b366b647ce0af33d0a Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Fri, 4 Jun 2021 10:39:51 +0100 Subject: [PATCH 05/10] #458 initial release notes covering removed function Signed-off-by: Nigel Jones --- release-notes/release-notes-2-11.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/release-notes/release-notes-2-11.md b/release-notes/release-notes-2-11.md index 5d7727c3244..59908d2e325 100644 --- a/release-notes/release-notes-2-11.md +++ b/release-notes/release-notes-2-11.md @@ -19,6 +19,17 @@ Details of these and other changes are in the sections that follow. For details on both see the commit history in GitHub. +## Removed Functionality + +The following capabilities have now been removed (previously deprecated and/or not in 'Released' status. +) : +* Information View OMAS. +* Virtualization Services & associated connectors. +* Security Officer Services, Security sync services & associated connectors including for Apache Ranger. +* Gaian database connector & additional authentication/impersonation support. +* Much of the above capability can be implemented via [Integration Services](https://egeria.odpi.org/open-metadata-implementation/integration-services/) . +* Hadoop specifics may be developed in the future within the [Egeria Hadoop](https://github.com/odpi/egeria-connector-hadoop-ecosystem) GitHub repository. +* For more details see [#5314](https://github.com/odpi/egeria/pull/5314) . ## Known Issues * It is recommended to use a chromium-based browser such as Google Chrome or Microsoft Edge, or Apple Safari for the Egeria React UI. Some parts of the UI experience such as Dino currently experience problems with Firefox. See [odpi/egeria-react-ui#96](https://github.com/odpi/egeria-react-ui/issues/96) . From ade6d8b969a40fc877f7c44fe62f680a35fd1bd5 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Fri, 4 Jun 2021 12:33:02 +0100 Subject: [PATCH 06/10] #458 remove references to Atlas wiki Signed-off-by: Nigel Jones --- .../configuration/properties/AccessServiceConfig.java | 3 +-- .../configuration/properties/EngineServiceConfig.java | 3 +-- .../configuration/properties/IntegrationServiceConfig.java | 3 +-- .../configuration/properties/ViewServiceConfig.java | 3 +-- .../configuration/registration/EngineServiceRegistration.java | 3 +-- .../properties/IntegrationServiceSummary.java | 3 +-- .../registration/IntegrationServiceRegistration.java | 3 +-- 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AccessServiceConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AccessServiceConfig.java index 4eaa7734633..e786b172634 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AccessServiceConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/AccessServiceConfig.java @@ -241,8 +241,7 @@ public void setAccessServiceDescription(String accessServiceDescription) /** - * Return the wiki page link for the access service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the access service. * * @return String url */ diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/EngineServiceConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/EngineServiceConfig.java index 16acdcb1909..9072ed1b625 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/EngineServiceConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/EngineServiceConfig.java @@ -239,8 +239,7 @@ public void setEngineServiceDescription(String engineServiceDescription) /** - * Return the wiki page link for the engine service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the engine service. * * @return String url */ diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationServiceConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationServiceConfig.java index 95808afc9a1..7a83d7efbae 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationServiceConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationServiceConfig.java @@ -213,8 +213,7 @@ public void setIntegrationServiceDescription(String integrationServiceDescriptio /** - * Return the wiki page link for the integration service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the integration service. * * @return String url */ diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/ViewServiceConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/ViewServiceConfig.java index 2afe344922b..3d6965d7dd2 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/ViewServiceConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/ViewServiceConfig.java @@ -234,8 +234,7 @@ public void setViewServiceDescription(String viewServiceDescription) /** - * Return the wiki page link for the view service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the view service. * * @return viewServiceWiki String url */ diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceRegistration.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceRegistration.java index 8fe8dabe774..31e033b2f1d 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceRegistration.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceRegistration.java @@ -264,8 +264,7 @@ public void setEngineServiceDescription(String engineServiceDescription) /** - * Return the wiki page link for the engine service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the engine service. * * @return String url */ diff --git a/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/properties/IntegrationServiceSummary.java b/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/properties/IntegrationServiceSummary.java index 048f412100e..bd90ab7f8d0 100644 --- a/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/properties/IntegrationServiceSummary.java +++ b/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/properties/IntegrationServiceSummary.java @@ -153,8 +153,7 @@ public void setIntegrationServiceDescription(String integrationServiceDescriptio /** - * Return the wiki page link for the integration service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the integration service. * * @return String url */ diff --git a/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/registration/IntegrationServiceRegistration.java b/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/registration/IntegrationServiceRegistration.java index e66bc424ef5..5e7d3d563d9 100644 --- a/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/registration/IntegrationServiceRegistration.java +++ b/open-metadata-implementation/governance-servers/integration-daemon-services/integration-daemon-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/registration/IntegrationServiceRegistration.java @@ -209,8 +209,7 @@ public void setIntegrationServiceDescription(String integrationServiceDescriptio /** - * Return the wiki page link for the integration service. The default value points to a page on the Atlas - * confluence wiki. + * Return the wiki page link for the integration service. * * @return String url */ From aa29ad26ef9745e84ba70c0c0d254ad079d45563 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Fri, 4 Jun 2021 12:42:23 +0100 Subject: [PATCH 07/10] #458 correct reference to OMAS in analytics modeling Signed-off-by: Nigel Jones --- .../analyticsmodeling/ffdc/AnalyticsModelingErrorCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-metadata-implementation/access-services/analytics-modeling/analytics-modeling-api/src/main/java/org/odpi/openmetadata/accessservices/analyticsmodeling/ffdc/AnalyticsModelingErrorCode.java b/open-metadata-implementation/access-services/analytics-modeling/analytics-modeling-api/src/main/java/org/odpi/openmetadata/accessservices/analyticsmodeling/ffdc/AnalyticsModelingErrorCode.java index 5a6f3ad9892..387a05b76d9 100644 --- a/open-metadata-implementation/access-services/analytics-modeling/analytics-modeling-api/src/main/java/org/odpi/openmetadata/accessservices/analyticsmodeling/ffdc/AnalyticsModelingErrorCode.java +++ b/open-metadata-implementation/access-services/analytics-modeling/analytics-modeling-api/src/main/java/org/odpi/openmetadata/accessservices/analyticsmodeling/ffdc/AnalyticsModelingErrorCode.java @@ -51,7 +51,7 @@ public enum AnalyticsModelingErrorCode implements ExceptionMessageSet { "If the server is supposed to have this access service activated, correct the server configuration and restart the server."), BAD_CONFIG( "OMAS-ANALYTICS-MODELING-005", - "The Information View Open Metadata Access Service (OMAS) has been passed an invalid value of {0} in the {1} property. The resulting exception of {2} included the following message: {3}", + "The Analytics Modeling Open Metadata Access Service (OMAS) has been passed an invalid value of {0} in the {1} property. The resulting exception of {2} included the following message: {3}", "The access service has not been passed valid configuration.", "Correct the configuration and restart the service."), ENTITY_NOT_FOUND_EXCEPTION(404, From 4cf759889ade146755d081e08b5fca2b6b7f40fa Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Fri, 4 Jun 2021 13:12:50 +0100 Subject: [PATCH 08/10] #458 remove additional references to removed components Signed-off-by: Nigel Jones --- .../docs/concepts/security-officer-server.md | 25 ------------------- .../docs/concepts/security-sync-server.md | 23 ----------------- 2 files changed, 48 deletions(-) delete mode 100644 open-metadata-implementation/admin-services/docs/concepts/security-officer-server.md delete mode 100644 open-metadata-implementation/admin-services/docs/concepts/security-sync-server.md diff --git a/open-metadata-implementation/admin-services/docs/concepts/security-officer-server.md b/open-metadata-implementation/admin-services/docs/concepts/security-officer-server.md deleted file mode 100644 index 4c12ffccae8..00000000000 --- a/open-metadata-implementation/admin-services/docs/concepts/security-officer-server.md +++ /dev/null @@ -1,25 +0,0 @@ - - - -# Security Officer Server - -The Security Officer Server is a deprecated governance server. The [Engine Host OMAG Server](engine-host.md) provides the -runtime for the -[Metadata Watchdog Open Metadata Engine Service (OMES)](../../../engine-services/metadata-watchdog) -that hosts the Security Officer Server function. - -The [Integration Daemon OMAG Server](integration-daemon.md) provides the -runtime for the -[Security Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/security-integrator) -that listens for changes to the -[SecurityTag](../../../../open-metadata-publication/website/open-metadata-types/0423-Security-Tags.md) classifications -set up by the Security Officer Server and pushes them to a security enforcement point such as Apache Ranger. - - ----- -* Go to [Governance Servers](governance-server-types.md). -* Go to [Admin Guide](../user). - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/admin-services/docs/concepts/security-sync-server.md b/open-metadata-implementation/admin-services/docs/concepts/security-sync-server.md deleted file mode 100644 index 803e0235490..00000000000 --- a/open-metadata-implementation/admin-services/docs/concepts/security-sync-server.md +++ /dev/null @@ -1,23 +0,0 @@ - - - -# Security Sync Server - -The Security Sync Server is a deprecated governance server. The equivalent function runs as the -[Security Integrator Open Metadata Integration Service (OMIS)](../../../integration-services/security-integrator) -in an [Integration Daemon](integration-daemon.md). -It is responsible for keeping a security -enforcement engine supplied with the latest metadata settings. - -The Security Integrator OMIS is paired with the -[Asset Manager OMAS](../../../access-services/asset-manager). - - - ----- -* Go to [Governance Servers](governance-server-types.md). -* Go to [Admin Guide](../user). - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file From 2cc1d5163fe52a59a89bc16cb75cee37195929b0 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Fri, 4 Jun 2021 13:13:46 +0100 Subject: [PATCH 09/10] #458 remove virtualizer doc Signed-off-by: Nigel Jones --- .../docs/concepts/virtualizer.md | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 open-metadata-implementation/admin-services/docs/concepts/virtualizer.md diff --git a/open-metadata-implementation/admin-services/docs/concepts/virtualizer.md b/open-metadata-implementation/admin-services/docs/concepts/virtualizer.md deleted file mode 100644 index 3ec98e2c356..00000000000 --- a/open-metadata-implementation/admin-services/docs/concepts/virtualizer.md +++ /dev/null @@ -1,20 +0,0 @@ - - - -# Virtualizer - -The **Virtualizer** is a deprecated governance server. The equivalent function -runs as an integration connector in the [Database Integrator OMIS](../../../integration-services/database-integrator) -that is part of the [Integration Daemon](integration-daemon.md) OMAG Server. - -The Database Integrator OMIS is paired with the -[Data Manager OMAS](../../../access-services/data-manager). - - ----- -* Go to [Governance Servers](governance-server-types.md). -* Go to [Admin Guide](../user). - ----- -License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), -Copyright Contributors to the ODPi Egeria project. \ No newline at end of file From d212b48ee7241a9345955a25d2e15956b8b1fcb1 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Tue, 8 Jun 2021 10:15:17 +0100 Subject: [PATCH 10/10] #458 fix dropped brace from merge conflict resolution Signed-off-by: Nigel Jones --- .../adminservices/classifier/ServerTypeClassifier.java | 1 + 1 file changed, 1 insertion(+) diff --git a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java index c1066902b83..a4aae8277d4 100644 --- a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java +++ b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/classifier/ServerTypeClassifier.java @@ -417,6 +417,7 @@ private void validateConfigurationDocumentNotNull(String serverName, this.getClass().getName(), methodName); } + } /** * Checks that a classification has been derived for a configuration document.