blob: 6ed14267fa684fb6954c60106d0f14a6adf4f060 [file] [log] [blame]
Rama-Huaweib711e5c2016-08-31 07:55:46 +05301/*
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 */
16
17package org.onosproject.yms.app.yob;
18
19/**
20 * Represents common constant utility for YANG object builder.
21 */
22final class YobConstants {
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053023
Rama-Huaweib711e5c2016-08-31 07:55:46 +053024 private YobConstants() {
25 }
26
27 static final String FROM_STRING = "fromString";
28 static final String BUILD = "build";
29 static final String OP_PARAM = "OpParam";
30 static final String DEFAULT = "Default";
31 static final String ADD_TO = "addTo";
32 static final String VALUE_OF = "valueOf";
33 static final String OPERATION_TYPE = "onosYangNodeOperationType";
34 static final String OP_TYPE = "OnosYangNodeOperationType";
35 static final String OF = "of";
36 static final String PERIOD = ".";
Vidyashree Ramaf463dc52016-10-06 12:46:33 +053037 static final String SPACE = " ";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053038 static final String ADD_AUGMENT_METHOD = "addYangAugmentedInfo";
39
40 //Error strings
41 static final String E_NO_HANDLE_FOR_YDT = "No handler for YDT node";
42 static final String E_HAS_NO_CHILD = " does not have child ";
43 static final String E_SET_OP_TYPE_FAIL = "Failed to set Operation Type";
44 static final String E_FAIL_TO_BUILD = "Failed to build the object: ";
45 static final String L_FAIL_TO_BUILD = "Failed to build the object: {}";
46 static final String E_FAIL_TO_GET_FIELD = "Failed to get field for class: ";
47 static final String L_FAIL_TO_GET_FIELD =
48 "Failed to get field for class: {}";
49 static final String E_FAIL_TO_GET_METHOD =
50 "Failed to get method for class: ";
51 static final String L_FAIL_TO_GET_METHOD =
52 "Failed to get method for class: {}";
53 static final String E_FAIL_TO_LOAD_CLASS =
54 "Failed to load class for class: ";
55 static final String L_FAIL_TO_LOAD_CLASS =
56 "Failed to load class for class: {}";
57 static final String E_YDT_TYPE_IS_NOT_SUPPORT =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053058 "Given YDT type is not supported.";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053059 static final String E_FAIL_TO_CREATE_OBJ =
60 "Failed to create an object for class: ";
61 static final String L_FAIL_TO_CREATE_OBJ =
62 "Failed to create an object for class: {}";
63 static final String E_REFLECTION_FAIL_TO_CREATE_OBJ =
64 "Reflection failed to create an object for class: ";
65 static final String L_REFLECTION_FAIL_TO_CREATE_OBJ =
66 "Reflection failed to create an object for class: {}";
67 static final String E_FAIL_TO_LOAD_CONSTRUCTOR =
68 "Failed to load constructor for class: {}";
69 static final String E_FAIL_TO_INVOKE_METHOD =
70 "Failed to invoke method for class: ";
71 static final String L_FAIL_TO_INVOKE_METHOD =
72 "Failed to invoke method for class: {}";
73 static final String E_DATA_TYPE_NOT_SUPPORT =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053074 "Given data type is not supported.";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053075 static final String E_OBJ_IS_ALREADY_BUILT_NOT_FETCH =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053076 "Object is already built, cannot fetch builder";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053077 static final String E_BUILDER_IS_NOT_SET =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053078 "Builder is not yet set, cannot fetch it";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053079 static final String E_BUILT_OBJ_IS_NOT_SET =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053080 "Built object is not set";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053081 static final String E_OBJ_IS_NOT_SET_NOT_FETCH =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053082 "Builder is not yet set, cannot fetch it";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053083 static final String E_OBJ_IS_ALREADY_BUILT_NOT_BUILD =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053084 "Object is already built, cannot build again";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053085 static final String E_OBJ_BUILDING_WITHOUT_BUILDER =
Rama-Huaweib711e5c2016-08-31 07:55:46 +053086 "Object building without builder";
VinodKumarS-Huawei7b1733c2016-10-25 13:44:26 +053087 static final String E_MISSING_DATA_IN_NODE =
88 "YANG data tree is missing the data required for YOB";
89 static final String E_INVALID_DATA_TREE =
90 "YANG tree does not have a application root";
Rama-Huaweib711e5c2016-08-31 07:55:46 +053091}