Overview

JIRA provides Administration pages to View and Edit Application Properties. These pages are organized depending on the type of Parameters :

  • Attachment
  • General Configuration (Settings, Internationalisation, Options)
  • Look'n Feel (Logo, Colours, Date/Time Formats)
  • Time Tracking
  • Trackback Settings
  • User Default Settings
In your plugins, you are able to configure Porlet properties, to define which parameter are used for a report, but nothing has been done for the other Plugin's Parameters.

Through the Settings Management, Kaamelot will try to offer a way to manage any setting required to parameter thye behavior of your plugins.

Define a Setting Provider

In order to access to your parameters through the Settings Management, you will have to define a Setting Provider. Process as follow :
  • Create a Class extending com.atlassian.jira.config.settings.providers.ASettingsProvider and implementing com.atlassian.jira.config.settings.providers.SettingsProvider
  • Declare it as Component in the atlassian-plugin.xml for your plugin.
  • In case of Kaamelot, I created on KaamelotSettingsProvider as follow :

    package com.atlassian.jira.config.settings.providers;
    import com.atlassian.jira.config.KaamelotKeys;
    import com.atlassian.jira.config.settings.directory.SettingsProviderDirectory;
    
    public class KaamelotSettingsProvider extends ASettingsProvider {
    	public KaamelotSettingsProvider(SettingsProviderDirectory settingsProviderDirectory) {
    		super(settingsProviderDirectory);
    	}
    	protected void init() {
    		addSetting(KaamelotKeys.JIRA_LF_REPORT_END_BGCOLOUR, COLOR_SETTING_MANAGER_KEY);
    		addSetting(KaamelotKeys.JIRA_LF_REPORT_START_BGCOLOUR, COLOR_SETTING_MANAGER_KEY);
    		
    		addSetting(KaamelotKeys.WORKLOG_UPDATE_DELAY_DAYS, INTEGER_SETTING_MANAGER_KEY);
    	}
    	public String getId() {
    		return "fr.kaamelot.settings";
    	}
    }
    
  • and declare it as Component as follow :

    <component key="KaamelotSettingsProvider" name="KaamelotSettingsProvider" class="com.atlassian.jira.config.settings.providers.KaamelotSettingsProvider" />
    


Define a Setting Manager, if required

In order to be able to View or Edit the parameters, some Settings Manager have to be defined.

Kaamelot already provides you as set of SettingManager.
  • StringSettingManager : Used to View and Edit String.
  • IntegerSettingManager : Used to View and Edit Integer, even if they are sorted as String in ApplicationProperties.
  • ColorSettingManager : Used to View and Edit Color Settings.
If these 3 SettingManager do not allow to manage your Plugin's property, then you can define a new one, by creating a new Class extending ASettingsManager Class and implementing SettingsManager Interface, and define it as component as follow :
<component key="NewTypeSettingManager" name="NewTypeSettingManager" class="com.atlassian.jira.config.settings.managers.NewTypeSettingManager" />

Setting Managment for Kaamelot Settings

The behavior of some of the features provided by Kaamelot may parameterized, like Colors used for Gradient in Report Look'n Feel, or Worklog.Update.Delay.In.Days (Delay in Days after the End of Month where a Worklog is not alterable).



View :

View Kaamelot Setting



Edit :

Edit Kaamelot Setting