rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 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 | */ |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 16 | |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 17 | package org.onosproject.yangutils.datamodel; |
| 18 | |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 19 | import java.io.Serializable; |
| 20 | |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 21 | /** |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 22 | * Represents data model to maintain yang app error information. |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 23 | */ |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 24 | public class YangAppErrorInfo implements Serializable { |
| 25 | |
| 26 | private static final long serialVersionUID = 807201693L; |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 27 | |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 28 | /** |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 29 | * Application's error message, to be used for data error. |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 30 | */ |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 31 | private String errorMessage; |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 32 | |
| 33 | /** |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 34 | * Error tag, to be filled in data validation error response. |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 35 | */ |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 36 | private String errorTag; |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 37 | |
| 38 | /** |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 39 | * Application's error tag, to be filled in data validation error response. |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 40 | */ |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 41 | private String errorAppTag; |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 42 | |
| 43 | /** |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 44 | * Application's error path, to be filled in data validation error response. |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 45 | */ |
rama-huawei | 6c728a9 | 2016-07-11 14:48:12 +0530 | [diff] [blame] | 46 | private String errorAppPath; |
| 47 | |
| 48 | /** |
| 49 | * Application's error info, to be filled in data validation error response. |
| 50 | */ |
| 51 | private String errorAppInfo; |
| 52 | |
| 53 | /** |
| 54 | * Creates a YANG app error info object. |
| 55 | */ |
| 56 | @SuppressWarnings("unused") |
| 57 | public YangAppErrorInfo() { |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Returns application's error message, to be used for data error. |
| 62 | * |
| 63 | * @return Application's error message, to be used for data error |
| 64 | */ |
| 65 | public String getGetErrorMessage() { |
| 66 | return errorMessage; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Sets Application's error message, to be used for data error. |
| 71 | * |
| 72 | * @param errMsg Application's error message, to be used for data error |
| 73 | */ |
| 74 | public void setErrorMessage(String errMsg) { |
| 75 | errorMessage = errMsg; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Returns error tag, to be used for data error. |
| 80 | * |
| 81 | * @return error tag, to be used for data error |
| 82 | */ |
| 83 | public String getGetErrorTag() { |
| 84 | return errorTag; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Sets error tag, to be used for data error. |
| 89 | * |
| 90 | * @param errTag error tag, to be used for data error |
| 91 | */ |
| 92 | public void setErrorTag(String errTag) { |
| 93 | errorTag = errTag; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Returns application's error tag, to be used for data error. |
| 98 | * |
| 99 | * @return application's error tag, to be used for data error |
| 100 | */ |
| 101 | public String getGetErrorAppTag() { |
| 102 | return errorAppTag; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Sets application's error tag, to be used for data error. |
| 107 | * |
| 108 | * @param errTag application's error tag, to be used for data error |
| 109 | */ |
| 110 | public void setErrorAppTag(String errTag) { |
| 111 | errorAppTag = errTag; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Returns application's error path, to be used for data error. |
| 116 | * |
| 117 | * @return application's error path, to be used for data error |
| 118 | */ |
| 119 | public String getGetErrorAppPath() { |
| 120 | return errorAppPath; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Sets application's error path, to be used for data error. |
| 125 | * |
| 126 | * @param errPath application's error path, to be used for data error |
| 127 | */ |
| 128 | public void setErrorAppPath(String errPath) { |
| 129 | errorAppPath = errPath; |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * Returns application's error info, to be used for data error. |
| 134 | * |
| 135 | * @return application's error info, to be used for data error |
| 136 | */ |
| 137 | public String getGetErrorAppInfo() { |
| 138 | return errorAppInfo; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Sets application's error info, to be used for data error. |
| 143 | * |
| 144 | * @param errInfo application's error info, to be used for data error |
| 145 | */ |
| 146 | public void setErrorAppInfo(String errInfo) { |
| 147 | errorAppInfo = errInfo; |
| 148 | } |
Vinod Kumar S | 0c330cd | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 149 | } |