Table of Contents |
---|
...
This plugin is used to offer Simple Issue Language Language™ (SILSIL™) support for the SQL Feed Custom Field offered by the nFeed Jira plugin. The nFeed plugin connects your data to Jira issues by creating custom fields with data from remote files, web services and databases, multi-selecting values from your data sources, creating infinite cascading selections, integrating the notion of conditional requests within Jira's custom fields. This page show you how this custom field is handled by our plugins and especially by SILSIL™.
Solution
First of all we need to create a CF Descriptor that allow us to handle the values that the nFeed Custom Field accepts and returns:
...
This class extends the abstract class AbstractCustomFieldDescriptor form the SIL engine Engine™ (former katl-commons) plugin. Due to the fact that the nFeed CF accepts only SQLFeedContent objects, in order to set the value of this custom field we need to get this type through Java Reflection. The toJiraValue() method is overridden in order to provide a converter from the SIL SIL™ Value to the objects that the nFeed CF supports.
The values returned by the nFeed CFs are in fact Collection<String> and this is why we are able to create the SIL SIL™ value for this CF type in a simple manner only by calling the SILValue constructor.
...
Also, we need to declare certain basic information about what we bring into SILSIL™.
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; } } |
...
That is all. You can use this CF in your SIL SIL™ programs by typing the name of your nFeed custom field - like any other Jira CF accepted by SILSIL™.
Code Block | ||
---|---|---|
| ||
string[] array = nFeed; //where nFeed is your CF name ! return array[0]; |
Binaries and Sources
Ok, now that you read it through, here they are: the binary (jar) and the sources, packed as zip:
- keplernfeed-4.0.1-SNAPSHOT.jar - the binary, ready to be deployed
- keplernfeed.zip - sources, zipped