* ============LICENSE_START=======================================================
* Copyright (C) 2021 Nordix Foundation
* Modifications Copyright (C) 2021 Pantheon.tech
+ * Modifications Copyright (C) 2020-2021 Bell Canada.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
fragmentEntities = fragmentRepository
.getByAnchorAndXpathAndLeafAttributes(anchorEntity.getId(), cpsPathQuery.getXpathPrefix(), cpsPathQuery
.getLeafName(), cpsPathQuery.getLeafValue());
+ } else if (CpsPathQueryType.XPATH_HAS_DESCENDANT_WITH_LEAF_VALUES.equals(cpsPathQuery.getCpsPathQueryType())) {
+ final String leafDataAsJson = GSON.toJson(cpsPathQuery.getLeavesData());
+ fragmentEntities = fragmentRepository
+ .getByAnchorAndDescendentNameAndLeafValues(anchorEntity.getId(),
+ cpsPathQuery.getDescendantName(), leafDataAsJson);
} else {
fragmentEntities = fragmentRepository
.getByAnchorAndXpathEndsInDescendantName(anchorEntity.getId(), cpsPathQuery.getDescendantName());