CSIT Fix for SDC-2585
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / info / ArtifactAccessInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20 package org.openecomp.sdc.be.info;
21
22 import org.openecomp.sdc.be.resources.data.ESArtifactData;
23
24 public class ArtifactAccessInfo {
25
26     public ArtifactAccessInfo() {
27     }
28
29     public ArtifactAccessInfo(ESArtifactData artifactData) {
30         this.id = artifactData.getId();
31     }
32
33     public ArtifactAccessInfo(String servletContext) {
34         StringBuilder urlBuilder = new StringBuilder();
35         urlBuilder = urlBuilder.append(servletContext).append("/");
36         urlBuilder.append("resources/")
37                 // .append(artifactData.getResourceId()).append("/")
38                 .append("artifacts/");
39         this.url = urlBuilder.toString();
40     }
41
42     private String name;
43     private String url;
44     private String id;
45     private String type;
46     private String description;
47     private String creator;
48     private String creationTime;
49     private String lastUpdater;
50     private String lastUpdateTime;
51     private String checksum;
52
53     public String getName() {
54         return name;
55     }
56
57     public void setName(String name) {
58         this.name = name;
59     }
60
61     public String getUrl() {
62         return url;
63     }
64
65     public void setUrl(String url) {
66         this.url = url;
67     }
68
69     public String getId() {
70         return id;
71     }
72
73     public void setId(String id) {
74         this.id = id;
75     }
76
77     public String getType() {
78         return type;
79     }
80
81     public void setType(String type) {
82         this.type = type;
83     }
84
85     public String getDescription() {
86         return description;
87     }
88
89     public void setDescription(String description) {
90         this.description = description;
91     }
92
93     public String getCreator() {
94         return creator;
95     }
96
97     public void setCreator(String creator) {
98         this.creator = creator;
99     }
100
101     public String getCreationTime() {
102         return creationTime;
103     }
104
105     public void setCreationTime(String creationTime) {
106         this.creationTime = creationTime;
107     }
108
109     public String getLastUpdater() {
110         return lastUpdater;
111     }
112
113     public void setLastUpdater(String lastUpdater) {
114         this.lastUpdater = lastUpdater;
115     }
116
117     public String getLastUpdateTime() {
118         return lastUpdateTime;
119     }
120
121     public void setLastUpdateTime(String lastUpdateTime) {
122         this.lastUpdateTime = lastUpdateTime;
123     }
124
125     public String getChecksum() {
126         return checksum;
127     }
128
129     public void setChecksum(String checksum) {
130         this.checksum = checksum;
131     }
132 }