com.servicerocket.confluence.plugin.utility.library.SupplierModuleDescriptorFactory 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.supplier.core.Supplier;
public class SupplierModuleDescriptorFactory extends SingleModuleDescriptorFactory {
private final ModuleFactory moduleFactory;
public SupplierModuleDescriptorFactory(HostContainer hostContainer, ModuleFactory moduleFactory) {
super(hostContainer, "reporting-supplier", SupplierModuleDescriptor.class);
this.moduleFactory = moduleFactory;
}
@Override
public ModuleDescriptor getModuleDescriptor(String type) {
return hasModuleDescriptor(type) ? new SupplierModuleDescriptor(moduleFactory) : null;
}
}