summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2020-03-26 14:20:02 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-03-30 12:03:46 +0000
commit4f02f33f309c3869d231926582f559aa04816063 (patch)
tree580c7c31bd75204a81864a89d5bb6557dc67c83f /catalog-model/src/main/java
parentee80eb11d8ace0117ea1084c5ac16d8d271b8fd9 (diff)
Increase test coverage
Change-Id: Ibc6134e5954537258541ff018dc9794191d4e907 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2833
Diffstat (limited to 'catalog-model/src/main/java')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java59
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java11
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java29
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java33
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java268
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java260
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java109
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java80
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java94
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java36
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java108
11 files changed, 128 insertions, 959 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
index 63353c167d..638e2361d6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
@@ -19,7 +19,11 @@ package org.openecomp.sdc.be.ui.model;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class UIConstraint implements Serializable {
private String servicePropertyName;
@@ -39,7 +43,7 @@ public class UIConstraint implements Serializable {
}
public UIConstraint(String servicePropertyName, String constraintOperator, String sourceType, String sourceName,
- Object value) {
+ Object value) {
this.servicePropertyName = servicePropertyName;
this.constraintOperator = constraintOperator;
this.sourceType = sourceType;
@@ -47,46 +51,6 @@ public class UIConstraint implements Serializable {
this.value = value;
}
- public String getServicePropertyName() {
- return servicePropertyName;
- }
-
- public void setServicePropertyName(String servicePropertyName) {
- this.servicePropertyName = servicePropertyName;
- }
-
- public String getConstraintOperator() {
- return constraintOperator;
- }
-
- public void setConstraintOperator(String constraintOperator) {
- this.constraintOperator = constraintOperator;
- }
-
- public String getSourceType() {
- return sourceType;
- }
-
- public void setSourceType(String sourceType) {
- this.sourceType = sourceType;
- }
-
- public Object getValue() {
- return value;
- }
-
- public void setValue(Object value) {
- this.value = value;
- }
-
- public String getSourceName() {
- return sourceName;
- }
-
- public void setSourceName(String sourceName) {
- this.sourceName = sourceName;
- }
-
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -97,21 +61,20 @@ public class UIConstraint implements Serializable {
}
UIConstraint that = (UIConstraint) o;
return Objects.equal(getServicePropertyName(), that.getServicePropertyName()) && Objects.equal(
- getConstraintOperator(), that.getConstraintOperator()) && Objects.equal(getSourceType(),
- that.getSourceType()) && Objects.equal(getSourceName(), that.getSourceName()) && Objects.equal(
- getValue(), that.getValue());
+ getConstraintOperator(), that.getConstraintOperator()) && Objects.equal(getSourceType(),
+ that.getSourceType()) && Objects.equal(getSourceName(), that.getSourceName()) && Objects.equal(
+ getValue(), that.getValue());
}
@Override
public int hashCode() {
- return Objects.hashCode(getServicePropertyName(), getConstraintOperator(), getSourceType(), getSourceName(),
- getValue());
+ return Objects.hashCode(servicePropertyName, constraintOperator, sourceType, sourceName, value);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("servicePropertyName", servicePropertyName)
- .add("constraintOperator", constraintOperator).add("sourceType", sourceType)
- .add("sourceName", sourceName).add("value", value).toString();
+ .add("constraintOperator", constraintOperator).add("sourceType", sourceType)
+ .add("sourceName", sourceName).add("value", value).toString();
}
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
index 16ce3a837b..84df74c47f 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
@@ -16,16 +16,13 @@
package org.openecomp.sdc.be.ui.model;
import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class UINodeFilter {
private List<UIConstraint> properties;
- public List<UIConstraint> getProperties() {
- return properties;
- }
-
- public void setProperties(List<UIConstraint> properties) {
- this.properties = properties;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
index 8bbe02e008..99c0d33b17 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
@@ -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,32 +20,17 @@
package org.openecomp.sdc.be.ui.model;
-import org.openecomp.sdc.be.model.category.CategoryDefinition;
-
import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+import org.openecomp.sdc.be.model.category.CategoryDefinition;
+@Getter
+@Setter
public class UiCategories {
private List<CategoryDefinition> resourceCategories;
private List<CategoryDefinition> serviceCategories;
private List<CategoryDefinition> productCategories;
- public List<CategoryDefinition> getResourceCategories() {
- return resourceCategories;
- }
- public void setResourceCategories(List<CategoryDefinition> resourceCategories) {
- this.resourceCategories = resourceCategories;
- }
- public List<CategoryDefinition> getServiceCategories() {
- return serviceCategories;
- }
- public void setServiceCategories(List<CategoryDefinition> serviceCategories) {
- this.serviceCategories = serviceCategories;
- }
- public List<CategoryDefinition> getProductCategories() {
- return productCategories;
- }
- public void setProductCategories(List<CategoryDefinition> productCategories) {
- this.productCategories = productCategories;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
index c9a94ce77a..952f3b1ff8 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
@@ -18,35 +18,14 @@
package org.openecomp.sdc.be.ui.model;
-import com.google.common.annotations.VisibleForTesting;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+@Getter
+@AllArgsConstructor
public class UiCombination {
- String name;
- String description;
+ private final String name;
+ private final String description;
- @VisibleForTesting
- UiCombination() {
- }
-
- public UiCombination(String name, String description) {
- this.name = name;
- this.description = description;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
index 4272a5c485..38d5a90742 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
@@ -21,6 +21,10 @@
package org.openecomp.sdc.be.ui.model;
+import java.util.List;
+import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
@@ -39,48 +43,31 @@ import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
import org.openecomp.sdc.be.model.RequirementDefinition;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
-import java.util.List;
-import java.util.Map;
-
+@Getter
+@Setter
public class UiComponentDataTransfer {
-
+ protected ComponentTypeEnum componentType;
+ protected List<AdditionalInformationDefinition> additionalInformation;
private Map<String, ArtifactDefinition> artifacts;
private Map<String, ArtifactDefinition> deploymentArtifacts;
private Map<String, ArtifactDefinition> toscaArtifacts;
-
private List<CategoryDefinition> categories;
-
// User
private String creatorUserId;
private String creatorFullName;
private String lastUpdaterUserId;
private String lastUpdaterFullName;
-
- protected ComponentTypeEnum componentType;
-
private List<ComponentInstance> componentInstances;
-
private List<RequirementCapabilityRelDef> componentInstancesRelations;
-
private Map<String, List<ComponentInstanceInput>> componentInstancesInputs;
-
private Map<String, List<ComponentInstanceProperty>> componentInstancesProperties;
-
private Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes;
-
private Map<String, List<CapabilityDefinition>> capabilities;
-
private List<PolicyDefinition> policies;
-
private Map<String, List<RequirementDefinition>> requirements;
-
private List<InputDefinition> inputs;
-
private List<GroupDefinition> groups;
-
- protected List<AdditionalInformationDefinition> additionalInformation;
-
private Map<String, InterfaceDefinition> interfaces;
private Map<String, CINodeFilterDataDefinition> nodeFilter;
@@ -89,246 +76,7 @@ public class UiComponentDataTransfer {
private List<PropertyDefinition> properties;
private Map<String, List<ComponentInstanceInterface>> componentInstancesInterfaces;
- public Map<String, InterfaceDefinition> getInterfaces() {
- return interfaces;
- }
-
- public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
- this.interfaces = interfaces;
- }
-
public UiComponentDataTransfer() {
}
- public Map<String, ArtifactDefinition> getArtifacts() {
- return artifacts;
- }
-
-
- public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
- this.artifacts = artifacts;
- }
-
-
- public Map<String, ArtifactDefinition> getDeploymentArtifacts() {
- return deploymentArtifacts;
- }
-
-
- public void setDeploymentArtifacts(Map<String, ArtifactDefinition> deploymentArtifacts) {
- this.deploymentArtifacts = deploymentArtifacts;
- }
-
-
- public Map<String, ArtifactDefinition> getToscaArtifacts() {
- return toscaArtifacts;
- }
-
-
- public void setToscaArtifacts(Map<String, ArtifactDefinition> toscaArtifacts) {
- this.toscaArtifacts = toscaArtifacts;
- }
-
-
- public List<CategoryDefinition> getCategories() {
- return categories;
- }
-
-
- public void setCategories(List<CategoryDefinition> categories) {
- this.categories = categories;
- }
-
-
- public String getCreatorUserId() {
- return creatorUserId;
- }
-
-
- public void setCreatorUserId(String creatorUserId) {
- this.creatorUserId = creatorUserId;
- }
-
-
- public String getCreatorFullName() {
- return creatorFullName;
- }
-
-
- public void setCreatorFullName(String creatorFullName) {
- this.creatorFullName = creatorFullName;
- }
-
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
-
- public ComponentTypeEnum getComponentType() {
- return componentType;
- }
-
-
- public void setComponentType(ComponentTypeEnum componentType) {
- this.componentType = componentType;
- }
-
-
- public List<ComponentInstance> getComponentInstances() {
- return componentInstances;
- }
-
-
- public void setComponentInstances(List<ComponentInstance> componentInstances) {
- this.componentInstances = componentInstances;
- }
-
-
- public List<RequirementCapabilityRelDef> getComponentInstancesRelations() {
- return componentInstancesRelations;
- }
-
-
- public void setComponentInstancesRelations(List<RequirementCapabilityRelDef> componentInstancesRelations) {
- this.componentInstancesRelations = componentInstancesRelations;
- }
-
-
- public Map<String, List<ComponentInstanceInput>> getComponentInstancesInputs() {
- return componentInstancesInputs;
- }
-
-
- public void setComponentInstancesInputs(Map<String, List<ComponentInstanceInput>> componentInstancesInputs) {
- this.componentInstancesInputs = componentInstancesInputs;
- }
-
-
- public Map<String, List<ComponentInstanceProperty>> getComponentInstancesProperties() {
- return componentInstancesProperties;
- }
-
-
- public void setComponentInstancesProperties(Map<String, List<ComponentInstanceProperty>> componentInstancesProperties) {
- this.componentInstancesProperties = componentInstancesProperties;
- }
-
-
- public Map<String, List<ComponentInstanceProperty>> getComponentInstancesAttributes() {
- return componentInstancesAttributes;
- }
-
-
- public void setComponentInstancesAttributes(
- Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes) {
- this.componentInstancesAttributes = componentInstancesAttributes;
- }
-
-
- public Map<String, List<CapabilityDefinition>> getCapabilities() {
- return capabilities;
- }
-
-
- public void setCapabilities(Map<String, List<CapabilityDefinition>> capabilities) {
- this.capabilities = capabilities;
- }
-
-
- public Map<String, List<RequirementDefinition>> getRequirements() {
- return requirements;
- }
-
-
- public void setRequirements(Map<String, List<RequirementDefinition>> requirements) {
- this.requirements = requirements;
- }
-
-
- public List<InputDefinition> getInputs() {
- return inputs;
- }
-
-
- public void setInputs(List<InputDefinition> inputs) {
- this.inputs = inputs;
- }
-
-
- public List<GroupDefinition> getGroups() {
- return groups;
- }
-
-
- public void setGroups(List<GroupDefinition> groups) {
- this.groups = groups;
- }
-
-
- public List<AdditionalInformationDefinition> getAdditionalInformation() {
- return additionalInformation;
- }
-
-
- public void setAdditionalInformation(List<AdditionalInformationDefinition> additionalInformation) {
- this.additionalInformation = additionalInformation;
- }
-
- public List<PolicyDefinition> getPolicies() {
- return policies;
- }
-
- public void setPolicies(List<PolicyDefinition> policies) {
- this.policies = policies;
- }
-
- public Map<String, CINodeFilterDataDefinition> getNodeFilter() {
- return nodeFilter;
- }
-
- public void setNodeFilter(Map<String, CINodeFilterDataDefinition> nodeFilter) {
- this.nodeFilter = nodeFilter;
- }
-
- public Map<String, UINodeFilter> getNodeFilterData() {
- return nodeFilterforNode;
- }
-
- public void setNodeFilterData(Map<String, UINodeFilter> nodeFilterforNode) {
- this.nodeFilterforNode = nodeFilterforNode;
- }
-
- public List<PropertyDefinition> getProperties() {
- return properties;
- }
-
- public void setProperties(List<PropertyDefinition> properties) {
- this.properties = properties;
- }
-
- public Map<String, List<ComponentInstanceInterface>> getComponentInstancesInterfaces() {
- return componentInstancesInterfaces;
- }
-
- public void setComponentInstancesInterfaces(
- Map<String, List<ComponentInstanceInterface>> componentInstancesInterfaces) {
- this.componentInstancesInterfaces = componentInstancesInterfaces;
- }
-
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
index d0c7874323..2a7c036d3e 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
@@ -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,13 +20,16 @@
package org.openecomp.sdc.be.ui.model;
+import java.util.List;
+import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
-import java.util.List;
-import java.util.Map;
-
+@Getter
+@Setter
public abstract class UiComponentMetadata {
private String uniqueId;
@@ -87,9 +90,10 @@ public abstract class UiComponentMetadata {
private Long archiveTime;
private Boolean isVspArchived;
- public UiComponentMetadata(){}
+ public UiComponentMetadata() {
+ }
- public UiComponentMetadata (List<CategoryDefinition> categories, ComponentMetadataDataDefinition metadata) {
+ public UiComponentMetadata(List<CategoryDefinition> categories, ComponentMetadataDataDefinition metadata) {
this.uniqueId = metadata.getUniqueId();
this.name = metadata.getName(); // archiveName
@@ -124,246 +128,4 @@ public abstract class UiComponentMetadata {
this.isVspArchived = metadata.isVspArchived();
}
-
-
- public List<CategoryDefinition> getCategories() {
- return categories;
- }
-
- public void setCategories(List<CategoryDefinition> categories) {
- this.categories = categories;
- }
-
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public Boolean getIsHighestVersion() {
- return isHighestVersion;
- }
-
- public void setIsHighestVersion(Boolean isHighestVersion) {
- this.isHighestVersion = isHighestVersion;
- }
-
- public Long getCreationDate() {
- return creationDate;
- }
-
- public void setCreationDate(Long creationDate) {
- this.creationDate = creationDate;
- }
-
- public Long getLastUpdateDate() {
- return lastUpdateDate;
- }
-
- public void setLastUpdateDate(Long lastUpdateDate) {
- this.lastUpdateDate = lastUpdateDate;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String state) {
- this.lifecycleState = state;
- }
-
- public List<String> getTags() {
- return tags;
- }
-
- public void setTags(List<String> tags) {
- this.tags = tags;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public String getUUID() {
- return UUID;
- }
-
- public void setUUID(String uUID) {
- UUID = uUID;
- }
-
- public String getNormalizedName() {
- return normalizedName;
- }
-
- public void setNormalizedName(String normalizedName) {
- this.normalizedName = normalizedName;
- }
-
- public String getSystemName() {
- return systemName;
- }
-
- public void setSystemName(String systemName) {
- this.systemName = systemName;
- }
-
- public String getContactId() {
- return contactId;
- }
-
- public void setContactId(String contactId) {
- this.contactId = contactId;
- }
-
- public Map<String, String> getAllVersions() {
- return allVersions;
- }
-
- public void setAllVersions(Map<String, String> allVersions) {
- this.allVersions = allVersions;
- }
-
- public Boolean getIsDeleted() {
- return isDeleted;
- }
-
- public void setIsDeleted(Boolean isDeleted) {
- this.isDeleted = isDeleted;
- }
-
- public String getProjectCode() {
- return projectCode;
- }
-
- public void setProjectCode(String projectCode) {
- this.projectCode = projectCode;
- }
-
- public String getCsarUUID() {
- return csarUUID;
- }
-
- public void setCsarUUID(String csarUUID) {
- this.csarUUID = csarUUID;
- }
-
- public String getCsarVersion() {
- return csarVersion;
- }
-
- public void setCsarVersion(String csarVersion) {
- this.csarVersion = csarVersion;
- }
-
- public String getImportedToscaChecksum() {
- return importedToscaChecksum;
- }
-
- public void setImportedToscaChecksum(String importedToscaChecksum) {
- this.importedToscaChecksum = importedToscaChecksum;
- }
-
- public String getInvariantUUID() {
- return invariantUUID;
- }
-
- public void setInvariantUUID(String invariantUUID) {
- this.invariantUUID = invariantUUID;
- }
-
- public ComponentTypeEnum getComponentType() {
- return componentType;
- }
-
- public void setComponentType(ComponentTypeEnum componentType) {
- this.componentType = componentType;
- }
-
- public String getCreatorUserId() {
- return creatorUserId;
- }
-
- public void setCreatorUserId(String creatorUserId) {
- this.creatorUserId = creatorUserId;
- }
-
- public String getCreatorFullName() {
- return creatorFullName;
- }
-
- public void setCreatorFullName(String creatorFullName) {
- this.creatorFullName = creatorFullName;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public Boolean isArchived() {
- return isArchived;
- }
-
- public void setArchived(Boolean archived) {
- isArchived = archived;
- }
-
- public Long getArchiveTime() {
- return archiveTime;
- }
-
- public void setArchiveTime(Long archiveTime) {
- this.archiveTime = archiveTime;
- }
-
- public Boolean isVspArchived() {
- return isVspArchived;
- }
-
- public void setVspArchived(Boolean vspArchived) {
- isVspArchived = vspArchived;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
index b0b01fad4e..d51298b8bc 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
@@ -21,31 +21,31 @@
package org.openecomp.sdc.be.ui.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.List;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.model.Component;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
import org.openecomp.sdc.common.util.ICategorizedElement;
-import java.util.List;
-
public class UiLeftPaletteComponent implements ICategorizedElement {
- private String uniqueId;
- private String name; // archiveName
- private String version; // archiveVersion
- private String description;
- private List<String> tags;
- private String icon;
- private String UUID;
- private String systemName;
- private String invariantUUID;
- private ComponentTypeEnum componentType;
- private String resourceType;
- private String categoryName;
- private String subCategoryName;
- private String searchFilterTerms;
- private List<CategoryDefinition> categories;
- public UiLeftPaletteComponent(Component component) {
+ private final String uniqueId;
+ private final String name; // archiveName
+ private final String version; // archiveVersion
+ private final String description;
+ private final List<String> tags;
+ private final String icon;
+ private final String UUID;
+ private final String systemName;
+ private final String invariantUUID;
+ private final ComponentTypeEnum componentType;
+ private final String resourceType;
+ private final String categoryName;
+ private final String subCategoryName;
+ private final String searchFilterTerms;
+ private final List<CategoryDefinition> categories;
+
+ public UiLeftPaletteComponent(final Component component) {
this.uniqueId = component.getUniqueId();
this.name = component.getName();
this.version = component.getVersion();
@@ -60,88 +60,31 @@ public class UiLeftPaletteComponent implements ICategorizedElement {
this.categories = component.getCategories();
this.categoryName = getCategoryName();
this.subCategoryName = getSubcategoryName();
- String tagString = convertListResultToString(tags);
- setSearchFilterTerms(name + " " + description + " " + tagString + version);
- this.searchFilterTerms = getSearchFilterTerms();
+ this.searchFilterTerms = (name + " " + description + " " + convertListResultToString(tags) + version);
}
- private String convertListResultToString(List<String> tags) {
- StringBuilder sb = new StringBuilder();
- tags.forEach(t->sb.append(t + " "));
+ private String convertListResultToString(final List<String> tags) {
+ final StringBuilder sb = new StringBuilder();
+ tags.forEach(t -> sb.append(t + " "));
return sb.toString().toLowerCase();
}
- public String getUniqueId() {
- return uniqueId;
- }
-
- public String getName() {
- return name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getDescription() {
- return description;
- }
-
- public List<String> getTags() {
- return tags;
- }
- public String getIcon() {
- return icon;
- }
-
- public String getUUID() {
- return UUID;
- }
-
- public String getSystemName() {
- return systemName;
- }
-
- public String getInvariantUUID() {
- return invariantUUID;
- }
-
- public ComponentTypeEnum getComponentType() {
- return componentType;
- }
-
- public String getResourceType() {
- return resourceType;
- }
-
- public List<CategoryDefinition> getCategories() {
- return categories;
- }
-
- public String getSearchFilterTerms() {
- return searchFilterTerms;
- }
-
- public void setSearchFilterTerms(String searchFilterTerms) {
- this.searchFilterTerms = searchFilterTerms;
- }
-
@JsonIgnore
@Override
public String getComponentTypeAsString() {
- return getComponentType().name();
+ return componentType.name();
}
@JsonIgnore
public String getCategoryName() {
- return getCategories().get(0).getName();
+ return categories.get(0).getName();
}
@JsonIgnore
public String getSubcategoryName() {
- if(componentType == ComponentTypeEnum.SERVICE){
+ if (componentType == ComponentTypeEnum.SERVICE) {
return null;
}
- return getCategories().get(0).getSubcategories().get(0).getName();
+ return categories.get(0).getSubcategories().get(0).getName();
}
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
index b3c3b6781b..380593b4b3 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
@@ -20,14 +20,18 @@
package org.openecomp.sdc.be.ui.model;
-import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
-import org.openecomp.sdc.be.model.InterfaceDefinition;
-import org.openecomp.sdc.be.model.PropertyDefinition;
-
import java.util.List;
import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.openecomp.sdc.be.model.InterfaceDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition;
-public class UiResourceDataTransfer extends UiComponentDataTransfer{
+@Getter
+@Setter
+@NoArgsConstructor
+public class UiResourceDataTransfer extends UiComponentDataTransfer {
private UiResourceMetadata metadata;
@@ -43,70 +47,4 @@ public class UiResourceDataTransfer extends UiComponentDataTransfer{
private List<String> defaultCapabilities;
-
- public UiResourceDataTransfer(){}
-
- public List<AdditionalInformationDefinition> getAdditionalInformation() {
- return additionalInformation;
- }
-
- public void setAdditionalInformation(List<AdditionalInformationDefinition> additionalInformation) {
- this.additionalInformation = additionalInformation;
- }
-
- public UiResourceMetadata getMetadata() {
- return metadata;
- }
-
- public void setMetadata(UiResourceMetadata metadata) {
- this.metadata = metadata;
- }
-
- public List<String> getDerivedFrom() {
- return derivedFrom;
- }
-
- public void setDerivedFrom(List<String> derivedFrom) {
- this.derivedFrom = derivedFrom;
- }
-
- public List<String> getDerivedList() {
- return derivedList;
- }
-
- public void setDerivedList(List<String> derivedList) {
- this.derivedList = derivedList;
- }
-
- public List<PropertyDefinition> getProperties() {
- return properties;
- }
-
- public void setProperties(List<PropertyDefinition> properties) {
- this.properties = properties;
- }
-
- public List<PropertyDefinition> getAttributes() {
- return attributes;
- }
-
- public void setAttributes(List<PropertyDefinition> attributes) {
- this.attributes = attributes;
- }
-
- public Map<String, InterfaceDefinition> getInterfaces() {
- return interfaces;
- }
-
- public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
- this.interfaces = interfaces;
- }
-
- public List<String> getDefaultCapabilities() {
- return defaultCapabilities;
- }
-
- public void setDefaultCapabilities(List<String> defaultCapabilities) {
- this.defaultCapabilities = defaultCapabilities;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
index d84ce25017..c8d7bdfb7c 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
@@ -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,12 +20,17 @@
package org.openecomp.sdc.be.ui.model;
+import java.util.List;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
-import java.util.List;
-
+@Getter
+@Setter
+@NoArgsConstructor
public class UiResourceMetadata extends UiComponentMetadata {
private String vendorName;
@@ -39,7 +44,8 @@ public class UiResourceMetadata extends UiComponentMetadata {
private List<String> derivedFrom;
- public UiResourceMetadata(List<CategoryDefinition> categories, List<String> derivedFrom, ResourceMetadataDataDefinition metadata) {
+ public UiResourceMetadata(List<CategoryDefinition> categories, List<String> derivedFrom,
+ ResourceMetadataDataDefinition metadata) {
super(categories, metadata);
this.vendorName = metadata.getVendorName();
this.vendorRelease = metadata.getVendorRelease();
@@ -51,84 +57,6 @@ public class UiResourceMetadata extends UiComponentMetadata {
this.derivedFrom = derivedFrom;
}
- public UiResourceMetadata(){}
-
- public List<String> getDerivedFrom() {
- return derivedFrom;
- }
-
-
- public void setDerivedFrom(List<String> derivedFrom) {
- this.derivedFrom = derivedFrom;
- }
-
-
- public String getVendorName() {
- return vendorName;
- }
-
- public void setVendorName(String vendorName) {
- this.vendorName = vendorName;
- }
-
- public String getVendorRelease() {
- return vendorRelease;
- }
-
- public void setVendorRelease(String vendorRelease) {
- this.vendorRelease = vendorRelease;
- }
-
- public String getResourceVendorModelNumber() {
- return resourceVendorModelNumber;
- }
-
- public void setResourceVendorModelNumber(String resourceVendorModelNumber) {
- this.resourceVendorModelNumber = resourceVendorModelNumber;
- }
-
- public ResourceTypeEnum getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(ResourceTypeEnum resourceType) {
- this.resourceType = resourceType;
- }
-
- public Boolean getIsAbstract() {
- return isAbstract;
- }
-
- public void setIsAbstract(Boolean isAbstract) {
- this.isAbstract = isAbstract;
- }
-
- public String getCost() {
- return cost;
- }
-
- public void setCost(String cost) {
- this.cost = cost;
- }
-
- public String getLicenseType() {
- return licenseType;
- }
-
- public void setLicenseType(String licenseType) {
- this.licenseType = licenseType;
- }
-
- public String getToscaResourceName() {
- return toscaResourceName;
- }
-
- public void setToscaResourceName(String toscaResourceName) {
- this.toscaResourceName = toscaResourceName;
- }
-
-
-
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
index b2c2f7a2a5..cee7cf04ca 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
@@ -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,38 +20,20 @@
package org.openecomp.sdc.be.ui.model;
+import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
import org.openecomp.sdc.be.model.ArtifactDefinition;
-import java.util.Map;
+@Getter
+@Setter
+@NoArgsConstructor
public class UiServiceDataTransfer extends UiComponentDataTransfer {
-
private Map<String, ArtifactDefinition> serviceApiArtifacts;
private Map<String, ForwardingPathDataDefinition> forwardingPaths;
private UiServiceMetadata metadata;
- public UiServiceMetadata getMetadata() {
- return metadata;
- }
-
- public void setMetadata(UiServiceMetadata metadata) {
- this.metadata = metadata;
- }
-
- public Map<String, ArtifactDefinition> getServiceApiArtifacts() {
- return serviceApiArtifacts;
- }
-
- public void setServiceApiArtifacts(Map<String, ArtifactDefinition> serviceApiArtifacts) {
- this.serviceApiArtifacts = serviceApiArtifacts;
- }
-
- public java.util.Map<String, org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition> getForwardingPaths() {
- return forwardingPaths;
- }
-
- public void setForwardingPaths(java.util.Map<String, org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition> forwardingPaths) {
- this.forwardingPaths = forwardingPaths;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
index 454e970fd5..e1fe5876e6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
@@ -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,91 +20,35 @@
package org.openecomp.sdc.be.ui.model;
+import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
-import java.util.List;
-
+@Getter
+@Setter
public class UiServiceMetadata extends UiComponentMetadata {
-
- private String distributionStatus;
- private Boolean ecompGeneratedNaming;
- private String namingPolicy;
- private String serviceType;
- private String serviceRole;
- private String environmentContext;
- private String instantiationType;
- private String serviceFunction;
-
- public UiServiceMetadata(List<CategoryDefinition> categories, ServiceMetadataDataDefinition metadata) {
- super(categories, metadata);
- this.distributionStatus = metadata.getDistributionStatus();
- this.ecompGeneratedNaming = metadata.isEcompGeneratedNaming();
- this.namingPolicy = metadata.getNamingPolicy();
- this.serviceType = metadata.getServiceType();
- this.serviceRole = metadata.getServiceRole();
- this.environmentContext = metadata.getEnvironmentContext();
- this.instantiationType = metadata.getInstantiationType();
- this.serviceFunction = metadata.getServiceFunction();
- }
-
- public String getDistributionStatus() {
- return distributionStatus;
- }
-
- public void setDistributionStatus(String distributionStatus) {
- this.distributionStatus = distributionStatus;
- }
-
- public Boolean getEcompGeneratedNaming() {
- return ecompGeneratedNaming;
- }
-
- public void setEcompGeneratedNaming(Boolean ecompGeneratedNaming) {
- this.ecompGeneratedNaming = ecompGeneratedNaming;
- }
-
- public String getNamingPolicy() {
- return namingPolicy;
- }
- public void setNamingPolicy(String namingPolicy) {
- this.namingPolicy = namingPolicy;
+ private String distributionStatus;
+ private Boolean ecompGeneratedNaming;
+ private String namingPolicy;
+ private String serviceType;
+ private String serviceRole;
+ private String environmentContext;
+ private String instantiationType;
+ private String serviceFunction;
+
+ public UiServiceMetadata(List<CategoryDefinition> categories, ServiceMetadataDataDefinition metadata) {
+ super(categories, metadata);
+ this.distributionStatus = metadata.getDistributionStatus();
+ this.ecompGeneratedNaming = metadata.isEcompGeneratedNaming();
+ this.namingPolicy = metadata.getNamingPolicy();
+ this.serviceType = metadata.getServiceType();
+ this.serviceRole = metadata.getServiceRole();
+ this.environmentContext = metadata.getEnvironmentContext();
+ this.instantiationType = metadata.getInstantiationType();
+ this.serviceFunction = metadata.getServiceFunction();
}
- public String getServiceType() {
- return serviceType;
- }
-
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- public String getServiceRole() {
- return serviceRole;
- }
-
- public void setServiceRole(String serviceRole) {
- this.serviceRole = serviceRole;
- }
-
- public String getInstantiationType() {
- return instantiationType;
- }
-
- public void setInstantiationType(String instantiationType) {
- this.instantiationType = instantiationType;
- }
-
- public String getEnvironmentContext() { return environmentContext; }
-
- public void setEnvironmentContext(String environmentContext) { this.environmentContext = environmentContext; }
-
- public String getServiceFunction() {
- return serviceFunction;
- }
-
- public void setServiceFunction(String serviceFunction) {
- this.serviceFunction = serviceFunction;
- }
}