com.atlassian.jira.dashboard
Interface LegacyGadgetUrlProvider

All Known Implementing Classes:
DefaultLegacyGadgetUrlProvider

public interface LegacyGadgetUrlProvider

Helper interface to provide some utility methods for dealing with legacy portlet URIs.

Since:
v4.0

Field Summary
static String LEGACY_BRIDGET_GADGET_URI_PREFIX
           
static String LEGACY_PORTLET_ID_PREF
           
static String URI_EXTENSION
           
 
Method Summary
 String extractPortletKey(URI gadgetUri)
          Given a URI for legacy portlet spec, this method extracts the portlet key.
 URI getLegacyURI(String portletKey)
          Given the portletKey, this method concatenates this instances baseurl, prefix, key and extension to provide the location of the gadget spec for this gadget.
 boolean isLegacyGadget(URI gadgetUri)
          Given a URI this method checks if the URI is for a legacy portlet.
 

Field Detail

LEGACY_BRIDGET_GADGET_URI_PREFIX

static final String LEGACY_BRIDGET_GADGET_URI_PREFIX
See Also:
Constant Field Values

URI_EXTENSION

static final String URI_EXTENSION
See Also:
Constant Field Values

LEGACY_PORTLET_ID_PREF

static final String LEGACY_PORTLET_ID_PREF
See Also:
Constant Field Values
Method Detail

getLegacyURI

URI getLegacyURI(String portletKey)
Given the portletKey, this method concatenates this instances baseurl, prefix, key and extension to provide the location of the gadget spec for this gadget.

Parameters:
portletKey - The portletKey for the legacy portlet
Returns:
A URI containing the location of the gadgetSpec

isLegacyGadget

boolean isLegacyGadget(URI gadgetUri)
Given a URI this method checks if the URI is for a legacy portlet.

Parameters:
gadgetUri - The gadget spec URI
Returns:
true if the uri is for a legacy portlet, false otherwise

extractPortletKey

String extractPortletKey(URI gadgetUri)
Given a URI for legacy portlet spec, this method extracts the portlet key.

Parameters:
gadgetUri - The legacy portlet gadget spec URI
Returns:
The legacy portletKey defined in the URI.
Throws:
IllegalArgumentException - if the gadgetURI is not for a legacy portlet


Copyright © 2002-2009 Atlassian. All Rights Reserved.