diff options
author | 2017-07-17 21:12:03 +0300 | |
---|---|---|
committer | 2017-07-17 21:12:03 +0300 | |
commit | 75aacbbe1acf78fa53378f07f0a8c7769449a17e (patch) | |
tree | 68a9799eb8f4704dd9a3d513401df9bb11af7739 /common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java | |
parent | dec02e7cc74e1c401be51bd9d266575e1e008f5f (diff) |
[SDC] rebase 1710 code
Change-Id: I532ed68979fee7840ea8a5395e7e965b155fb9f9
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java index 24d801262c..5fecac429a 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java @@ -28,6 +28,8 @@ import java.util.Map; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinition implements Serializable { @@ -35,7 +37,8 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio * */ private static final long serialVersionUID = -9114770126086263552L; - + private static final Logger log = LoggerFactory.getLogger(ComponentMetadataDataDefinition.class.getName()); + private String uniqueId; private String name; // archiveName @@ -156,13 +159,13 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio this.lastUpdateDate = other.getLastUpdateDate(); this.description = other.getDescription(); this.state = other.getState(); - this.tags = new ArrayList<String>(other.getTags()); + this.tags = new ArrayList<>(other.getTags()); this.icon = other.getIcon(); this.contactId = other.getContactId(); this.UUID = other.getUUID(); this.normalizedName = other.getNormalizedName(); this.systemName = other.getSystemName(); - this.allVersions = new HashMap<String, String>(other.getAllVersions()); + this.allVersions = new HashMap<>(other.getAllVersions()); this.isDeleted = other.isDeleted(); this.projectCode = other.getProjectCode(); this.csarUUID = other.getCsarUUID(); @@ -177,6 +180,8 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio } public void setUniqueId(String uniqueId) { + if ( this.uniqueId != null && !this.uniqueId.equals( uniqueId ) ) + log.warn("uniqueId changed more then once -> OLD : {} , NEW: {} ", this.uniqueId ,uniqueId ); this.uniqueId = uniqueId; } @@ -264,8 +269,10 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio return UUID; } - public void setUUID(String uUID) { - UUID = uUID; + public void setUUID(String UUID) { + if ( this.UUID != null && !this.UUID.equals( UUID ) ) + log.warn("UUID changed more then once -> OLD : {} , NEW: {} ", this.UUID, UUID ); + this.UUID = UUID; } public String getNormalizedName() { @@ -297,6 +304,8 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio } public void setInvariantUUID(String invariantUUID) { + if ( this.invariantUUID != null && !this.invariantUUID.equals( invariantUUID ) ) + log.warn("InvariantUUID changed more then once -> OLD : {} , NEW: {} ", this.invariantUUID ,invariantUUID ); this.invariantUUID = invariantUUID; } |