2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.vid.asdc.beans;
23 import java.util.UUID;
28 public class Artifact {
31 * SDC has widened this to a String type for 1610.
43 ASSET_INVENTORY_PROFILE,
57 DCAE_INVENTORY_BLUEPRINT,
60 AAI_SERVICE_MODEL //HEY! READ ME! YES, YOU! I AM A TEMPORARY FIX, PLEASE REMOVE ME BECAUSE I AM A FRAUD. I DON'T BELONG HERE.
62 // *The* Artifact.Type.AAI_SERVICE_MODEL Constant
66 /** The artifact name. */
67 private String artifactName;
69 /** The artifact label. */
70 private String artifactLabel;
72 /** The artifact group type. */
73 private String artifactGroupType;
75 /** The artifact type. */
76 private String artifactType;
78 /** The artifact URL. */
79 private String artifactURL;
81 /** The artifact description. */
82 private String artifactDescription;
84 /** The artifact timeout. */
85 private int artifactTimeout;
87 /** The artifact checksum. */
88 private String artifactChecksum;
90 /** The artifact UUID. */
91 private String artifactUUID;
93 /** The artifact version. */
94 private String artifactVersion;
96 /** The generated from UUID. */
97 private String generatedFromUUID;
100 * Gets the artifact name.
102 * @return the artifact name
104 public String getArtifactName() {
109 * Gets the artifact type.
111 * @return the artifact type
113 public String getArtifactType() {
117 * Gets the artifact group type.
119 * @return the artifact group type
121 public String getArtifactGroupType() {
122 return artifactGroupType;
126 * Gets the artifact label.
128 * @return the artifact label
130 public String getArtifactLabel() {
131 return artifactLabel;
134 * Gets the artifact URL.
136 * @return the artifact URL
138 public String getArtifactURL() {
143 * Gets the artifact description.
145 * @return the artifact description
147 public String getArtifactDescription() {
148 return artifactDescription;
152 * Gets the artifact timeout.
154 * @return the artifact timeout
156 public int getArtifactTimeout() {
157 return artifactTimeout;
161 * Gets the artifact checksum.
163 * @return the artifact checksum
165 public String getArtifactChecksum() {
166 return artifactChecksum;
170 * Gets the artifact UUID.
172 * @return the artifact UUID
174 public String getArtifactUUID() {
179 * Gets the artifact version.
181 * @return the artifact version
183 public String getArtifactVersion() {
184 return artifactVersion;
188 * Gets the generated from UUID.
190 * @return the generated from UUID
192 public String getGeneratedFromUUID() {
193 return generatedFromUUID;
197 * Sets the artifact name.
199 * @param artifactName the new artifact name
201 public void setArtifactName(String artifactName) {
202 this.artifactName = artifactName;
206 * Sets the artifact type.
208 * @param artifactType the new artifact type
210 public void setArtifactType(String artifactType) {
211 this.artifactType = artifactType;
214 * Sets the artifact group type.
216 * @param artifactGroupType the new artifact group type
218 public void setArtifactGroupType(String artifactGroupType) {
219 this.artifactGroupType = artifactGroupType;
222 * Sets the artifact label.
224 * @param artifactGroupType the new artifact label
226 public void setArtifactLabel(String artifactLabel) {
227 this.artifactLabel = artifactLabel;
230 * Sets the artifact URL.
232 * @param artifactURL the new artifact URL
234 public void setArtifactURL(String artifactURL) {
235 this.artifactURL = artifactURL;
239 * Sets the artifact description.
241 * @param artifactDescription the new artifact description
243 public void setArtifactDescription(String artifactDescription) {
244 this.artifactDescription = artifactDescription;
248 * Sets the artifact timeout.
250 * @param artifactTimeout the new artifact timeout
252 public void setArtifactTimeout(int artifactTimeout) {
253 this.artifactTimeout = artifactTimeout;
257 * Sets the artifact checksum.
259 * @param artifactChecksum the new artifact checksum
261 public void setArtifactChecksum(String artifactChecksum) {
262 this.artifactChecksum = artifactChecksum;
266 * Sets the artifact UUID.
268 * @param artifactUUID the new artifact UUID
270 public void setArtifactUUID(String artifactUUID) {
271 this.artifactUUID = artifactUUID;
275 * Sets the artifact version.
277 * @param artifactVersion the new artifact version
279 public void setArtifactVersion(String artifactVersion) {
280 this.artifactVersion = artifactVersion;
284 * Sets the generated from UUID.
286 * @param generatedFromUUID the new generated from UUID
288 public void setGeneratedFromUUID(String generatedFromUUID) {
289 this.generatedFromUUID = generatedFromUUID;
293 * @see java.lang.Object#hashCode()
296 public int hashCode() {
297 final UUID uuid = UUID.fromString(getArtifactUUID());
299 return uuid.hashCode();
303 * @see java.lang.Object#equals(java.lang.Object)
306 public boolean equals(Object o) {
307 if (o == this) return true;
308 if (!(o instanceof Artifact)) return false;
310 final Artifact artifact = (Artifact) o;
312 return (artifact.getArtifactUUID().equals(getArtifactUUID()));