blob: 44ce3060d10e070d7fd2e6b88516f5ad5115a60d [file] [log] [blame]
janani bde4ffab2016-04-15 16:18:30 +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
Shankara-Huaweibdf24bb2016-08-02 18:13:13 +053017package org.onosproject.yangutils.datamodel.javadatamodel;
janani bde4ffab2016-04-15 16:18:30 +053018
19/**
20 * Representation of plugin configurations required for YANG utils.
21 */
22public final class YangPluginConfig {
23
24 /**
janani bde4ffab2016-04-15 16:18:30 +053025 * Contains the code generation directory.
26 */
27 private String codeGenDir;
28
29 /**
Bharat saraswalb1170bd2016-07-14 13:26:18 +053030 * Contains the code generation directory.
31 */
32 private String managerCodeGenDir;
33
34 /**
janani bde4ffab2016-04-15 16:18:30 +053035 * Contains information of naming conflicts that can be resolved.
36 */
37 private YangToJavaNamingConflictUtil conflictResolver;
38
39 /**
Vidyashree Rama7142d9c2016-04-26 15:06:06 +053040 * Creates an object for YANG plugin config.
41 */
42 public YangPluginConfig() {
43 }
44
45 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +053046 * 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 Rama1b499062016-07-12 20:52:48 +053062 * @param codeGenerateForsbi generation is for sbi
Shankara-Huaweib9999eb2016-07-14 16:53:09 +053063 */
64 public void setCodeGenerateForsbi(String codeGenerateForsbi) {
65 this.codeGenerateForsbi = codeGenerateForsbi;
66 }
67
68 /**
janani bde4ffab2016-04-15 16:18:30 +053069 * 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 saraswalb1170bd2016-07-14 13:26:18 +0530103
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 bde4ffab2016-04-15 16:18:30 +0530121}