2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.db.catalog.beans;
23 import java.io.Serializable;
24 import java.sql.Timestamp;
25 import java.text.DateFormat;
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29 public class HeatEnvironment extends MavenLikeVersioning implements Serializable {
31 private static final long serialVersionUID = 768026109321305392L;
33 private String artifactUuid;
34 private String name = null;
35 private String description = null;
36 private String environment = null;
37 private String artifactChecksum;
39 private Timestamp created;
41 public HeatEnvironment() {}
43 public String getArtifactUuid() {
44 return this.artifactUuid;
46 public void setArtifactUuid(String artifactUuid) {
47 this.artifactUuid = artifactUuid;
50 public String getName () {
54 public void setName (String name) {
58 public String getDescription() {
59 return this.description;
61 public void setDescription(String description) {
62 this.description = description;
65 public String getEnvironment() {
66 return this.environment;
68 public void setEnvironment(String environment) {
69 this.environment = environment;
72 public String getArtifactChecksum() {
73 return artifactChecksum;
76 public void setArtifactChecksum(String artifactChecksum) {
77 this.artifactChecksum = artifactChecksum;
80 public Timestamp getCreated() {
84 public void setCreated(Timestamp created) {
85 this.created = created;
89 public String toString () {
90 StringBuffer sb = new StringBuffer();
91 sb.append ("Artifact UUID=" + this.artifactUuid);
92 sb.append (", name=");
94 sb.append (", version=");
96 sb.append(", description=");
97 sb.append (this.description == null ? "null" : this.description);
99 sb.append (this.environment == null ? "null" : this.environment);
100 if (this.created != null) {
101 sb.append (",creationTimestamp=");
102 sb.append (DateFormat.getInstance().format(this.created));
104 return sb.toString();