re base code
[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
39                 .append("/artifacts/");
40         this.url = urlBuilder.toString();
41
42     }
43
44     private String name;
45     private String url;
46     private String id;
47     private String type;
48     private String description;
49     private String creator;
50     private String creationTime;
51     private String lastUpdater;
52     private String lastUpdateTime;
53     private String checksum;
54
55     public String getName() {
56         return name;
57     }
58
59     public void setName(String name) {
60         this.name = name;
61     }
62
63     public String getUrl() {
64         return url;
65     }
66
67     public void setUrl(String url) {
68         this.url = url;
69     }
70
71     public String getId() {
72         return id;
73     }
74
75     public void setId(String id) {
76         this.id = id;
77     }
78
79     public String getType() {
80         return type;
81     }
82
83     public void setType(String type) {
84         this.type = type;
85     }
86
87     public String getDescription() {
88         return description;
89     }
90
91     public void setDescription(String description) {
92         this.description = description;
93     }
94
95     public String getCreator() {
96         return creator;
97     }
98
99     public void setCreator(String creator) {
100         this.creator = creator;
101     }
102
103     public String getCreationTime() {
104         return creationTime;
105     }
106
107     public void setCreationTime(String creationTime) {
108         this.creationTime = creationTime;
109     }
110
111     public String getLastUpdater() {
112         return lastUpdater;
113     }
114
115     public void setLastUpdater(String lastUpdater) {
116         this.lastUpdater = lastUpdater;
117     }
118
119     public String getLastUpdateTime() {
120         return lastUpdateTime;
121     }
122
123     public void setLastUpdateTime(String lastUpdateTime) {
124         this.lastUpdateTime = lastUpdateTime;
125     }
126
127     public String getChecksum() {
128         return checksum;
129     }
130
131     public void setChecksum(String checksum) {
132         this.checksum = checksum;
133     }
134 }