Merge "Reorder modifiers"
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / Recipe.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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 import java.io.Serializable;
25 import java.sql.Timestamp;
26 import java.text.DateFormat;
27
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29
30 public class Recipe extends MavenLikeVersioning implements Serializable {
31         
32         private static final long serialVersionUID = 768026109321305392L;
33
34     private int id;
35     protected String action = null;
36     private String description = null;
37     protected String orchestrationUri = null;
38     private int recipeTimeout;
39     private String serviceType = null;
40     private String paramXSD = null;
41         private Timestamp created = null;
42     
43     public Recipe () {
44         super ();
45     }
46
47     public int getId () {
48         return id;
49     }
50
51     public void setId (int id) {
52         this.id = id;
53     }
54
55     public String getAction () {
56         return action;
57     }
58
59     public void setAction (String action) {
60         this.action = action;
61     }
62
63     public String getDescription () {
64         return description;
65     }
66
67     public void setDescription (String description) {
68         this.description = description;
69     }
70
71     public String getOrchestrationUri () {
72         return orchestrationUri;
73     }
74
75     public void setOrchestrationUri (String orchestrationUri) {
76         this.orchestrationUri = orchestrationUri;
77     }
78
79     public int getRecipeTimeout () {
80         return recipeTimeout;
81     }
82
83     public void setRecipeTimeout (int recipeTimeout) {
84         this.recipeTimeout = recipeTimeout;
85     }
86
87     public String getServiceType () {
88         return serviceType;
89     }
90
91     public void setServiceType (String serviceType) {
92         this.serviceType = serviceType;
93     }
94
95         public Timestamp getCreated() {
96                 return created;
97         }
98
99         public void setCreated(Timestamp created) {
100                 this.created = created;
101         }
102
103     /**
104      * @return Returns the paramXSD.
105      */
106     public String getParamXSD() {
107         return paramXSD;
108     }
109   
110     /**
111      * @param paramXSD The paramXSD to set.
112      */
113     public void setParamXSD(String paramXSD) {
114         this.paramXSD = paramXSD;
115     }
116
117     @Override
118     public String toString() {
119         StringBuilder sb = new StringBuilder();
120         sb.append("RECIPE: ").append(action);
121         sb.append(",uri=").append(orchestrationUri);
122         
123         if (created != null) {
124                 sb.append (",created=");
125                 sb.append (DateFormat.getInstance().format(created));
126             }
127         return sb.toString();
128     }
129 }