Initial OpenECOMP MSO commit
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / ServiceRecipe.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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
21 package org.openecomp.mso.db.catalog.beans;
22
23
24
25
26 import java.sql.Timestamp;
27 import java.text.DateFormat;
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29
30 public class ServiceRecipe extends MavenLikeVersioning {
31         private int id;
32         private int serviceId;
33         private String action;
34         private String description;
35         private String orchestrationUri;
36         private String serviceParamXSD;
37         private int recipeTimeout;
38         private Integer serviceTimeoutInterim;
39         
40         private Timestamp created;
41         
42
43         public int getId() {
44                 return id;
45         }
46         public void setId(int id) {
47                 this.id = id;
48         }
49
50         public int getServiceId() {
51                 return serviceId;
52         }
53         public void setServiceId(int serviceId) {
54                 this.serviceId = serviceId;
55         }
56
57         public String getAction() {
58                 return action;
59         }
60         public void setAction(String action) {
61                 this.action = action;
62         }
63
64         public String getDescription() {
65                 return description;
66         }
67         public void setDescription(String description) {
68                 this.description = description;
69         }
70
71         public String getOrchestrationUri() {
72                 return orchestrationUri;
73         }
74         public void setOrchestrationUri(String orchestrationUri) {
75                 this.orchestrationUri = orchestrationUri;
76         }
77
78         public String getServiceParamXSD() {
79                 return serviceParamXSD;
80         }
81         public void setServiceParamXSD(String serviceParamXSD) {
82                 this.serviceParamXSD = serviceParamXSD;
83         }
84
85         public int getRecipeTimeout() {
86                 return recipeTimeout;
87         }
88         public void setRecipeTimeout(int recipeTimeout) {
89                 this.recipeTimeout = recipeTimeout;
90         }
91
92         public Integer getServiceTimeoutInterim() {
93                 return serviceTimeoutInterim;
94         }
95
96         public void setServiceTimeoutInterim(Integer serviceTimeoutInterim) {
97                 this.serviceTimeoutInterim = serviceTimeoutInterim;
98         }
99         
100         public Timestamp getCreated() {
101                 return created;
102         }
103
104         public void setCreated(Timestamp created) {
105                 this.created = created;
106         }
107
108         @Override
109         public String toString() {
110                 StringBuilder sb = new StringBuilder();
111                 sb.append("RECIPE: " + action);
112                 sb.append(",uri=" + orchestrationUri);
113         if (created != null) {
114                 sb.append (",created=");
115                 sb.append (DateFormat.getInstance().format(created));
116             }
117                 return sb.toString();
118         }
119 }