blob: fab72e9acda26b43bc31ff67eb1db5c4e5491d84 [file] [log] [blame]
jaegonkim44628d62019-04-07 10:30:32 +09001/*
2 * Copyright 2019-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.workflow.api;
18
19
20import java.net.URI;
21import java.util.List;
22
23/**
24 * Workflow Definition exception class.
25 */
26public class WorkflowDefinitionException extends WorkflowException {
27
28 private URI workflowId;
29 private List<String> errorMsgs;
30
31 /**
32 * Default Constructor for Workflow Definition Exception.
33 *
34 * @param msg exception message
35 */
36 public WorkflowDefinitionException(String msg) {
37
38 super(msg);
39 }
40
41 /**
42 * Constructor for Workflow Definition Exception.
43 *
44 * @param workflowId id of workflow
45 * @param errorMsgs error message for json data model
46 */
47 public WorkflowDefinitionException(URI workflowId, List<String> errorMsgs) {
48 super("Invalid workflow definition: " +
49 " workflow: " + workflowId.toString() +
50 ", errors: " + errorMsgs);
51 this.workflowId = workflowId;
52 this.errorMsgs = errorMsgs;
53 }
54}