Package com.atlassian.jira.upgrade.util
Class SimpleLegacyPortletUpgradeTask
java.lang.Object
com.atlassian.jira.upgrade.util.AbstractLegacyPortletUpgradeTask
com.atlassian.jira.upgrade.util.SimpleLegacyPortletUpgradeTask
- All Implemented Interfaces:
LegacyPortletUpgradeTask
Simple legacy portlet upgrade task where no extra work needs to be done to map from existing user preferences
to new user preferences.
-
Field Summary
Fields inherited from class com.atlassian.jira.upgrade.util.AbstractLegacyPortletUpgradeTask
MULTIVALUE_SEPARATOR, PORTLET_MULTI_VALUE_SEPARATOR, SEPARATOR_ENCODED -
Constructor Summary
ConstructorsConstructorDescriptionSimpleLegacyPortletUpgradeTask(String portletKey, String gadgetUri) SimpleLegacyPortletUpgradeTask(String portletKey, URI gadgetUri) -
Method Summary
Modifier and TypeMethodDescriptionconvertUserPrefs(com.opensymphony.module.propertyset.PropertySet propertySet) Converts the propertySet in use by this portletConfiguration to a Mapinvalid input: '<'String,String>.Returns the gadget URI to be used for this portlet.Returns the portletKey that this upgrade task can convert.Methods inherited from class com.atlassian.jira.upgrade.util.AbstractLegacyPortletUpgradeTask
convertMultiSelectValue
-
Constructor Details
-
SimpleLegacyPortletUpgradeTask
-
SimpleLegacyPortletUpgradeTask
-
-
Method Details
-
getPortletKey
Description copied from interface:LegacyPortletUpgradeTaskReturns the portletKey that this upgrade task can convert. Note that this is the full key that can be contained via. For example: 'com.atlassian.jira.plugin.system.portlets:inprogress'invalid reference
com.atlassian.jira.portal.Portlet#getId()- Specified by:
getPortletKeyin interfaceLegacyPortletUpgradeTask- Specified by:
getPortletKeyin classAbstractLegacyPortletUpgradeTask- Returns:
- the portletKey that this upgrade task can convert.
-
getGadgetUri
Description copied from interface:LegacyPortletUpgradeTaskReturns the gadget URI to be used for this portlet. Should be a relative URI pointing to the gadget replacing this portlet. For example: 'rest/gadgets/1.0/g/com.atlassian.jira.gadgets/gadgets/filter-results-gadget.xml'- Specified by:
getGadgetUriin interfaceLegacyPortletUpgradeTask- Specified by:
getGadgetUriin classAbstractLegacyPortletUpgradeTask- Returns:
- the gadget URI to be used for this portlet.
-
convertUserPrefs
public Map<String,String> convertUserPrefs(com.opensymphony.module.propertyset.PropertySet propertySet) Description copied from interface:LegacyPortletUpgradeTaskConverts the propertySet in use by this portletConfiguration to a Mapinvalid input: '<'String,String>. Please note that multi value values (values separated by _*|*_ in the propertyset) should be converted to values simply separated by '|'. If '|' occurs in a value it needs to be % encoded to '%7C'.Implementations may choose to convert properties to userprefs depending on the new gadgets requirements. This doesn't have to represent a 1 to 1 mapping.
- Specified by:
convertUserPrefsin interfaceLegacyPortletUpgradeTask- Overrides:
convertUserPrefsin classAbstractLegacyPortletUpgradeTask- Parameters:
propertySet- the old portletConfiguration propertySet to be converted- Returns:
- the propertySet converted to a map of key -> value pairs.
-