Adding unit tests 52/119152/3
authorxuegao <xue.gao@intl.att.com>
Thu, 11 Mar 2021 16:22:46 +0000 (17:22 +0100)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Fri, 12 Mar 2021 11:51:04 +0000 (11:51 +0000)
Adding unit tests to improve test coverage.

Issue-ID: SDC-3428
Signed-off-by: xuegao <xue.gao@intl.att.com>
Change-Id: I57da2ff92839cb78985e5f3d3c13dc575c1b6c17

catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/SdcSchemaFilesData.java
catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/LessThanConstraint.java
common-app-api/src/main/java/org/openecomp/sdc/be/config/CadiFilterParams.java
common-app-api/src/main/java/org/openecomp/sdc/be/config/DmaapProducerConfiguration.java
common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckWrapper.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AnnotationTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapAttributesDataDefinition.java
common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/Directive.java

index 1ed0440..401d909 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,19 +25,27 @@ import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
 import com.datastax.driver.mapping.annotations.Transient;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
 import java.nio.ByteBuffer;
 import java.util.Date;
 
+@Getter
+@Setter
+@NoArgsConstructor
 @Table(keyspace = "sdcartifact", name = "sdcschemafiles")
 public class SdcSchemaFilesData {
        @PartitionKey(0)
        @Column(name = "sdcreleasenum")
        private String sdcReleaseNum;
-       
+
        @ClusteringColumn
        @Column(name = "timestamp")
        private Date timestamp;
-       
+
        @PartitionKey(1)
        @Column(name = "conformanceLevel")
        private String conformanceLevel;
@@ -46,15 +54,11 @@ public class SdcSchemaFilesData {
        private String fileName;
 
        @Column(name = "payload")
-       private ByteBuffer payload;
-       
+       @Setter(AccessLevel.NONE)private ByteBuffer payload;
+
        @Column(name = "checksum")
        private String checksum;
-       
-       public SdcSchemaFilesData() {
-       
-       }
-       
+
        public SdcSchemaFilesData(String sdcReleaseNum, Date timestamp, String conformanceLevel, String fileName, byte[] payload, String checksum){
                this.sdcReleaseNum = sdcReleaseNum;
                this.timestamp = timestamp;
@@ -65,43 +69,16 @@ public class SdcSchemaFilesData {
                }
                this.checksum = checksum;
        }
-       
-       public String getSdcReleaseNum() {
-               return sdcReleaseNum;
-       }
-
-       public void setSdcReleaseNum(String sdcReleaseNum) {
-               this.sdcReleaseNum = sdcReleaseNum;
-       }
-
-       public String getConformanceLevel() {
-               return conformanceLevel;
-       }
-
-       public void setConformanceLevel(String conformanceLevel) {
-               this.conformanceLevel = conformanceLevel;
-       }
-
-       public String getFileName() {
-               return fileName;
-       }
 
-       public void setFileName(String fileName) {
-               this.fileName = fileName;
-       }
-
-       public ByteBuffer getPayload() {
-               return payload;
-       }
 
        public void setPayload(ByteBuffer payload) {
-               if(payload != null){
+               if(payload != null) {
                        this.payload = payload.duplicate();
                }
        }
-       
+
        public void setPayloadAsArray(byte[] payload) {
-               if(payload != null){
+               if(payload != null) {
                        this.payload = ByteBuffer.wrap(payload.clone());
                }
        }
@@ -111,22 +88,6 @@ public class SdcSchemaFilesData {
                return payload != null ? payload.array() : null;
        }
 
-       public Date getTimestamp() {
-               return timestamp;
-       }
-
-       public void setTimestamp(Date timestamp) {
-               this.timestamp = timestamp;
-       }
-
-       public String getChecksum() {
-               return checksum;
-       }
-
-       public void setChecksum(String checksum) {
-               this.checksum = checksum;
-       }
-
        @Override
        public String toString() {
                return "SdcSchemaFilesData [sdcReleaseNum=" + sdcReleaseNum + ", timestamp=" + timestamp + ", conformanceLevel="
index 55f6774..a6cc5a2 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,7 @@
 
 package org.openecomp.sdc.be.model.tosca.constraints;
 
+import lombok.AllArgsConstructor;
 import org.openecomp.sdc.be.model.PropertyConstraint;
 import org.openecomp.sdc.be.model.tosca.ToscaType;
 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintFunctionalException;
@@ -29,15 +30,12 @@ import org.openecomp.sdc.be.model.tosca.constraints.exception.PropertyConstraint
 
 import javax.validation.constraints.NotNull;
 
+@AllArgsConstructor
 public class LessThanConstraint extends AbstractComparablePropertyConstraint {
 
     @NotNull
     private String lessThan;
 
-    public LessThanConstraint(String lessThan) {
-        this.lessThan = lessThan;
-    }
-
     @Override
     public void initialize(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
         initialize(lessThan, propertyType);
index 39793fb..b82983e 100644 (file)
@@ -1,5 +1,10 @@
 package org.openecomp.sdc.be.config;
 
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
 public class CadiFilterParams {
 
     private String hostname;
@@ -18,125 +23,4 @@ public class CadiFilterParams {
     private String AFT_LONGITUDE;
     private String AFT_ENVIRONMENT;
     private String cadiX509Issuers;
-
-    public String getHostname() {
-        return hostname;
-    }
-
-    public void setHostname(String hostname) {
-        this.hostname = hostname;
-    }
-
-    public String getCsp_domain() {
-        return csp_domain;
-    }
-
-    public void setCsp_domain(String csp_domain) {
-        this.csp_domain = csp_domain;
-    }
-
-    public String getCadi_keyfile() {
-        return cadi_keyfile;
-    }
-
-    public void setCadi_keyfile(String cadi_keyfile) {
-        this.cadi_keyfile = cadi_keyfile;
-    }
-
-    public String getCadi_loglevel() {
-        return cadi_loglevel;
-    }
-
-    public void setCadi_loglevel(String cadi_loglevel) {
-        this.cadi_loglevel = cadi_loglevel;
-    }
-
-    public String getCadi_truststore() {
-        return cadi_truststore;
-    }
-
-    public void setCadi_truststore(String cadi_truststore) {
-        this.cadi_truststore = cadi_truststore;
-    }
-
-    public String getCadi_truststore_password() {
-        return cadi_truststore_password;
-    }
-
-    public void setCadi_truststore_password(String cadi_truststore_password) {
-        this.cadi_truststore_password = cadi_truststore_password;
-    }
-
-    public String getAaf_id() {
-        return aaf_id;
-    }
-
-    public void setAaf_id(String aaf_id) {
-        this.aaf_id = aaf_id;
-    }
-
-    public String getAaf_password() {
-        return aaf_password;
-    }
-
-    public void setAaf_password(String aaf_password) {
-        this.aaf_password = aaf_password;
-    }
-
-    public String getAaf_env() {
-        return aaf_env;
-    }
-
-    public void setAaf_env(String aaf_env) {
-        this.aaf_env = aaf_env;
-    }
-
-    public String getAafLocateUrl() {
-        return aafLocateUrl;
-    }
-
-    public void setAafLocateUrl(String aafLocateUrl) {
-        this.aafLocateUrl = aafLocateUrl;
-    }
-
-    public String getAaf_url() {
-        return aaf_url;
-    }
-
-    public void setAaf_url(String aaf_url) {
-        this.aaf_url = aaf_url;
-    }
-
-    public String getAFT_LATITUDE() {
-        return AFT_LATITUDE;
-    }
-
-    public void setAFT_LATITUDE(String aFT_LATITUDE) {
-        AFT_LATITUDE = aFT_LATITUDE;
-    }
-
-    public String getAFT_LONGITUDE() {
-        return AFT_LONGITUDE;
-    }
-
-    public void setAFT_LONGITUDE(String aFT_LONGITUDE) {
-        AFT_LONGITUDE = aFT_LONGITUDE;
-    }
-
-    public String getAFT_ENVIRONMENT() {
-        return AFT_ENVIRONMENT;
-    }
-
-    public void setAFT_ENVIRONMENT(String aFT_ENVIRONMENT) {
-        AFT_ENVIRONMENT = aFT_ENVIRONMENT;
-    }
-
-    public String getCadiX509Issuers() {
-        return cadiX509Issuers;
-    }
-
-    public void setCadiX509Issuers(String cadiX509Issuers) {
-        this.cadiX509Issuers = cadiX509Issuers;
-    }
-
 }
index 52d1def..dce327c 100644 (file)
@@ -1,7 +1,15 @@
 package org.openecomp.sdc.be.config;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
 /**
  * Contains DMAAP Client configuration parameters
  */
+@Getter
+@Setter
+@ToString
 public class DmaapProducerConfiguration {
 
        private Boolean active;
@@ -29,297 +37,31 @@ public class DmaapProducerConfiguration {
        private String dme2preferredRouterFilePath;
        private Credential credential;
        private Integer timeLimitForNotificationHandleMs;
-    private boolean aftDme2SslEnable;
-    private boolean aftDme2ClientIgnoreSslConfig;
-    private String aftDme2ClientKeystore;
-    private String aftDme2ClientKeystorePassword;
-    private String aftDme2ClientSslCertAlias;
-
-
-       public Boolean getActive() {
-               return active;
-       }
-
-       public void setActive(Boolean active) {
-               this.active = active;
-       }
-
-       public String getHosts() {
-               return hosts;
-       }
-
-       public void setHosts(String hosts) {
-               this.hosts = hosts;
-       }
-
-       public String getConsumerGroup() {
-               return consumerGroup;
-       }
-
-       public void setConsumerGroup(String consumerGroup) {
-               this.consumerGroup = consumerGroup;
-       }
-
-       public String getConsumerId() {
-               return consumerId;
-       }
-
-       public void setConsumerId(String consumerId) {
-               this.consumerId = consumerId;
-       }
-
-       public Integer getTimeoutMs() {
-               return timeoutMs;
-       }
-
-       public void setTimeoutMs(Integer timeoutMs) {
-               this.timeoutMs = timeoutMs;
-       }
-
-       public Integer getLimit() {
-               return limit;
-       }
-
-       public void setLimit(Integer limit) {
-               this.limit = limit;
-       }
-
-       public Integer getPollingInterval() {
-               return pollingInterval;
-       }
-
-       public void setPollingInterval(Integer pollingInterval) {
-               this.pollingInterval = pollingInterval;
-       }
-
-       public String getTopic() {
-               return topic;
-       }
-
-       public void setTopic(String topic) {
-               this.topic = topic;
-       }
-
-       public Double getLatitude() {
-               return latitude;
-       }
-
-       public void setLatitude(Double latitude) {
-               this.latitude = latitude;
-       }
-
-       public Double getLongitude() {
-               return longitude;
-       }
-
-       public void setLongitude(Double longitude) {
-               this.longitude = longitude;
-       }
-
-       public String getVersion() {
-               return version;
-       }
-
-       public void setVersion(String version) {
-               this.version = version;
-       }
-
-       public String getServiceName() {
-               return serviceName;
-       }
-
-       public void setServiceName(String serviceName) {
-               this.serviceName = serviceName;
-       }
-
-       public String getEnvironment() {
-               return environment;
-       }
-
-       public void setEnvironment(String environment) {
-               this.environment = environment;
-       }
-
-       public String getPartner() {
-               return partner;
-       }
-
-       public void setPartner(String partner) {
-               this.partner = partner;
-       }
-
-       public String getRouteOffer() {
-               return routeOffer;
-       }
-
-       public void setRouteOffer(String routeOffer) {
-               this.routeOffer = routeOffer;
-       }
-
-       public String getProtocol() {
-               return protocol;
-       }
-
-       public void setProtocol(String protocol) {
-               this.protocol = protocol;
-       }
-
-       public String getContenttype() {
-               return contenttype;
-       }
-
-       public void setContenttype(String contenttype) {
-               this.contenttype = contenttype;
-       }
+       private boolean aftDme2SslEnable;
+       private boolean aftDme2ClientIgnoreSslConfig;
+       private String aftDme2ClientKeystore;
+       private String aftDme2ClientKeystorePassword;
+       private String aftDme2ClientSslCertAlias;
 
        public Boolean isDme2TraceOn() {
                return dme2TraceOn;
        }
 
-       public Boolean getDme2TraceOn() {
-               return dme2TraceOn;
-       }
-
-       public void setDme2TraceOn(Boolean dme2TraceOn) {
-               this.dme2TraceOn = dme2TraceOn;
-       }
-
-       public String getAftEnvironment() {
-               return aftEnvironment;
-       }
-
-       public void setAftEnvironment(String aftEnvironment) {
-               this.aftEnvironment = aftEnvironment;
-       }
-
-       public Integer getAftDme2ConnectionTimeoutMs() {
-               return aftDme2ConnectionTimeoutMs;
-       }
-
-       public void setAftDme2ConnectionTimeoutMs(Integer aftDme2ConnectionTimeoutMs) {
-               this.aftDme2ConnectionTimeoutMs = aftDme2ConnectionTimeoutMs;
-       }
-
-       public Integer getAftDme2RoundtripTimeoutMs() {
-               return aftDme2RoundtripTimeoutMs;
-       }
-
-       public void setAftDme2RoundtripTimeoutMs(Integer aftDme2RoundtripTimeoutMs) {
-               this.aftDme2RoundtripTimeoutMs = aftDme2RoundtripTimeoutMs;
-       }
-
-       public Integer getAftDme2ReadTimeoutMs() {
-               return aftDme2ReadTimeoutMs;
-       }
-
-       public void setAftDme2ReadTimeoutMs(Integer aftDme2ReadTimeoutMs) {
-               this.aftDme2ReadTimeoutMs = aftDme2ReadTimeoutMs;
-       }
-
-       public String getDme2preferredRouterFilePath() {
-               return dme2preferredRouterFilePath;
-       }
-
-       public void setDme2preferredRouterFilePath(String dme2preferredRouterFilePath) {
-               this.dme2preferredRouterFilePath = dme2preferredRouterFilePath;
-       }
-
-       public Credential getCredential() {
-               return credential;
-       }
-
-       public void setCredential(Credential credential) {
-               this.credential = credential;
-       }
-
        /**
         * Contains Dmaap Client credential parameters: username and password
         */
+       @Getter
+       @Setter
        public static class Credential{
 
                private String username;
                private String password;
 
-               public String getUsername() {
-                       return username;
-               }
-               public void setUsername(String username) {
-                       this.username = username;
-               }
-               public String getPassword() {
-                       return password;
-               }
-               public void setPassword(String password) {
-                       this.password = password;
-               }
                @Override
                public String toString() {
                        return "Credential [username=" + username + ", password=" + password + "]";
                }
 
        }
-       public Integer getTimeLimitForNotificationHandleMs() {
-               return timeLimitForNotificationHandleMs;
-       }
-
-       public void setTimeLimitForNotificationHandleMs(Integer timeLimitForNotificationHandleMs) {
-               this.timeLimitForNotificationHandleMs = timeLimitForNotificationHandleMs;
-       }
-       
-    public boolean isAftDme2SslEnable() {
-        return aftDme2SslEnable;
-    }
-
-    public void setAftDme2SslEnable(boolean aftDme2SslEnable) {
-        this.aftDme2SslEnable = aftDme2SslEnable;
-    }
-
-    public boolean isAftDme2ClientIgnoreSslConfig() {
-        return aftDme2ClientIgnoreSslConfig;
-    }
-
-    public void setAftDme2ClientIgnoreSslConfig(boolean aftDme2ClientIgnoreSslConfig) {
-        this.aftDme2ClientIgnoreSslConfig = aftDme2ClientIgnoreSslConfig;
-    }
-
-    public String getAftDme2ClientKeystore() {
-        return aftDme2ClientKeystore;
-    }
-
-    public void setAftDme2ClientKeystore(String aftDme2ClientKeystore) {
-        this.aftDme2ClientKeystore = aftDme2ClientKeystore;
-    }
-
-    public String getAftDme2ClientKeystorePassword() {
-        return aftDme2ClientKeystorePassword;
-    }
-
-    public void setAftDme2ClientKeystorePassword(String aftDme2ClientKeystorePassword) {
-        this.aftDme2ClientKeystorePassword = aftDme2ClientKeystorePassword;
-    }
-
-    public String getAftDme2ClientSslCertAlias() {
-        return aftDme2ClientSslCertAlias;
-    }
-
-    public void setAftDme2ClientSslCertAlias(String aftDme2ClientSslCertAlias) {
-        this.aftDme2ClientSslCertAlias = aftDme2ClientSslCertAlias;
-    }
-    
-    @Override
-    public String toString() {
-        return "DmaapProducerConfiguration [hosts=" + hosts + ", consumerGroup=" + consumerGroup + ", consumerId="
-                + consumerId + ", timeoutMs=" + timeoutMs + ", limit=" + limit + ", pollingInterval=" + pollingInterval
-                + ", topic=" + topic + ", latitude=" + latitude + ", longitude=" + longitude + ", version=" + version
-                + ", serviceName=" + serviceName + ", environment=" + environment + ", partner=" + partner
-                + ", routeOffer=" + routeOffer + ", protocol=" + protocol + ", contenttype=" + contenttype
-                + ", dme2TraceOn=" + dme2TraceOn + ", aftEnvironment=" + aftEnvironment
-                + ", aftDme2ConnectionTimeoutMs=" + aftDme2ConnectionTimeoutMs + ", aftDme2RoundtripTimeoutMs="
-                + aftDme2RoundtripTimeoutMs + ", aftDme2ReadTimeoutMs=" + aftDme2ReadTimeoutMs
-                + ", dme2preferredRouterFilePath=" + dme2preferredRouterFilePath
-                + ", timeLimitForNotificationHandleMs=" + timeLimitForNotificationHandleMs+ ", credential=" + credential
-                + ", aftDme2SslEnable=" + aftDme2SslEnable + ", aftDme2ClientIgnoreSslConfig=" + aftDme2ClientIgnoreSslConfig
-                + ", aftDme2ClientKeystore=" + aftDme2ClientKeystore + ", aftDme2ClientSslCertAlias=" + aftDme2ClientSslCertAlias + "]";
-    }
 
 }
index 29c6350..80dac70 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.common.api;
 
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.Setter;
+
 import java.util.List;
 
+@Getter
+@Setter
+@AllArgsConstructor
 public class HealthCheckWrapper {
-
-       String sdcVersion;
-       String siteMode;
-       List<HealthCheckInfo> componentsInfo;
-
-       public HealthCheckWrapper(List<HealthCheckInfo> componentsInfo, String sdcVersion, String siteMode) {
-               super();
-               this.componentsInfo = componentsInfo;
-               this.sdcVersion = sdcVersion;
-               this.siteMode = siteMode;
-       }
-
-       public List<HealthCheckInfo> getComponentsInfo() {
-               return componentsInfo;
-       }
-
-       public void setComponentsInfo(List<HealthCheckInfo> componentsInfo) {
-               this.componentsInfo = componentsInfo;
-       }
-
-       public String getSdcVersion() {
-               return sdcVersion;
-       }
-
-       public void setSdcVersion(String sdcVersion) {
-               this.sdcVersion = sdcVersion;
-       }
-
-       public String getSiteMode() {
-               return siteMode;
-       }
-
-       public void setSiteMode(String siteMode) {
-               this.siteMode = siteMode;
-       }
+       private List<HealthCheckInfo> componentsInfo;
+       private String sdcVersion;
+       private String siteMode;
 
 }
index 38e5258..8eba312 100644 (file)
 
 package org.openecomp.sdc.be.datatypes.elements;
 
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
+@Getter
+@Setter
+@NoArgsConstructor
+@ToString
 public class AnnotationTypeDataDefinition extends ToscaDataDefinition {
 
     protected String uniqueId;
     protected String type;
+    protected String version;
+    protected boolean highestVersion;
     protected String description;
 
     protected Long creationTime;
     protected Long modificationTime;
 
-    protected String version;
-    protected boolean highestVersion;
-
-    public AnnotationTypeDataDefinition() {
-    }
-
     public AnnotationTypeDataDefinition(AnnotationTypeDataDefinition other) {
         uniqueId = other.uniqueId;
         type = other.type;
@@ -46,72 +50,4 @@ public class AnnotationTypeDataDefinition extends ToscaDataDefinition {
         modificationTime = other.modificationTime;
         highestVersion = other.highestVersion;
     }
-
-    public String getUniqueId() {
-        return uniqueId;
-    }
-
-    public void setUniqueId(String uniqueId) {
-        this.uniqueId = uniqueId;
-    }
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Long getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Long creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public Long getModificationTime() {
-        return modificationTime;
-    }
-
-    public void setModificationTime(Long modificationTime) {
-        this.modificationTime = modificationTime;
-    }
-
-    @Override
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public boolean isHighestVersion() {
-        return highestVersion;
-    }
-
-    public void setHighestVersion(boolean highestVersion) {
-        this.highestVersion = highestVersion;
-    }
-
-    @Override
-    public String toString() {
-        return getClass().getName() + ": [uniqueId=" + uniqueId + ", type=" + getType()
-                + ", version=" + version + ", highestVersion=" + highestVersion
-                + ", description=" + description
-                + ", creationTime=" + creationTime + ", modificationTime=" + modificationTime + "]";
-    }
-
-
 }
index 31c7916..af82508 100644 (file)
@@ -23,9 +23,16 @@ package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
 import java.util.HashMap;
 import java.util.Map;
 
+@Getter
+@Setter
+@NoArgsConstructor
 public class MapAttributesDataDefinition extends MapDataDefinition<AttributeDataDefinition> {
 
     private String parentName;
@@ -49,11 +56,6 @@ public class MapAttributesDataDefinition extends MapDataDefinition<AttributeData
         this.mapToscaDataDefinition = toBeDeepCopiedMapPropertiesDataDefinition.mapToscaDataDefinition == null ? null : new HashMap(toBeDeepCopiedMapPropertiesDataDefinition.mapToscaDataDefinition);
     }
 
-    public MapAttributesDataDefinition() {
-        super();
-
-    }
-
     @JsonValue
     @Override
     public Map<String, AttributeDataDefinition> getMapToscaDataDefinition() {
@@ -64,14 +66,4 @@ public class MapAttributesDataDefinition extends MapDataDefinition<AttributeData
     public void setMapToscaDataDefinition(Map<String, AttributeDataDefinition> mapToscaDataDefinition) {
         this.mapToscaDataDefinition = mapToscaDataDefinition;
     }
-
-    public String getParentName() {
-        return parentName;
-    }
-
-    public void setParentName(String parentName) {
-        this.parentName = parentName;
-    }
-
-
 }
index 749044b..e072a73 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 package org.onap.sdc.tosca.datatypes.model;
 
 
+import lombok.AllArgsConstructor;
+import lombok.Getter;
 
+@Getter
+@AllArgsConstructor
 public enum Directive {
 
 
   SELECTABLE("selectable"),
   SUBSTITUTABLE("substitutable");
 
-  private String displayName;
-
-  Directive(String displayName) {
-    this.displayName = displayName;
-  }
-
-  public String getDisplayName() {
-    return displayName;
-  }
-
+  private final String displayName;
 
 }