com.servicerocket.confluence.plugin.utility.library.ConverterModuleDescriptorFactory Maven / Gradle / Ivy
The newest version!
package com.servicerocket.confluence.plugin.utility.library;
import com.atlassian.plugin.ModuleDescriptor;
import com.atlassian.plugin.hostcontainer.HostContainer;
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugin.osgi.external.SingleModuleDescriptorFactory;
import com.servicerocket.confluence.randombits.support.core.convert.Converter;
/**
* Constructs a new {@link EnvironmentProviderModuleDescriptor}s.
*/
public class ConverterModuleDescriptorFactory extends SingleModuleDescriptorFactory {
private final ModuleFactory moduleFactory;
public ConverterModuleDescriptorFactory(HostContainer hostContainer, ModuleFactory moduleFactory) {
super(hostContainer, "converter", ConverterModuleDescriptor.class);
this.moduleFactory = moduleFactory;
}
@Override
public ModuleDescriptor getModuleDescriptor(String type) {
return hasModuleDescriptor(type) ? new ConverterModuleDescriptor(moduleFactory) : null;
}
}