2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.mso.db.catalog.beans;
\r
23 import java.io.Serializable;
\r
24 import java.sql.Timestamp;
\r
25 import java.text.DateFormat;
\r
26 import java.util.Set;
\r
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
\r
30 public class ToscaCsar extends MavenLikeVersioning implements Serializable {
\r
32 private static final long serialVersionUID = 768026109321305392L;
\r
34 private String artifactUUID;
\r
35 private String name;
\r
36 private String artifactChecksum;
\r
38 private String description;
\r
39 private Timestamp created;
\r
40 private Set<Service> services;
\r
42 public ToscaCsar() { }
\r
44 public String getArtifactUUID() {
\r
45 return artifactUUID;
\r
48 public void setArtifactUUID(String artifactUUID) {
\r
49 this.artifactUUID = artifactUUID;
\r
52 public String getName() {
\r
56 public void setName(String name) {
\r
60 public String getArtifactChecksum() {
\r
61 return artifactChecksum;
\r
64 public void setArtifactChecksum(String artifactChecksum) {
\r
65 this.artifactChecksum = artifactChecksum;
\r
68 public String getUrl() {
\r
72 public void setUrl(String url) {
\r
76 public String getDescription() {
\r
80 public void setDescription(String description) {
\r
81 this.description = description;
\r
84 public Timestamp getCreated() {
\r
88 public void setCreated(Timestamp created) {
\r
89 this.created = created;
\r
92 public Set<Service> getServices() {
\r
96 public void setServices(Set<Service> services) {
\r
97 this.services = services;
\r
101 public String toString() {
\r
102 StringBuilder sb = new StringBuilder();
\r
103 sb.append("TOSCACSAR: artifactUUID=" + artifactUUID + ",name=" + name + ",version=" + version + ",description=" + description+",artifactChecksum="+artifactChecksum+",url="+url);
\r
104 for (Service service : services) {
\r
105 sb.append ("\n" + service.toString());
\r
107 if (created != null) {
\r
108 sb.append (",created=");
\r
109 sb.append (DateFormat.getInstance().format(created));
\r
111 return sb.toString();
\r