Adding unit tests 50/119150/2
authorxuegao <xue.gao@intl.att.com>
Thu, 11 Mar 2021 15:18:22 +0000 (16:18 +0100)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Thu, 11 Mar 2021 19:08:07 +0000 (19:08 +0000)
Adding unit tests to improve test coverage.

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

catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/AuditDistributionNotificationBuilder.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/MigrationTaskEntry.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/OperationalEnvironmentEntry.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/AuditingGetUebClusterEvent.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/AuthEvent.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/CategoryEvent.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/DistributionNotificationEvent.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/ExternalApiEvent.java

index a9dc988..efe8f70 100644 (file)
  */
 package org.openecomp.sdc.be.components.distribution.engine;
 
+import lombok.Getter;
 import org.openecomp.sdc.be.model.Service;
 import org.openecomp.sdc.be.model.User;
 
+@Getter
 public class AuditDistributionNotificationBuilder {
 
     private String topicName;
@@ -33,73 +35,41 @@ public class AuditDistributionNotificationBuilder {
     private String workloadContext;
     private String tenant;
 
-    public String getTopicName() {
-        return topicName;
-    }
-
     public AuditDistributionNotificationBuilder setTopicName(String topicName) {
         this.topicName = topicName;
         return this;
     }
 
-    public String getDistributionId() {
-        return distributionId;
-    }
-
     public AuditDistributionNotificationBuilder setDistributionId(String distributionId) {
         this.distributionId = distributionId;
         return this;
     }
 
-    public CambriaErrorResponse getStatus() {
-        return status;
-    }
-
     public AuditDistributionNotificationBuilder setStatus(CambriaErrorResponse status) {
         this.status = status;
         return this;
     }
 
-    public Service getService() {
-        return service;
-    }
-
     public AuditDistributionNotificationBuilder setService(Service service) {
         this.service = service;
         return this;
     }
 
-    public String getEnvId() {
-        return envId;
-    }
-
     public AuditDistributionNotificationBuilder setEnvId(String envId) {
         this.envId = envId;
         return this;
     }
 
-    public User getModifier() {
-        return modifier;
-    }
-
     public AuditDistributionNotificationBuilder setModifier(User modifier) {
         this.modifier = modifier;
         return this;
     }
 
-    public String getWorkloadContext() {
-        return workloadContext;
-    }
-
     public AuditDistributionNotificationBuilder setWorkloadContext(String workloadContext) {
         this.workloadContext = workloadContext;
         return this;
     }
 
-    public String getTenant() {
-        return tenant;
-    }
-
     public AuditDistributionNotificationBuilder setTenant(String tenant) {
         this.tenant = tenant;
         return this;
index d52fca3..a358897 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.
@@ -24,9 +24,13 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.util.Date;
 
+@Getter
+@Setter
 @Table(keyspace = "sdcrepository", name = "migrationTasks")
 public class MigrationTaskEntry {
 
@@ -55,68 +59,4 @@ public class MigrationTaskEntry {
 
     @Column(name = "description")
     private String description;
-
-    public void setMajorVersion(Long majorVersion) {
-        this.majorVersion = majorVersion;
-    }
-
-    public void setMinorVersion(Long minorVersion) {
-        this.minorVersion = minorVersion;
-    }
-
-    public void setTimestamp(Date timestamp) {
-        this.timestamp = timestamp;
-    }
-
-    public void setTaskName(String taskName) {
-        this.taskName = taskName;
-    }
-
-    public void setTaskStatus(String taskStatus) {
-        this.taskStatus = taskStatus;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public void setExecutionTime(double executionTime) {
-        this.executionTime = executionTime;
-    }
-
-    public Long getMajorVersion() {
-        return majorVersion;
-    }
-
-    public Long getMinorVersion() {
-        return minorVersion;
-    }
-
-    public Date getTimestamp() {
-        return timestamp;
-    }
-
-    public String getTaskName() {
-        return taskName;
-    }
-
-    public String getTaskStatus() {
-        return taskStatus;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public double getExecutionTime() {
-        return executionTime;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
 }
index 364cd22..8b7032d 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.
@@ -23,12 +23,16 @@ package org.openecomp.sdc.be.resources.data;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.datatypes.enums.EnvironmentStatusEnum;
 
 import java.util.Date;
 import java.util.HashSet;
 import java.util.Set;
 
+@Getter
+@Setter
 @Table(keyspace = "sdcrepository", name = "operationalEnvironment")
 public class OperationalEnvironmentEntry {
 
@@ -57,53 +61,12 @@ public class OperationalEnvironmentEntry {
     @Column(name = "status")
     private String status;
 
-    public Date getLastModified() {
-        return lastModified;
-    }
-
-    public void setLastModified(Date lastModified) {
-        this.lastModified = lastModified;
-    }
-
     @Column(name = "last_modified")
     private Date lastModified;
 
 
-    public String getEnvironmentId() {
-        return environmentId;
-    }
-
-    //must be unique, add any validation if neccessary
-    public void setEnvironmentId(String environmentId) {
-        this.environmentId = environmentId;
-    }
-
-    public String getTenant() {
-        return tenant;
-    }
-
-    public void setTenant(String tenant) {
-        this.tenant = tenant;
-    }
-
-    public Boolean getIsProduction() {
-        return isProduction;
-    }
-
-    public void setIsProduction(Boolean production) {
-        isProduction = production;
-    }
-
-    public String getEcompWorkloadContext() {
-        return ecompWorkloadContext;
-    }
-
-    public void setEcompWorkloadContext(String ecompWorkloadContext) {
-        this.ecompWorkloadContext = ecompWorkloadContext;
-    }
-
-    public String getStatus() {
-        return status;
+    public void setStatus(EnvironmentStatusEnum status) {
+        this.status = status.getName();
     }
 
     public void setStatus(String status) {
@@ -111,47 +74,19 @@ public class OperationalEnvironmentEntry {
         this.status = status;
     }
 
-    public void setStatus(EnvironmentStatusEnum status) {
-        this.status = status.getName();
-    }
-
-    public Set<String> getDmaapUebAddress() {
-        return dmaapUebAddress;
-    }
-
-    public void setDmaapUebAddress(Set<String> dmaapUebAddress) {
-        this.dmaapUebAddress = dmaapUebAddress;
-    }
-
     public void addDmaapUebAddress(String address) {
         if ( this.dmaapUebAddress == null )
             this.dmaapUebAddress = new HashSet<>();
         dmaapUebAddress.add(address);
     }
 
-    public String getUebApikey() {
-        return uebApikey;
-    }
-
-    public void setUebApikey(String uebApikey) {
-        this.uebApikey = uebApikey;
-    }
-
-    public String getUebSecretKey() {
-        return uebSecretKey;
-    }
-
-    public void setUebSecretKey(String uebSecretKey) {
-        this.uebSecretKey = uebSecretKey;
-    }
-    
     @Override
-       public String toString() {
-               return "OperationalEnvironmentEntry [environmentId=" + environmentId + ", tenant=" + tenant + ", isProduction="
-                               + isProduction + ", ecompWorkloadContext=" + ecompWorkloadContext + ", dmaapUebAddress="
-                               + dmaapUebAddress + ", uebApikey=" + uebApikey + ", status=" + status
-                               + ", lastModified=" + lastModified + "]";
-       }
+    public String toString() {
+        return "OperationalEnvironmentEntry [environmentId=" + environmentId + ", tenant=" + tenant + ", isProduction="
+                + isProduction + ", ecompWorkloadContext=" + ecompWorkloadContext + ", dmaapUebAddress="
+                + dmaapUebAddress + ", uebApikey=" + uebApikey + ", status=" + status
+                + ", lastModified=" + lastModified + "]";
+    }
 
 
 }
index f0b1e63..17a7946 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,6 +25,9 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.resources.data.auditing.model.CommonAuditData;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
 
@@ -33,6 +36,8 @@ import java.util.Date;
 import java.util.TimeZone;
 import java.util.UUID;
 
+@Getter
+@Setter
 @Table(keyspace = AuditingTypesConstants.AUDIT_KEYSPACE, name = AuditingTypesConstants.DISTRIBUTION_GET_UEB_CLUSTER_EVENT_TYPE)
 public class AuditingGetUebClusterEvent extends AuditingGenericEvent {
 
@@ -40,7 +45,7 @@ public class AuditingGetUebClusterEvent extends AuditingGenericEvent {
     protected UUID timebaseduuid;
 
     @ClusteringColumn
-    protected Date timestamp1;
+    @Setter(AccessLevel.NONE)protected Date timestamp1;
 
     @Column(name = "request_id")
     protected String requestId;
@@ -77,6 +82,9 @@ public class AuditingGetUebClusterEvent extends AuditingGenericEvent {
     public void setTimestamp1(String timestamp) {
         this.timestamp1 = parseDateFromString(timestamp);
     }
+    public void setTimestamp1(Date timestamp) {
+        this.timestamp1 = timestamp;
+    }
 
     @Override
     public void fillFields() {
@@ -93,70 +101,6 @@ public class AuditingGetUebClusterEvent extends AuditingGenericEvent {
 
     }
 
-    public String getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(String consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    public UUID getTimebaseduuid() {
-        return timebaseduuid;
-    }
-
-    public void setTimebaseduuid(UUID timebaseduuid) {
-        this.timebaseduuid = timebaseduuid;
-    }
-
-    public Date getTimestamp1() {
-        return timestamp1;
-    }
-
-    public void setTimestamp1(Date timestamp1) {
-        this.timestamp1 = timestamp1;
-    }
-
-    public String getRequestId() {
-        return requestId;
-    }
-
-    public void setRequestId(String requestId) {
-        this.requestId = requestId;
-    }
-
-    public String getServiceInstanceId() {
-        return serviceInstanceId;
-    }
-
-    public void setServiceInstanceId(String serviceInstanceId) {
-        this.serviceInstanceId = serviceInstanceId;
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setAction(String action) {
-        this.action = action;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
     @Override
     public String toString() {
         return "AuditingGetUebClusterEvent [timebaseduuid=" + timebaseduuid + ", timestamp1=" + timestamp1
index dfa0ed9..0133a73 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,6 +25,8 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.resources.data.auditing.model.CommonAuditData;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
 
@@ -33,6 +35,8 @@ import java.util.Date;
 import java.util.TimeZone;
 import java.util.UUID;
 
+@Getter
+@Setter
 @Table(keyspace = "sdcaudit", name = AuditingTypesConstants.AUTH_EVENT_TYPE)
 public class AuthEvent extends AuditingGenericEvent {
 
@@ -81,90 +85,14 @@ public class AuthEvent extends AuditingGenericEvent {
         timebaseduuid = UUIDs.timeBased();
     }
 
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public String getAuthStatus() {
-        return authStatus;
-    }
-
-    public void setAuthStatus(String authStatus) {
-        this.authStatus = authStatus;
-    }
-
-    public String getRealm() {
-        return realm;
-    }
-
-    public void setRealm(String realm) {
-        this.realm = realm;
-    }
-
-    public UUID getTimebaseduuid() {
-        return timebaseduuid;
-    }
-
-    public void setTimebaseduuid(UUID timebaseduuid) {
-        this.timebaseduuid = timebaseduuid;
-    }
-
-    public Date getTimestamp1() {
-        return timestamp1;
-    }
-
-    public void setTimestamp1(Date timestamp1) {
-        this.timestamp1 = timestamp1;
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setAction(String action) {
-        this.action = action;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getRequestId() {
-        return requestId;
-    }
-
-    public void setRequestId(String requestId) {
-        this.requestId = requestId;
-    }
-
     public void setTimestamp1(String timestamp) {
         this.timestamp1 = parseDateFromString(timestamp);
     }
 
+    public void setTimestamp1(Date timestamp) {
+        this.timestamp1 = timestamp;
+    }
+
     @Override
     public void fillFields() {
         fields.put(AuditingFieldsKey.AUDIT_AUTH_URL.getDisplayName(), getUrl());
index 95d31d9..bb3603d 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,6 +25,8 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.resources.data.auditing.model.CommonAuditData;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
 
@@ -33,6 +35,8 @@ import java.util.Date;
 import java.util.TimeZone;
 import java.util.UUID;
 
+@Getter
+@Setter
 @Table(keyspace = AuditingTypesConstants.AUDIT_KEYSPACE, name = AuditingTypesConstants.CATEGORY_EVENT_TYPE)
 public class CategoryEvent extends AuditingGenericEvent {
 
@@ -95,6 +99,10 @@ public class CategoryEvent extends AuditingGenericEvent {
         this.timestamp1 = parseDateFromString(timestamp);
     }
 
+    public void setTimestamp1(Date timestamp) {
+        this.timestamp1 = timestamp;
+    }
+
     @Override
     public void fillFields() {
 
@@ -113,101 +121,4 @@ public class CategoryEvent extends AuditingGenericEvent {
         fields.put(AuditingFieldsKey.AUDIT_TIMESTAMP.getDisplayName(), simpleDateFormat.format(timestamp1));
 
     }
-
-    public UUID getTimebaseduuid() {
-        return timebaseduuid;
-    }
-
-    public void setTimebaseduuid(UUID timebaseduuid) {
-        this.timebaseduuid = timebaseduuid;
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setAction(String action) {
-        this.action = action;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getCategoryName() {
-        return categoryName;
-    }
-
-    public void setCategoryName(String categoryName) {
-        this.categoryName = categoryName;
-    }
-
-    public String getSubCategoryName() {
-        return subCategoryName;
-    }
-
-    public void setSubCategoryName(String subCategoryName) {
-        this.subCategoryName = subCategoryName;
-    }
-
-    public String getGroupingName() {
-        return groupingName;
-    }
-
-    public void setGroupingName(String groupingName) {
-        this.groupingName = groupingName;
-    }
-
-    public Date getTimestamp1() {
-        return timestamp1;
-    }
-
-    public void setTimestamp1(Date timestamp1) {
-        this.timestamp1 = timestamp1;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getServiceInstanceId() {
-        return serviceInstanceId;
-    }
-
-    public void setServiceInstanceId(String serviceInstanceId) {
-        this.serviceInstanceId = serviceInstanceId;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getRequestId() {
-        return requestId;
-    }
-
-    public void setRequestId(String requestId) {
-        this.requestId = requestId;
-    }
-
 }
index 12b8c0c..174dea6 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,6 +25,9 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.resources.data.auditing.model.CommonAuditData;
 import org.openecomp.sdc.be.resources.data.auditing.model.OperationalEnvAuditData;
 import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
@@ -36,6 +39,8 @@ import java.util.Date;
 import java.util.TimeZone;
 import java.util.UUID;
 
+@Getter
+@Setter
 @Table(keyspace = AuditingTypesConstants.AUDIT_KEYSPACE, name = AuditingTypesConstants.DISTRIBUTION_NOTIFICATION_EVENT_TYPE)
 public class DistributionNotificationEvent extends AuditingGenericEvent {
 
@@ -43,7 +48,7 @@ public class DistributionNotificationEvent extends AuditingGenericEvent {
     protected UUID timebaseduuid;
 
     @ClusteringColumn
-    protected Date timestamp1;
+    @Setter(AccessLevel.NONE)protected Date timestamp1;
 
     @Column(name = "request_id")
     protected String requestId;
@@ -120,6 +125,10 @@ public class DistributionNotificationEvent extends AuditingGenericEvent {
         this.timestamp1 = parseDateFromString(timestamp);
     }
 
+    public void setTimestamp1(Date timestamp) {
+        this.timestamp1 = timestamp;
+    }
+
     @Override
     public void fillFields() {
         fields.put(AuditingFieldsKey.AUDIT_REQUEST_ID.getDisplayName(), getRequestId());
@@ -144,142 +153,6 @@ public class DistributionNotificationEvent extends AuditingGenericEvent {
         fields.put(AuditingFieldsKey.AUDIT_TIMESTAMP.getDisplayName(), simpleDateFormat.format(timestamp1));
     }
 
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getCurrVersion() {
-        return currVersion;
-    }
-
-    public void setCurrVersion(String currVersion) {
-        this.currVersion = currVersion;
-    }
-
-    public String getCurrState() {
-        return currState;
-    }
-
-    public void setCurrState(String currState) {
-        this.currState = currState;
-    }
-
-    public String getTopicName() {
-        return topicName;
-    }
-
-    public void setTopicName(String topicName) {
-        this.topicName = topicName;
-    }
-
-    public UUID getTimebaseduuid() {
-        return timebaseduuid;
-    }
-
-    public void setTimebaseduuid(UUID timebaseduuid) {
-        this.timebaseduuid = timebaseduuid;
-    }
-
-    public Date getTimestamp1() {
-        return timestamp1;
-    }
-
-    public void setTimestamp1(Date timestamp1) {
-        this.timestamp1 = timestamp1;
-    }
-
-    public String getRequestId() {
-        return requestId;
-    }
-
-    public void setRequestId(String requestId) {
-        this.requestId = requestId;
-    }
-
-    public String getServiceInstanceId() {
-        return serviceInstanceId;
-    }
-
-    public void setServiceInstanceId(String serviceInstanceId) {
-        this.serviceInstanceId = serviceInstanceId;
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setAction(String action) {
-        this.action = action;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getDid() {
-        return did;
-    }
-
-    public void setDid(String did) {
-        this.did = did;
-    }
-
-    public String getVnfWorkloadContext() {
-        return vnfWorkloadContext;
-    }
-
-    public void setVnfWorkloadContext(String vnfWorkloadContext) {
-        this.vnfWorkloadContext = vnfWorkloadContext;
-    }
-
-    public String getEnvId() {
-        return envId;
-    }
-
-    public void setEnvId(String envId) {
-        this.envId = envId;
-    }
-
-    public String getTenant() {
-        return tenant;
-    }
-
-    public void setTenant(String tenant) {
-        this.tenant = tenant;
-    }
-
     @Override
     public String toString() {
         return "DistributionNotificationEvent [timebaseduuid=" + timebaseduuid + ", timestamp1=" + timestamp1
index d04a7df..3d10792 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,6 +25,8 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn;
 import com.datastax.driver.mapping.annotations.Column;
 import com.datastax.driver.mapping.annotations.PartitionKey;
 import com.datastax.driver.mapping.annotations.Table;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.resources.data.auditing.model.CommonAuditData;
 import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
 import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
@@ -37,9 +39,11 @@ import java.util.TimeZone;
 import java.util.UUID;
 
 /**
- * This class Represents the Audit for External API 
+ * This class Represents the Audit for External API
  *
  */
+@Getter
+@Setter
 @Table(keyspace = AuditingTypesConstants.AUDIT_KEYSPACE, name = AuditingTypesConstants.EXTERNAL_API_EVENT_TYPE)
 public class ExternalApiEvent extends AuditingGenericEvent {
     @PartitionKey
@@ -154,126 +158,6 @@ public class ExternalApiEvent extends AuditingGenericEvent {
         fields.put(AuditingFieldsKey.AUDIT_ARTIFACT_DATA.getDisplayName(), getArtifactData());
     }
 
-    public UUID getTimebaseduuid() {
-        return timebaseduuid;
-    }
-
-    public void setTimebaseduuid(UUID timebaseduuid) {
-        this.timebaseduuid = timebaseduuid;
-    }
-
-    public Date getTimestamp1() {
-        return timestamp1;
-    }
-
-    public void setTimestamp1(Date timestamp1) {
-        this.timestamp1 = timestamp1;
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setAction(String action) {
-        this.action = action;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(String consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    public String getResourceURL() {
-        return resourceURL;
-    }
-
-    public void setResourceURL(String resourceURL) {
-        this.resourceURL = resourceURL;
-    }
-
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getServiceInstanceId() {
-        return serviceInstanceId;
-    }
-
-    public void setServiceInstanceId(String serviceInstanceId) {
-        this.serviceInstanceId = serviceInstanceId;
-    }
-
-    public String getInvariantUuid() {
-        return invariantUuid;
-    }
-
-    public void setInvariantUuid(String invariantUuid) {
-        this.invariantUuid = invariantUuid;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getPrevArtifactUuid() {
-        return prevArtifactUuid;
-    }
-
-    public void setPrevArtifactUuid(String prevArtifactUuid) {
-        this.prevArtifactUuid = prevArtifactUuid;
-    }
-
-    public String getCurrArtifactUuid() {
-        return currArtifactUuid;
-    }
-
-    public void setCurrArtifactUuid(String currArtifactUuid) {
-        this.currArtifactUuid = currArtifactUuid;
-    }
-
-    public String getArtifactData() {
-        return artifactData;
-    }
-
-    public void setArtifactData(String artifactData) {
-        this.artifactData = artifactData;
-    }
-
     @Override
     public String toString() {
         return "ExternalApiEvent [timebaseduuid=" + timebaseduuid + ", timestamp1=" + timestamp1 + ", action=" + action
@@ -285,36 +169,4 @@ public class ExternalApiEvent extends AuditingGenericEvent {
                 + ", prevArtifactUuid="
                 + prevArtifactUuid + ", currArtifactUuid=" + currArtifactUuid + ", artifactData=" + artifactData + "]";
     }
-
-    public String getPrevVersion() {
-        return prevVersion;
-    }
-
-    public void setPrevVersion(String prevVersion) {
-        this.prevVersion = prevVersion;
-    }
-
-    public String getCurrVersion() {
-        return currVersion;
-    }
-
-    public void setCurrVersion(String currVersion) {
-        this.currVersion = currVersion;
-    }
-
-    public String getPrevState() {
-        return prevState;
-    }
-
-    public void setPrevState(String prevState) {
-        this.prevState = prevState;
-    }
-
-    public String getCurrState() {
-        return currState;
-    }
-
-    public void setCurrState(String currState) {
-        this.currState = currState;
-    }
 }