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;
24 import java.io.Serializable;
25 import java.sql.Timestamp;
26 import java.text.DateFormat;
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
30 public class Recipe extends MavenLikeVersioning implements Serializable {
32 private static final long serialVersionUID = 768026109321305392L;
35 protected String action;
36 private String description;
37 protected String orchestrationUri;
38 private int recipeTimeout;
39 private String serviceType;
41 private Timestamp created;
51 public void setId (int id) {
55 public String getAction () {
59 public void setAction (String action) {
63 public String getDescription () {
67 public void setDescription (String description) {
68 this.description = description;
71 public String getOrchestrationUri () {
72 return orchestrationUri;
75 public void setOrchestrationUri (String orchestrationUri) {
76 this.orchestrationUri = orchestrationUri;
79 public int getRecipeTimeout () {
83 public void setRecipeTimeout (int recipeTimeout) {
84 this.recipeTimeout = recipeTimeout;
87 public String getServiceType () {
91 public void setServiceType (String serviceType) {
92 this.serviceType = serviceType;
95 public Timestamp getCreated() {
99 public void setCreated(Timestamp created) {
100 this.created = created;
104 public String toString() {
105 StringBuilder sb = new StringBuilder();
106 sb.append("RECIPE: " + action);
107 sb.append(",uri=" + orchestrationUri);
109 if (created != null) {
110 sb.append (",created=");
111 sb.append (DateFormat.getInstance().format(created));
113 return sb.toString();