2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model;
10 import org.opendaylight.controller.config.api.IdentityAttributeRef;
12 public class IdentityRefModuleField extends ModuleField {
14 public static final String IDENTITY_CLASS_FIELD_SUFFIX = "IdentityClass";
15 private final String identityBaseClass;
17 public IdentityRefModuleField(String type, String name, String attributeName, String identityBaseClass) {
18 super(type, name, attributeName, null, false, null, false, false);
19 this.identityBaseClass = identityBaseClass;
22 public String getIdentityBaseClass() {
23 return identityBaseClass;
27 public boolean isIdentityRef() {
31 public String getType() {
32 return IdentityAttributeRef.class.getName();
35 public String getIdentityClassType() {
36 return super.getType();
39 public String getIdentityClassName() {
40 return addIdentityClassFieldSuffix(getName());
43 public static String addIdentityClassFieldSuffix(String prefix) {
44 return prefix + IDENTITY_CLASS_FIELD_SUFFIX;