janani b | de4ffab | 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 | |
Shankara-Huawei | bdf24bb | 2016-08-02 18:13:13 +0530 | [diff] [blame^] | 17 | package org.onosproject.yangutils.datamodel.javadatamodel; |
janani b | de4ffab | 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 | de4ffab | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 25 | * Contains the code generation directory. |
| 26 | */ |
| 27 | private String codeGenDir; |
| 28 | |
| 29 | /** |
Bharat saraswal | b1170bd | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 30 | * Contains the code generation directory. |
| 31 | */ |
| 32 | private String managerCodeGenDir; |
| 33 | |
| 34 | /** |
janani b | de4ffab | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 35 | * Contains information of naming conflicts that can be resolved. |
| 36 | */ |
| 37 | private YangToJavaNamingConflictUtil conflictResolver; |
| 38 | |
| 39 | /** |
Vidyashree Rama | 7142d9c | 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 | b9999eb | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 46 | * Java code generation is for sbi. |
| 47 | */ |
| 48 | private String codeGenerateForsbi; |
| 49 | |
| 50 | /** |
| 51 | * Returns the string for code generation. |
| 52 | * |
| 53 | * @return returns the string for code generation. |
| 54 | */ |
| 55 | public String getCodeGenerateForsbi() { |
| 56 | return codeGenerateForsbi; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Sets the string sbi or nbi for code generation. |
| 61 | * |
Vidyashree Rama | 1b49906 | 2016-07-12 20:52:48 +0530 | [diff] [blame] | 62 | * @param codeGenerateForsbi generation is for sbi |
Shankara-Huawei | b9999eb | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 63 | */ |
| 64 | public void setCodeGenerateForsbi(String codeGenerateForsbi) { |
| 65 | this.codeGenerateForsbi = codeGenerateForsbi; |
| 66 | } |
| 67 | |
| 68 | /** |
janani b | de4ffab | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 69 | * Sets the path of the java code where it has to be generated. |
| 70 | * |
| 71 | * @param codeGenDir path of the directory |
| 72 | */ |
| 73 | public void setCodeGenDir(String codeGenDir) { |
| 74 | this.codeGenDir = codeGenDir; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Returns the code generation directory path. |
| 79 | * |
| 80 | * @return code generation directory |
| 81 | */ |
| 82 | public String getCodeGenDir() { |
| 83 | return codeGenDir; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Sets the object. |
| 88 | * |
| 89 | * @param conflictResolver object of the class |
| 90 | */ |
| 91 | public void setConflictResolver(YangToJavaNamingConflictUtil conflictResolver) { |
| 92 | this.conflictResolver = conflictResolver; |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Returns the object. |
| 97 | * |
| 98 | * @return object of the class |
| 99 | */ |
| 100 | public YangToJavaNamingConflictUtil getConflictResolver() { |
| 101 | return conflictResolver; |
| 102 | } |
Bharat saraswal | b1170bd | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 103 | |
| 104 | /** |
| 105 | * Returns manager's code generation directory. |
| 106 | * |
| 107 | * @return manager's code generation directory |
| 108 | */ |
| 109 | public String getManagerCodeGenDir() { |
| 110 | return managerCodeGenDir; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Sets manager's code generation directory. |
| 115 | * |
| 116 | * @param moduleCodeGenDir manager's code generation directory |
| 117 | */ |
| 118 | public void setManagerCodeGenDir(String moduleCodeGenDir) { |
| 119 | this.managerCodeGenDir = moduleCodeGenDir; |
| 120 | } |
janani b | de4ffab | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 121 | } |