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;
26 import java.sql.Timestamp;
27 import java.text.DateFormat;
28 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
30 public class ServiceRecipe extends MavenLikeVersioning {
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;
40 private Timestamp created;
46 public void setId(int id) {
50 public int getServiceId() {
53 public void setServiceId(int serviceId) {
54 this.serviceId = serviceId;
57 public String getAction() {
60 public void setAction(String action) {
64 public String getDescription() {
67 public void setDescription(String description) {
68 this.description = description;
71 public String getOrchestrationUri() {
72 return orchestrationUri;
74 public void setOrchestrationUri(String orchestrationUri) {
75 this.orchestrationUri = orchestrationUri;
78 public String getServiceParamXSD() {
79 return serviceParamXSD;
81 public void setServiceParamXSD(String serviceParamXSD) {
82 this.serviceParamXSD = serviceParamXSD;
85 public int getRecipeTimeout() {
88 public void setRecipeTimeout(int recipeTimeout) {
89 this.recipeTimeout = recipeTimeout;
92 public Integer getServiceTimeoutInterim() {
93 return serviceTimeoutInterim;
96 public void setServiceTimeoutInterim(Integer serviceTimeoutInterim) {
97 this.serviceTimeoutInterim = serviceTimeoutInterim;
100 public Timestamp getCreated() {
104 public void setCreated(Timestamp created) {
105 this.created = created;
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));
117 return sb.toString();