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.sql.Timestamp;
25 import java.text.DateFormat;
27 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
29 public class Recipe extends MavenLikeVersioning {
32 protected String action;
33 private String description;
34 protected String orchestrationUri;
35 private int recipeTimeout;
36 private String serviceType;
38 private Timestamp created;
48 public void setId (int id) {
52 public String getAction () {
56 public void setAction (String action) {
60 public String getDescription () {
64 public void setDescription (String description) {
65 this.description = description;
68 public String getOrchestrationUri () {
69 return orchestrationUri;
72 public void setOrchestrationUri (String orchestrationUri) {
73 this.orchestrationUri = orchestrationUri;
76 public int getRecipeTimeout () {
80 public void setRecipeTimeout (int recipeTimeout) {
81 this.recipeTimeout = recipeTimeout;
84 public String getServiceType () {
88 public void setServiceType (String serviceType) {
89 this.serviceType = serviceType;
92 public Timestamp getCreated() {
96 public void setCreated(Timestamp created) {
97 this.created = created;
101 public String toString() {
102 StringBuilder sb = new StringBuilder();
103 sb.append("RECIPE: " + action);
104 sb.append(",uri=" + orchestrationUri);
106 if (created != null) {
107 sb.append (",created=");
108 sb.append (DateFormat.getInstance().format(created));
110 return sb.toString();