...
Warning |
---|
Kepler is not affiliated or in commercial relation(s) with the provider of the nFeed plugin (Valiantys), other than those imposed by the general terms at Atlassian (we're both plugin providers). In other words, this is totally unsupported, wacky tweak, can harm you nFeed plugin if not used properly (values on set need to really exist in the DB!), may change in the future (we do not plan support for that). In fact, you should insert here all the possible warnings you can think of. Just don't blame us. |
...
Second, we need to register CF Descriptor. For that, we need our own launcher.:
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
/* * File: KeplerNFeedLauncher */ package com.keplerrominfo.jira.plugins.keplernfeed.admin; import com.atlassian.event.api.EventPublisher; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.fields.CustomField; import com.atlassian.plugin.spring.scanner.annotation.component.ClasspathComponent; import com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService; import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport; import com.atlassian.sal.api.lifecycle.LifecycleAware; import com.keplerrominfo.common.util.MutableString; import com.keplerrominfo.jira.commons.hostapp.JMUserServices; import com.keplerrominfo.jira.commons.ivm.*; import com.keplerrominfo.jira.plugins.keplernfeed.nfeedcf.NFeedCFDescriptor; import com.keplerrominfo.refapp.config.*; import com.keplerrominfo.refapp.config.impl.PluginConfigurationServiceImpl; import com.keplerrominfo.refapp.launcher.AbstractPluginLauncher; import com.keplerrominfo.sil.lang.KeyableArraySILObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * The launcher for Kepler nFeed plugin * * @author Ana-Maria Gologan (ana.gologan@kepler-rominfo.com) * @version 1.0 * @since 4.0.0 */ @Component @ExportAsService(LifecycleAware.class) public class KeplerNFeedLauncher extends AbstractPluginLauncher { private static final String NFEED_CF_KEY = "com.valiantys.jira.plugins.SQLFeed:com.valiantys.jira.plugins.sqlfeed.customfield.type"; private final CustomFieldDescriptorRegistry customFieldDescriptorRegistry; @Autowired public KeplerNFeedLauncher(PluginInfoService pluginInfoService, @ClasspathComponent PluginConfigurationServiceImpl pluginConfigurationService, @ComponentImport EventPublisher eventPublisher, @ComponentImport HostConfigurationProvider hostConfigurationProvider, // needed by UserIsAdministratorCondition from commons. DON'T REMOVE @ComponentImport JMUserServices userServices, // needed by PluginConfigurationServiceImpl above. DON'T REMOVE @ComponentImport CommonPluginConfigurationService commonPluginConfigurationService, @ComponentImport final CustomFieldDescriptorRegistry customFieldDescriptorRegistry) { super(eventPublisher, pluginInfoService, hostConfigurationProvider, pluginConfigurationService); this.customFieldDescriptorRegistry = customFieldDescriptorRegistry; } @Override public void doAtLaunch() { super.doAtLaunch(); customFieldDescriptorRegistry.register(NFEED_CF_KEY, NFEED_CFDF); } @Override public void doAtStop() { customFieldDescriptorRegistry.unregister(NFEED_CF_KEY); super.doAtStop(); } private static final CustomFieldDescriptorFactory<Object, KeyableArraySILObject<MutableString>> NFEED_CFDF = new AbstractCustomFieldDescriptorFactory<Object, KeyableArraySILObject<MutableString>>( "sil.adapters.cf.nfeed", "nFeed -> string[]", "Translates to an array of string values") { @Override public FieldDescriptor<Object, KeyableArraySILObject<MutableString>> createDescriptor(Issue issue, CustomField cf) { return new NFeedCFDescriptor(issue, cf); } }; } |
...
Also, we need to declare some basic information about what we bring to SIL.
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
/* * File: KeplerNFeedPluginInfoService */ package com.keplerrominfo.jira.plugins.keplernfeed.admin; import javax.annotation.Nonnull; import com.keplerrominfo.refapp.config.PluginInfoService; import org.springframework.stereotype.Component; /** * The Info Service for Kepler nFeed plugin * * @author Ana-Maria Gologan (ana.gologan@kepler-rominfo.com) * @version 1.0 * @since 4.0.0 */ @Component public class KeplerNFeedPluginInfoService implements PluginInfoService { public static final String PLUGIN_NAME = "Kepler SIL nFeed Support"; public static final String PLUGIN_KEY = "com.keplerrominfo.jira.plugins.keplernfeed"; @Nonnull public String getKey() { return PLUGIN_KEY; } @Nonnull public String getName() { return PLUGIN_NAME; } } |
...
Ok, now that you read it through, here they are: the binary (jar) and the sources, packed as zip
- keplernfeed-4.0.0-SNAPSHOT.jar - the binary, ready to be deployed
- keplernfeed.zip - sources, zipped