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 {
*
*/
private static final long serialVersionUID = -9114770126086263552L;
-
+ private static final Logger log = LoggerFactory.getLogger(ComponentMetadataDataDefinition.class.getName());
+
private String uniqueId;
private String name; // archiveName
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();
}
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;
}
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() {
}
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;
}