Skip to content

Commit

Permalink
Merge pull request odpi#7996 from mandy-chessell/code2023
Browse files Browse the repository at this point in the history
Remove OpenMetadataAPIMapper
  • Loading branch information
mandy-chessell authored Jan 4, 2024
2 parents 00e191a + f53f2a7 commit e162833
Show file tree
Hide file tree
Showing 457 changed files with 16,165 additions and 15,141 deletions.
2 changes: 1 addition & 1 deletion OpenConnectorsArchiveGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies {
implementation project(':open-metadata-implementation:repository-services:repository-services-apis')
implementation project(':open-metadata-implementation:frameworks:audit-log-framework')
implementation project(':open-metadata-implementation:frameworks:open-connector-framework')
implementation project(':open-metadata-implementation:frameworks:governance-action-framework')
implementation project(':open-metadata-implementation:common-services:ffdc-services')
implementation project(':open-metadata-implementation:admin-services:admin-services-api')
implementation project(':open-metadata-implementation:common-services:repository-handler')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import org.odpi.openmetadata.accessservices.assetconsumer.events.AssetConsumerEventType;
import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler;
import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIDummyBean;
import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIMapper;
import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataType;
import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail;
Expand Down Expand Up @@ -736,7 +736,7 @@ private EntityDetail entityOfInterest(String userId,

assetHandler.validateAnchorEntity(userId,
fullEntity.getGUID(),
OpenMetadataAPIMapper.ASSET_TYPE_NAME,
OpenMetadataType.ASSET.typeName,
fullEntity,
guidParameterName,
false,
Expand Down Expand Up @@ -792,6 +792,6 @@ else if (entityProxy != null)
*/
private boolean isTypeOfInterest(InstanceHeader entityHeader)
{
return repositoryHelper.isTypeOf(serviceName, entityHeader.getType().getTypeDefName(), OpenMetadataAPIMapper.ASSET_TYPE_NAME);
return repositoryHelper.isTypeOf(serviceName, entityHeader.getType().getTypeDefName(), OpenMetadataType.ASSET.typeName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import org.odpi.openmetadata.commonservices.generichandlers.InformalTagHandler;
import org.odpi.openmetadata.commonservices.generichandlers.LikeHandler;
import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIDummyBean;
import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIMapper;
import org.odpi.openmetadata.commonservices.generichandlers.RatingHandler;
import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.CommentType;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.StarRating;
import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataType;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;
Expand Down Expand Up @@ -260,8 +260,8 @@ public GUIDListResponse getAssetsByName(String serverName,
if (requestBody != null)
{
response.setGUIDs(handler.getAssetGUIDsByName(userId,
OpenMetadataAPIMapper.ASSET_TYPE_GUID,
OpenMetadataAPIMapper.ASSET_TYPE_NAME,
OpenMetadataType.ASSET.typeGUID,
OpenMetadataType.ASSET.typeName,
requestBody.getName(),
nameParameterName,
startFrom,
Expand Down Expand Up @@ -1025,10 +1025,10 @@ public GUIDListResponse getAssetsByMeaning(String serverName,
List<EntityDetail> attachedEntities = handler.getAttachedEntities(userId,
termGUID,
guidParameterName,
OpenMetadataAPIMapper.GLOSSARY_TERM_TYPE_NAME,
OpenMetadataAPIMapper.REFERENCEABLE_TO_MEANING_TYPE_GUID,
OpenMetadataAPIMapper.REFERENCEABLE_TO_MEANING_TYPE_NAME,
OpenMetadataAPIMapper.REFERENCEABLE_TYPE_NAME,
OpenMetadataType.GLOSSARY_TERM_TYPE_NAME,
OpenMetadataType.REFERENCEABLE_TO_MEANING_TYPE_GUID,
OpenMetadataType.REFERENCEABLE_TO_MEANING_TYPE_NAME,
OpenMetadataType.REFERENCEABLE.typeName,
null,
null,
1,
Expand All @@ -1047,7 +1047,7 @@ public GUIDListResponse getAssetsByMeaning(String serverName,

for (EntityDetail entity : attachedEntities)
{
if (repositoryHelper.isTypeOf(serverName, entity.getType().getTypeDefName(), OpenMetadataAPIMapper.ASSET_TYPE_NAME))
if (repositoryHelper.isTypeOf(serverName, entity.getType().getTypeDefName(), OpenMetadataType.ASSET.typeName))
{
if (! guids.contains(entity.getGUID()))
{
Expand All @@ -1058,7 +1058,7 @@ public GUIDListResponse getAssetsByMeaning(String serverName,
{
EntityDetail anchorEntity = handler.validateAnchorEntity(userId,
entity.getGUID(),
OpenMetadataAPIMapper.REFERENCEABLE_TYPE_NAME,
OpenMetadataType.REFERENCEABLE.typeName,
entity,
entityGUIDParameterName,
false,
Expand Down Expand Up @@ -1676,7 +1676,7 @@ public VoidResponse addTagToAsset(String serverName,
null,
assetGUID,
assetGUIDParameterName,
OpenMetadataAPIMapper.ASSET_TYPE_NAME,
OpenMetadataType.ASSET.typeName,
tagGUID,
tagGUIDParameterName,
instanceHandler.getSupportedZones(userId, serverName, methodName),
Expand Down Expand Up @@ -1745,7 +1745,7 @@ public VoidResponse addTagToElement(String serverName,
null,
elementGUID,
elementGUIDParameterName,
OpenMetadataAPIMapper.REFERENCEABLE_TYPE_NAME,
OpenMetadataType.REFERENCEABLE.typeName,
tagGUID,
tagGUIDParameterName,
isPublic,
Expand Down Expand Up @@ -1807,7 +1807,7 @@ public VoidResponse removeTagFromAsset(String serverName,
null,
assetGUID,
assetGUIDParameterName,
OpenMetadataAPIMapper.ASSET_TYPE_NAME,
OpenMetadataType.ASSET.typeName,
tagGUID,
tagGUIDParameterName,
instanceHandler.getSupportedZones(userId, serverName, methodName),
Expand Down Expand Up @@ -1868,7 +1868,7 @@ public VoidResponse removeTagFromElement(String serverName,
null,
elementGUID,
elementGUIDParameterName,
OpenMetadataAPIMapper.REFERENCEABLE_TYPE_NAME,
OpenMetadataType.REFERENCEABLE.typeName,
tagGUID,
tagGUIDParameterName,
instanceHandler.getSupportedZones(userId, serverName, methodName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public boolean isValidLineageRelationshipType(Relationship relationship) {
* Determines if the given entity is a valid lineage entity
*
* @param entityDetail the entity object
* @param serverName name of server instance to route request to
*
* @return true if the it is a lineage entity of valid type
*/
Expand Down
Loading

0 comments on commit e162833

Please sign in to comment.