Skip to content

Commit

Permalink
Merge pull request #7827 from mandy-chessell/code2023
Browse files Browse the repository at this point in the history
Upgrade JDBC and Atlas connectors
  • Loading branch information
mandy-chessell authored Aug 22, 2023
2 parents f9c3081 + cd42ed7 commit 1cd21b1
Show file tree
Hide file tree
Showing 115 changed files with 3,796 additions and 537 deletions.
7 changes: 3 additions & 4 deletions open-metadata-distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@

# Open Metadata Distribution

This module collects together the Egeria artifacts that are designed for
used by external consuming websites and technologies. This includes:
This module collects together the Egeria artifacts for different scenarios. This includes:

* The **[Maven packages](open-metadata-packages)** used to embed Egeria into different technologies.
* The **[assemblies](open-metadata-assemblies)** that provide executables for servers and tool kits.
* The **[OMAG Server Platform Assembly](omag-server-platform)** assembles the libraries and files for the OMAG Server Platform plus optional resources for use with the platform.
* The **[Open Metadata Assembly](open-metadata-assemblies)** provides a combination of the OMAG Server Platform and the Egeria UI Application. This is a legacy and is being replaced with the more specialized assemblies described above.



Expand Down
16 changes: 16 additions & 0 deletions open-metadata-distribution/omag-server-platform/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

# OMAG Server Platform Distribution TAR file

The **OMAG Server Platform** module creates a distribution **tar** file that can be copied
and used to install Egeria's OMAG Server Platform. For further information see
[Installing Egeria Tutorial](https://egeria-project.org/education/tutorials/installing-egeria-tutorial).

----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the ODPi Egeria project.




254 changes: 254 additions & 0 deletions open-metadata-distribution/omag-server-platform/build.gradle

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

# Extra Libraries

Use this directory to add jar files to the platform's classpath.

----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the ODPi Egeria project.




245 changes: 245 additions & 0 deletions open-metadata-distribution/omag-server-platform/docs/fileLayout.drawio

Large diffs are not rendered by default.

38 changes: 0 additions & 38 deletions open-metadata-distribution/open-metadata-packages/README.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ private boolean isProcessStatusChangedToActive(EntityDetail entityDetail, Entity
private void logExceptionToAudit(OMRSInstanceEvent instanceEvent, Exception e) {
String actionDescription = "Asset Lineage OMAS is unable to process an OMRSTopic event.";

auditLog.logException(actionDescription,
AssetLineageAuditCode.EVENT_PROCESSING_EXCEPTION.getMessageDefinition(e.getMessage(), serverName, instanceEvent.getInstanceEventType().getName()), instanceEvent.toString(), e);
auditLog.logMessage(actionDescription,
AssetLineageAuditCode.EVENT_PROCESSING_EXCEPTION.getMessageDefinition(e.getMessage(), serverName, instanceEvent.getInstanceEventType().getName()), instanceEvent.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,29 +156,4 @@ public AssetLineagePublisher getAssetLineagePublisher(String userId, String serv

return null;
}


/**
* Retrieve the AuditLog from the service instance.
*
* @param userId calling userId
* @param serverName name of the server tied to the request
* @param serviceOperationName name of the REST API call (typically the top-level methodName)
* @return
* @throws org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException
* @throws org.odpi.openmetadata.commonservices.ffdc.exceptions.PropertyServerException
* @throws org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException
*/
@Override
public AuditLog getAuditLog(String userId, String serverName, String serviceOperationName)
throws org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException,
org.odpi.openmetadata.commonservices.ffdc.exceptions.PropertyServerException,
org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException {

AssetLineageServicesInstance instance = (AssetLineageServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName);
if (instance != null) {
return instance.getAuditLog();
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ public AssetLineagePublisher getAssetLineagePublisher() {
public void setAssetLineagePublisher(AssetLineagePublisher assetLineagePublisher) {
this.assetLineagePublisher = assetLineagePublisher;
}

@Override
public AuditLog getAuditLog() {
return super.getAuditLog();
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement;

import java.io.Serial;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -63,18 +62,7 @@ public DataAssetElementsResponse(DataAssetElementsResponse template)
*/
public List<DataAssetElement> getElementList()
{
if (elementList == null)
{
return null;
}
else if (elementList.isEmpty())
{
return null;
}
else
{
return new ArrayList<>(elementList);
}
return elementList;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement;
import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement;
import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties;
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 java.lang.reflect.InvocationTargetException;
import java.util.Map;


/**
Expand Down Expand Up @@ -82,7 +80,7 @@ public B getNewBean(Class<B> beanClass,

super.fillOpenMetadataElement(relatedBean, entity);

bean.setElementProperties(relatedBean);
bean.setElement(relatedBean);
}

return returnBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
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.Relationship;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -82,6 +83,12 @@ public B getNewRelationshipBean(Class<B> beanClass,
entityProxy = relationship.getEntityTwoProxy();

bean.setElementGUIDAtEnd2(entityProxy.getGUID());

if (repositoryHelper.getTypeDefByName(serviceName, relationship.getType().getTypeDefName()) instanceof RelationshipDef relationshipDef)
{
bean.setLabelAtEnd1(relationshipDef.getEndDef1().getAttributeName());
bean.setLabelAtEnd2(relationshipDef.getEndDef2().getAttributeName());
}
}

return returnBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntitySummary;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;

Expand Down Expand Up @@ -440,6 +441,12 @@ private RelatedMetadataElements getRelatedElements(Relationship relationship)
relatedMetadataElements.setElementGUIDAtEnd2(relationship.getEntityTwoProxy().getGUID());
}

if (repositoryHelper.getTypeDefByName(serviceName, relationship.getType().getTypeDefName()) instanceof RelationshipDef relationshipDef)
{
relatedMetadataElements.setLabelAtEnd1(relationshipDef.getEndDef1().getAttributeName());
relatedMetadataElements.setLabelAtEnd2(relationshipDef.getEndDef2().getAttributeName());
}

return relatedMetadataElements;
}

Expand Down
Loading

0 comments on commit 1cd21b1

Please sign in to comment.