Initial code drop of yang model driven configuration system
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / ftl / model / ModuleField.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model;
9
10 import java.util.Collections;
11 import java.util.List;
12
13 import org.opendaylight.controller.config.yangjmxgenerator.attribute.DependencyAttribute.Dependency;
14
15 public class ModuleField extends Field {
16
17     private final String nullableDefault, attributeName;
18     private final boolean dependent;
19     private final Dependency dependency;
20
21     public ModuleField(List<String> modifiers, String type, String name,
22             String attributeName, String nullableDefault, boolean isDependency,
23             Dependency dependency) {
24         super(modifiers, type, name);
25         this.nullableDefault = nullableDefault;
26         this.dependent = isDependency;
27         this.dependency = dependency;
28         this.attributeName = attributeName;
29     }
30
31     public ModuleField(String type, String name, String attributeName,
32             String nullableDefault, boolean isDependency, Dependency dependency) {
33         this(Collections.<String> emptyList(), type, name, attributeName,
34                 nullableDefault, isDependency, dependency);
35     }
36
37     public Dependency getDependency() {
38         return dependency;
39     }
40
41     public String getNullableDefault() {
42         return nullableDefault;
43     }
44
45     public boolean isDependent() {
46         return dependent;
47     }
48
49     public String getAttributeName() {
50         return attributeName;
51     }
52 }