From 5dc52f7d5b3dadc422e58823b1086084a25788a3 Mon Sep 17 00:00:00 2001 From: RossC Date: Tue, 9 Jun 2020 14:35:41 +0100 Subject: Changing toString on ToscaPolicyXXXIdentifiers Issue-ID: POLICY-2078 Change-Id: I0e8aae118a52aaef7e372293396802b85782a22c Signed-off-by: RossC --- .../models/tosca/authorative/concepts/ToscaPolicyIdentifier.java | 6 ++++++ .../tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java | 6 ++++++ .../tosca/authorative/concepts/ToscaPolicyTypeIdentifier.java | 6 ++++++ 3 files changed, 18 insertions(+) (limited to 'models-tosca/src/main/java/org/onap') diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifier.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifier.java index f98a238ff..ba1042851 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifier.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifier.java @@ -3,6 +3,7 @@ * ONAP Policy Models * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,4 +84,9 @@ public class ToscaPolicyIdentifier implements Comparable return ObjectUtils.compare(getVersion(), other.getVersion()); } + + @Override + public String toString() { + return this.name + " " + this.version; + } } diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java index ca3684a24..43e7114be 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java @@ -3,6 +3,7 @@ * ONAP Policy Models * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,4 +74,9 @@ public class ToscaPolicyIdentifierOptVersion implements Comparable