2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017-2018 European Software Marketing Ltd.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 package org.onap.aai.modelloader.service;
23 import java.util.Collections;
24 import java.util.List;
25 import org.onap.sdc.api.notification.IArtifactInfo;
28 * This class is an implementation of IArtifactInfo for test purposes.
30 public class ArtifactInfoImpl implements IArtifactInfo {
32 private String artifactName;
33 private String artifactType;
34 private String artifactDescription;
35 private String artifactVersion;
38 public String getArtifactName() {
42 public void setArtifactName(String artifactName) {
43 this.artifactName = artifactName;
47 public String getArtifactType() {
51 public void setArtifactType(String artifactType) {
52 this.artifactType = artifactType;
56 public String getArtifactURL() {
61 public String getArtifactChecksum() {
66 public String getArtifactDescription() {
67 return artifactDescription;
70 public void setArtifactDescription(String artifactDescription) {
71 this.artifactDescription = artifactDescription;
75 public Integer getArtifactTimeout() {
80 public String getArtifactVersion() {
81 return artifactVersion;
84 public void setArtifactVersion(String artifactVersion) {
85 this.artifactVersion = artifactVersion;
89 public String getArtifactUUID() {
94 public IArtifactInfo getGeneratedArtifact() {
99 public List<IArtifactInfo> getRelatedArtifacts() {
100 return Collections.emptyList();
104 public boolean equals(Object o) {
108 if (o == null || getClass() != o.getClass()) {
112 ArtifactInfoImpl that = (ArtifactInfoImpl) o;
114 if (artifactName != null ? !artifactName.equals(that.artifactName) : that.artifactName != null) {
117 if (artifactType != null ? !artifactType.equals(that.artifactType) : that.artifactType != null) {
120 if (artifactDescription != null ? !artifactDescription.equals(that.artifactDescription)
121 : that.artifactDescription != null) {
124 return artifactVersion != null ? artifactVersion.equals(that.artifactVersion) : that.artifactVersion == null;
128 public int hashCode() {
129 int result = artifactName != null ? artifactName.hashCode() : 0;
130 result = 31 * result + (artifactType != null ? artifactType.hashCode() : 0);
131 result = 31 * result + (artifactDescription != null ? artifactDescription.hashCode() : 0);
132 result = 31 * result + (artifactVersion != null ? artifactVersion.hashCode() : 0);