X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator-plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2Fplugin%2Fftl%2FAbstractFactoryTemplate.java;h=c3a00b93da1b4d88a763ba07ee726a8b8966d382;hp=47b68ebf9a86c0447c25d503fe87dfd7f0102e4e;hb=531621aac4cff9d39cbd8668a53bdeba8a0e6d81;hpb=101159d6c201d67b670151f3ba8e31985a4923b7 diff --git a/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/AbstractFactoryTemplate.java b/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/AbstractFactoryTemplate.java index 47b68ebf9a..c3a00b93da 100644 --- a/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/AbstractFactoryTemplate.java +++ b/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/AbstractFactoryTemplate.java @@ -8,88 +8,26 @@ package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl; import com.google.common.collect.Lists; -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.annotations.AbstractServiceInterface; -import org.opendaylight.controller.config.spi.Module; import org.opendaylight.controller.config.spi.ModuleFactory; import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.Constructor; import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.Field; import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.Header; import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.MethodDefinition; -import org.osgi.framework.BundleContext; import java.util.Collections; import java.util.List; -/** - * - */ public class AbstractFactoryTemplate extends GeneralClassTemplate { - private static final List implementedIfcs = Lists + private static final List IMPLEMENTED_IFCS = Lists .newArrayList(ModuleFactory.class.getCanonicalName()); - private final String globallyUniqueName, moduleInstanceType; - private final List providedServices; - public AbstractFactoryTemplate(Header header, String packageName, - String abstractFactoryName, String globallyUniqueName, - String moduleInstanceType, List fields, - List providedServices) { + String abstractFactoryName, + List fields) { super(header, packageName, abstractFactoryName, Collections - . emptyList(), implementedIfcs, fields, Collections + . emptyList(), IMPLEMENTED_IFCS, fields, Collections . emptyList(), true, false, Collections . emptyList()); - this.globallyUniqueName = globallyUniqueName; - this.moduleInstanceType = moduleInstanceType; - this.providedServices = providedServices; - } - - public String getGloballyUniqueName() { - return globallyUniqueName; - } - - public String getInstanceType() { - return AutoCloseable.class.getCanonicalName(); - } - - public String getModuleNameType() { - return ModuleIdentifier.class.getCanonicalName(); - } - - public String getModuleInstanceType() { - return moduleInstanceType; - } - - public String getAbstractServiceInterfaceType() { - return AbstractServiceInterface.class.getCanonicalName(); } - - public List getProvidedServices() { - return providedServices; - } - - public String getModuleType() { - return Module.class.getCanonicalName(); - } - - public String getDependencyResolverType() { - return DependencyResolver.class.getCanonicalName(); - } - - public String getDynamicMBeanWithInstanceType() { - return DynamicMBeanWithInstance.class.getCanonicalName(); - } - - public String getBundleContextType() { - return BundleContext.class.getCanonicalName(); - } - - @Override - public String getFtlTempleteLocation() { - return "factory_abs_template.ftl"; - } - }