com.atlassian.jira.upgrade.util
Interface LegacyPortletUpgradeTask

All Known Implementing Classes:
AbstractLegacyPortletUpgradeTask, SimpleLegacyPortletUpgradeTask

public interface LegacyPortletUpgradeTask

Responsible for providing the information required to converting a legacyPorltet over to a new Gadget.

Since:
v4.0

Method Summary
 java.util.Map<java.lang.String,java.lang.String> convertUserPrefs(com.opensymphony.module.propertyset.PropertySet propertySet)
          Converts the propertySet in use by this portletConfiguration to a Map.
 java.net.URI getGadgetUri()
          Returns the gadget URI to be used for this portlet.
 java.lang.String getPortletKey()
          Returns the portletKey that this upgrade task can convert.
 

Method Detail

getPortletKey

java.lang.String getPortletKey()
Returns the portletKey that this upgrade task can convert. Note that this is the full key that can be contained via Portlet.getId(). For example: 'com.atlassian.jira.plugin.system.portlets:inprogress'

Returns:
the portletKey that this upgrade task can convert.

getGadgetUri

java.net.URI getGadgetUri()
Returns 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'

Returns:
the gadget URI to be used for this portlet.

convertUserPrefs

java.util.Map<java.lang.String,java.lang.String> convertUserPrefs(com.opensymphony.module.propertyset.PropertySet propertySet)
Converts the propertySet in use by this portletConfiguration to a Map. 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.

Parameters:
propertySet - the old portletConfiguration propertySet to be converted
Returns:
the propertySet converted to a map of key -> value pairs.


Copyright © 2002-2010 Atlassian. All Rights Reserved.