diff options
Diffstat (limited to 'catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java')
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java | 129 |
1 files changed, 78 insertions, 51 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java index 385b15c728..36ac871cab 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/UploadResourceInfo.java @@ -29,13 +29,23 @@ import org.openecomp.sdc.common.api.UploadArtifactInfo; public class UploadResourceInfo { + private String payloadData; + private String payloadName; + private String description; + private List<String> tags; + private List<CategoryDefinition> categories; + + private List<UploadArtifactInfo> artifactList; + private String contactId, name, resourceIconPath, icon, vendorName, vendorRelease, resourceVendorModelNumber; + + private String resourceType = "VFC"; + public UploadResourceInfo(String payload, String payloadName, String description, String category, - List<String> tags, List<UploadArtifactInfo> artifactsList) { + List<String> tags, List<UploadArtifactInfo> artifactsList) { super(); this.payloadData = payload; this.payloadName = payloadName; this.description = description; - // this.category = category; this.tags = tags; this.artifactList = artifactsList; if (category != null) { @@ -55,17 +65,6 @@ public class UploadResourceInfo { public UploadResourceInfo() { } - private String payloadData; - private String payloadName; - private String description; - // private String category; - private List<String> tags; - private List<CategoryDefinition> categories; - - private List<UploadArtifactInfo> artifactList; - private String contactId, name, resourceIconPath, icon, vendorName, vendorRelease; - - private String resourceType = "VFC"; public String getPayloadData() { return payloadData; @@ -91,12 +90,6 @@ public class UploadResourceInfo { this.description = description; } - // public String getCategory() { - // return category; - // } - // public void setCategory(String category) { - // this.category = category; - // } public List<String> getTags() { return tags; } @@ -119,8 +112,6 @@ public class UploadResourceInfo { int result = 1; result = prime * result + ((artifactList == null) ? 0 : artifactList.hashCode()); result = prime * result + ((contactId == null) ? 0 : contactId.hashCode()); - // result = prime * result + ((category == null) ? 0 : - // category.hashCode()); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((icon == null) ? 0 : icon.hashCode()); result = prime * result + ((payloadData == null) ? 0 : payloadData.hashCode()); @@ -130,78 +121,106 @@ public class UploadResourceInfo { result = prime * result + ((tags == null) ? 0 : tags.hashCode()); result = prime * result + ((vendorName == null) ? 0 : vendorName.hashCode()); result = prime * result + ((vendorRelease == null) ? 0 : vendorRelease.hashCode()); + result = prime * result + ((resourceVendorModelNumber == null) ? 0 : resourceVendorModelNumber.hashCode()); return result; } @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } UploadResourceInfo other = (UploadResourceInfo) obj; if (artifactList == null) { - if (other.artifactList != null) + if (other.artifactList != null) { return false; - } else if (!artifactList.equals(other.artifactList)) + } + } else if (!artifactList.equals(other.artifactList)) { return false; + } if (contactId == null) { - if (other.contactId != null) + if (other.contactId != null) { return false; - } else if (!contactId.equals(other.contactId)) + } + } else if (!contactId.equals(other.contactId)) { return false; - // if (category == null) { - // if (other.category != null) - // return false; - // } else if (!category.equals(other.category)) - // return false; + } if (description == null) { - if (other.description != null) + if (other.description != null) { return false; - } else if (!description.equals(other.description)) + } + } else if (!description.equals(other.description)) { return false; + } if (icon == null) { - if (other.icon != null) + if (other.icon != null) { return false; - } else if (!icon.equals(other.icon)) + } + } else if (!icon.equals(other.icon)) { return false; + } if (payloadData == null) { - if (other.payloadData != null) + if (other.payloadData != null) { return false; - } else if (!payloadData.equals(other.payloadData)) + } + } else if (!payloadData.equals(other.payloadData)) { return false; + } if (payloadName == null) { - if (other.payloadName != null) + if (other.payloadName != null) { return false; - } else if (!payloadName.equals(other.payloadName)) + } + } else if (!payloadName.equals(other.payloadName)) { return false; + } if (resourceIconPath == null) { - if (other.resourceIconPath != null) + if (other.resourceIconPath != null) { return false; - } else if (!resourceIconPath.equals(other.resourceIconPath)) + } + } else if (!resourceIconPath.equals(other.resourceIconPath)) { return false; + } if (name == null) { - if (other.name != null) + if (other.name != null) { return false; - } else if (!name.equals(other.name)) + } + } else if (!name.equals(other.name)) { return false; + } if (tags == null) { - if (other.tags != null) + if (other.tags != null) { return false; - } else if (!tags.equals(other.tags)) + } + } else if (!tags.equals(other.tags)) { return false; + } if (vendorName == null) { - if (other.vendorName != null) + if (other.vendorName != null) { return false; - } else if (!vendorName.equals(other.vendorName)) + } + } else if (!vendorName.equals(other.vendorName)) { return false; + } + if (resourceVendorModelNumber == null) { + if (other.resourceVendorModelNumber != null) { + return false; + } + } else if (!resourceVendorModelNumber.equals(other.resourceVendorModelNumber)) { + return false; + } if (vendorRelease == null) { - if (other.vendorRelease != null) + if (other.vendorRelease != null) { return false; - } else if (!vendorRelease.equals(other.vendorRelease)) + } + } else if (!vendorRelease.equals(other.vendorRelease)) { return false; + } return true; } @@ -246,6 +265,14 @@ public class UploadResourceInfo { this.vendorRelease = vendorRelease; } + public String getResourceVendorModelNumber() { + return resourceVendorModelNumber; + } + + public void setResourceVendorModelNumber(String resourceVendorModelNumber) { + this.resourceVendorModelNumber = resourceVendorModelNumber; + } + public void setIcon(String icon) { this.icon = icon; } |