janani b | 1c6acc4 | 2016-04-15 16:18:30 +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 | */ |
| 16 | |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 17 | package org.onosproject.yangutils.utils.io; |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 18 | |
| 19 | /** |
| 20 | * Representation of plugin configurations required for YANG utils. |
| 21 | */ |
| 22 | public final class YangPluginConfig { |
| 23 | |
| 24 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 25 | * Contains the code generation directory. |
| 26 | */ |
| 27 | private String codeGenDir; |
| 28 | |
| 29 | /** |
| 30 | * Contains information of naming conflicts that can be resolved. |
| 31 | */ |
| 32 | private YangToJavaNamingConflictUtil conflictResolver; |
| 33 | |
| 34 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 35 | * Java code generation is for sbi. |
| 36 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 37 | private String codeGenerateForSbi; |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 38 | |
| 39 | /** |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 40 | * Creates an object for YANG plugin config. |
| 41 | */ |
| 42 | public YangPluginConfig() { |
| 43 | } |
| 44 | |
| 45 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 46 | * Returns the string for code generation. |
| 47 | * |
| 48 | * @return returns the string for code generation. |
| 49 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 50 | public String getCodeGenerateForSbi() { |
| 51 | return codeGenerateForSbi; |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Sets the string sbi or nbi for code generation. |
| 56 | * |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 57 | * @param codeGenerateForSbi generation is for sbi |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 58 | */ |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 59 | public void setCodeGenerateForSbi(String codeGenerateForSbi) { |
| 60 | this.codeGenerateForSbi = codeGenerateForSbi; |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 64 | * Sets the path of the java code where it has to be generated. |
| 65 | * |
| 66 | * @param codeGenDir path of the directory |
| 67 | */ |
| 68 | public void setCodeGenDir(String codeGenDir) { |
| 69 | this.codeGenDir = codeGenDir; |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Returns the code generation directory path. |
| 74 | * |
| 75 | * @return code generation directory |
| 76 | */ |
| 77 | public String getCodeGenDir() { |
| 78 | return codeGenDir; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Sets the object. |
| 83 | * |
| 84 | * @param conflictResolver object of the class |
| 85 | */ |
| 86 | public void setConflictResolver(YangToJavaNamingConflictUtil conflictResolver) { |
| 87 | this.conflictResolver = conflictResolver; |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Returns the object. |
| 92 | * |
| 93 | * @return object of the class |
| 94 | */ |
| 95 | public YangToJavaNamingConflictUtil getConflictResolver() { |
| 96 | return conflictResolver; |
| 97 | } |
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 98 | |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 99 | } |