e32d92c83bc4d3690d26fbb96fe4bcfd5b34a6be
[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 Amdocs
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 org.openecomp.sdc.api.notification.IArtifactInfo;
25
26 /**
27  * This class is an implementation of IArtifactInfo for test purposes.
28  */
29 public class ArtifactInfoImpl implements IArtifactInfo {
30
31     private java.lang.String artifactName;
32     private java.lang.String artifactType;
33     private java.lang.String artifactDescription;
34     private java.lang.String artifactVersion;
35
36     @Override
37     public String getArtifactName() {
38         return artifactName;
39     }
40
41     public void setArtifactName(String artifactName) {
42         this.artifactName = artifactName;
43     }
44
45     @Override
46     public String getArtifactType() {
47         return artifactType;
48     }
49
50     public void setArtifactType(String artifactType) {
51         this.artifactType = artifactType;
52     }
53
54     @Override
55     public String getArtifactURL() {
56         return null;
57     }
58
59     @Override
60     public String getArtifactChecksum() {
61         return null;
62     }
63
64     @Override
65     public String getArtifactDescription() {
66         return artifactDescription;
67     }
68
69     public void setArtifactDescription(String artifactDescription) {
70         this.artifactDescription = artifactDescription;
71     }
72
73     @Override
74     public Integer getArtifactTimeout() {
75         return null;
76     }
77
78     @Override
79     public String getArtifactVersion() {
80         return artifactVersion;
81     }
82
83     public void setArtifactVersion(String artifactVersion) {
84         this.artifactVersion = artifactVersion;
85     }
86
87     @Override
88     public String getArtifactUUID() {
89         return null;
90     }
91
92     @Override
93     public IArtifactInfo getGeneratedArtifact() {
94         return null;
95     }
96
97     @Override
98     public java.util.List<org.openecomp.sdc.api.notification.IArtifactInfo> getRelatedArtifacts() {
99         return Collections.emptyList();
100     }
101
102     @Override
103     public boolean equals(Object o) {
104         if (this == o) {
105             return true;
106         }
107         if (o == null || getClass() != o.getClass()) {
108             return false;
109         }
110
111         ArtifactInfoImpl that = (ArtifactInfoImpl) o;
112
113         if (artifactName != null ? !artifactName.equals(that.artifactName) : that.artifactName != null) {
114             return false;
115         }
116         if (artifactType != null ? !artifactType.equals(that.artifactType) : that.artifactType != null) {
117             return false;
118         }
119         if (artifactDescription != null ? !artifactDescription.equals(that.artifactDescription)
120                 : that.artifactDescription != null) {
121             return false;
122         }
123         return artifactVersion != null ? artifactVersion.equals(that.artifactVersion) : that.artifactVersion == null;
124     }
125
126     @Override
127     public int hashCode() {
128         int result = artifactName != null ? artifactName.hashCode() : 0;
129         result = 31 * result + (artifactType != null ? artifactType.hashCode() : 0);
130         result = 31 * result + (artifactDescription != null ? artifactDescription.hashCode() : 0);
131         result = 31 * result + (artifactVersion != null ? artifactVersion.hashCode() : 0);
132         return result;
133     }
134 }