Convert project from AJSC to Spring Boot
[aai/model-loader.git] / src / main / java / org / onap / aai / modelloader / service / ArtifactInfoImpl.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
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
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
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=========================================================
20  */
21 package org.onap.aai.modelloader.service;
22
23 import java.util.Collections;
24 import java.util.List;
25 import org.onap.sdc.api.notification.IArtifactInfo;
26
27 /**
28  * This class is an implementation of IArtifactInfo for test purposes.
29  */
30 public class ArtifactInfoImpl implements IArtifactInfo {
31
32     private String artifactName;
33     private String artifactType;
34     private String artifactDescription;
35     private String artifactVersion;
36
37     @Override
38     public String getArtifactName() {
39         return artifactName;
40     }
41
42     public void setArtifactName(String artifactName) {
43         this.artifactName = artifactName;
44     }
45
46     @Override
47     public String getArtifactType() {
48         return artifactType;
49     }
50
51     public void setArtifactType(String artifactType) {
52         this.artifactType = artifactType;
53     }
54
55     @Override
56     public String getArtifactURL() {
57         return null;
58     }
59
60     @Override
61     public String getArtifactChecksum() {
62         return null;
63     }
64
65     @Override
66     public String getArtifactDescription() {
67         return artifactDescription;
68     }
69
70     public void setArtifactDescription(String artifactDescription) {
71         this.artifactDescription = artifactDescription;
72     }
73
74     @Override
75     public Integer getArtifactTimeout() {
76         return null;
77     }
78
79     @Override
80     public String getArtifactVersion() {
81         return artifactVersion;
82     }
83
84     public void setArtifactVersion(String artifactVersion) {
85         this.artifactVersion = artifactVersion;
86     }
87
88     @Override
89     public String getArtifactUUID() {
90         return null;
91     }
92
93     @Override
94     public IArtifactInfo getGeneratedArtifact() {
95         return null;
96     }
97
98     @Override
99     public List<IArtifactInfo> getRelatedArtifacts() {
100         return Collections.emptyList();
101     }
102
103     @Override
104     public boolean equals(Object o) {
105         if (this == o) {
106             return true;
107         }
108         if (o == null || getClass() != o.getClass()) {
109             return false;
110         }
111
112         ArtifactInfoImpl that = (ArtifactInfoImpl) o;
113
114         if (artifactName != null ? !artifactName.equals(that.artifactName) : that.artifactName != null) {
115             return false;
116         }
117         if (artifactType != null ? !artifactType.equals(that.artifactType) : that.artifactType != null) {
118             return false;
119         }
120         if (artifactDescription != null ? !artifactDescription.equals(that.artifactDescription)
121                 : that.artifactDescription != null) {
122             return false;
123         }
124         return artifactVersion != null ? artifactVersion.equals(that.artifactVersion) : that.artifactVersion == null;
125     }
126
127     @Override
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);
133         return result;
134     }
135 }