summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/main/java/org
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-01-18 09:25:34 +0000
committerliamfallon <liam.fallon@est.tech>2021-01-18 09:29:25 +0000
commita00536c5c65efbef3fc23bcd83fdcca940b3ceba (patch)
tree175591205f29a8eed34f827d0430c7d7b096782e /models-tosca/src/main/java/org
parent5b577fd7cc40eaad1a1e5db2d43ef9ffe820e9a2 (diff)
Create ToscaConceptIdentifier from ToscaEntityKey
THis change adds a method to create a ToscaConceptIdentifer from a ToscaEntityKey class. This method reduces the code vloume when translating between these identifiers. Issue-ID: POLICY-2971 Change-Id: Idd62339935d2ba78e6c60b40ee95fedac0642bef Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca/src/main/java/org')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java
index adde63b60..caf02fc02 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,4 +35,8 @@ import lombok.NoArgsConstructor;
public class ToscaEntityKey {
private String name;
private String version;
+
+ public ToscaConceptIdentifier asIdentifier() {
+ return new ToscaConceptIdentifier(name, version);
+ }
}