Skip to content

Commit

Permalink
Merge pull request #8523 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Improvements in search requests
  • Loading branch information
mandy-chessell authored Dec 11, 2024
2 parents f851ae6 + 38ec6d8 commit d4c17d7
Show file tree
Hide file tree
Showing 105 changed files with 2,380 additions and 2,324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.odpi.openmetadata.accessservices.assetconsumer.events.AssetConsumerEventType;
import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler;
import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset;
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement;
import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType;
import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase;
Expand Down Expand Up @@ -735,18 +734,17 @@ private EntityDetail entityOfInterest(String userId,
{
fullEntity = entity;

assetHandler.validateAnchorEntity(userId,
fullEntity.getGUID(),
fullEntity.getType().getTypeDefName(),
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
assetHandler.validateAnchorForEntity(userId,
fullEntity.getType().getTypeDefName(),
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
}
}
else if (entityProxy != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2159,19 +2159,18 @@ public GUIDListResponse getAssetsByMeaning(String serverName,
}
else
{
EntityDetail anchorEntity = handler.validateAnchorEntity(userId,
entity.getGUID(),
OpenMetadataType.REFERENCEABLE.typeName,
entity,
entityGUIDParameterName,
false,
false,
false,
false,
handler.getSupportedZones(),
new Date(),
methodName);
if (anchorEntity != null)
EntityDetail anchorEntity = handler.validateAnchorForEntity(userId,
OpenMetadataType.OPEN_METADATA_ROOT.typeName,
entity,
entityGUIDParameterName,
false,
false,
false,
false,
handler.getSupportedZones(),
new Date(),
methodName);
if ((anchorEntity != null) && (repositoryHelper.isTypeOf(serverName, anchorEntity.getType().getTypeDefName(), OpenMetadataType.ASSET.typeName)))
{
if (! guids.contains(anchorEntity.getGUID()))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2635,7 +2635,7 @@ public List<RelatedMetadataElementSummary> getRelatedElements(String
pageSize);
}

if (relatedMetadataElements != null)
if ((relatedMetadataElements != null) && (relatedMetadataElements.getElementList() != null))
{
List<RelatedMetadataElementSummary> results = new ArrayList<>();

Expand Down Expand Up @@ -2717,7 +2717,7 @@ public List<RelatedMetadataElementSummary> getRelatedElementsWithPropertyValue(S
startFrom,
pageSize);

if (relatedMetadataElements != null)
if ((relatedMetadataElements != null) && (relatedMetadataElements.getElementList() != null))
{
List<RelatedMetadataElementSummary> results = new ArrayList<>();

Expand Down Expand Up @@ -2819,7 +2819,7 @@ public List<RelatedMetadataElementSummary> findRelatedElementsWithPropertyValue(
startFrom,
pageSize);

if (relatedMetadataElements != null)
if ((relatedMetadataElements != null) && (relatedMetadataElements.getElementList() != null))
{
List<RelatedMetadataElementSummary> results = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ public List<ValidValueMember> getValidValueSetMembers(String userId,
startFrom,
pageSize);

if (linkedResources != null)
if ((linkedResources != null) && (linkedResources.getElementList() != null))
{
List<ValidValueMember> validValueMembers = new ArrayList<>();

Expand Down Expand Up @@ -1102,7 +1102,7 @@ public List<ValidValueElement> getSetsForValidValue(String userId,
startFrom,
pageSize);

if (linkedResources != null)
if ((linkedResources != null) && (linkedResources.getElementList() != null))
{
List<ValidValueElement> validValueSets = new ArrayList<>();

Expand Down Expand Up @@ -1181,7 +1181,7 @@ public List<ReferenceValueAssignmentItemElement> getReferenceValueAssignedItems(
startFrom,
pageSize);

if (linkedResources != null)
if ((linkedResources != null) && (linkedResources.getElementList() != null))
{
List<ReferenceValueAssignmentItemElement> results = new ArrayList<>();

Expand Down Expand Up @@ -1266,7 +1266,7 @@ public List<ReferenceValueAssignmentDefinitionElement> getReferenceValueAssignme
startFrom,
pageSize);

if (linkedResources != null)
if ((linkedResources != null) && (linkedResources.getElementList() != null))
{
List<ReferenceValueAssignmentDefinitionElement> results = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -995,18 +995,17 @@ private EntityDetail entityOfInterest(String userId,
{
fullEntity = entity;

assetHandler.validateAnchorEntity(userId,
fullEntity.getGUID(),
OpenMetadataType.OPEN_METADATA_ROOT.typeName,
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
assetHandler.validateAnchorForEntity(userId,
OpenMetadataType.OPEN_METADATA_ROOT.typeName,
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
}
else if (entityProxy != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,18 +734,17 @@ private EntityDetail entityOfInterest(String userId,
{
fullEntity = entity;

assetHandler.validateAnchorEntity(userId,
fullEntity.getGUID(),
fullEntity.getType().getTypeDefName(),
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
assetHandler.validateAnchorForEntity(userId,
fullEntity.getType().getTypeDefName(),
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
}
}
else if (entityProxy != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public void reassignToDo(String userId,
0,
0);

if (assignedActors != null)
if ((assignedActors != null) && (assignedActors.getElementList() != null))
{
for (RelatedMetadataElement assignedActor : assignedActors.getElementList())
{
Expand Down Expand Up @@ -794,7 +794,7 @@ private List<ToDoElement> convertRelatedToDos(String userI
InvalidParameterException,
UserNotAuthorizedException
{
if (relatedMetadataElements != null)
if ((relatedMetadataElements != null) && (relatedMetadataElements.getElementList() != null))
{
List<ToDoElement> toDoElements = new ArrayList<>();

Expand Down
Loading

0 comments on commit d4c17d7

Please sign in to comment.