diff options
author | ys9693 <ys9693@att.com> | 2019-07-31 13:42:32 +0300 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-07-31 13:13:08 +0000 |
commit | 3bc744e849fff5f599746f9035449b1940bdcdc7 (patch) | |
tree | 9c50ec0d28d52e93b14ac6e8cc20c3e8a3e13edc /src/main/java | |
parent | ad353e729ad380cb669886af11d347eebda92ac4 (diff) |
fix GetEntity API method returning a map rather than a list1.6.0
Issue-ID: SDC-2481
Change-Id: I710ed80a7e1b0e4d23176b0a3b33910b28a83bbf
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java | 4 | ||||
-rw-r--r-- | src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java b/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java index c5f98d8..ac160e0 100644 --- a/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java +++ b/src/main/java/org/onap/sdc/tosca/parser/api/IEntityDetails.java @@ -87,13 +87,13 @@ public interface IEntityDetails { * Retrieves map of requirements of the entity instance * @return map of entity requirement names and corresponding {@link RequirementAssignment} object instances */ - Map<String, RequirementAssignment> getRequirements(); + List<RequirementAssignment> getRequirements(); /** * Retrieves map of capabilities of the entity instance * @return map of entity capability names and corresponding {@link CapabilityAssignment} object instances */ - Map<String, CapabilityAssignment> getCapabilities(); + List<CapabilityAssignment> getCapabilities(); /** * Retrieves list of policy target names diff --git a/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java b/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java index f6f961c..57559c6 100644 --- a/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java +++ b/src/main/java/org/onap/sdc/tosca/parser/elements/EntityDetails.java @@ -67,19 +67,15 @@ public abstract class EntityDetails implements IEntityDetails { } @Override - public Map<String, RequirementAssignment> getRequirements() { + public List<RequirementAssignment> getRequirements() { return entityTemplate.getRequirements() - .getAll() - .stream() - .collect(Collectors.toMap(RequirementAssignment::getName, ra->ra)); + .getAll(); } @Override - public Map<String, CapabilityAssignment> getCapabilities() { + public List<CapabilityAssignment> getCapabilities() { return entityTemplate.getCapabilities() - .getAll() - .stream() - .collect(Collectors.toMap(CapabilityAssignment::getName, ca->ca)); + .getAll(); } @Override |