com.atlassian.jira.web.component
Interface DashboardPageConfigUrlFactory

All Known Implementing Classes:
DashboardPageConfigUrlFactoryImpl

public interface DashboardPageConfigUrlFactory

Responsible for creating URLs for editing the state and dashboard page location of portlets. The URLs should be relative to context root.

Since:
v3.13

Nested Class Summary
static interface DashboardPageConfigUrlFactory.PortletConfigurationAdaptor
          Abstraction for describing the aspects of the PortletConfiguration object graph that we depend on without depending on all the mechanical details like ObjectConfiguration and PropertySet.
 
Method Summary
 String getAddPortletUrl()
          Returns a URL for adding a portlet to the dashboard.
 String getDashboardBaseUrl(Long portletConfigurationId)
          Returns a URL for dashboard configuration operation.
 String getEditPortletUrl(Long portletConfigId)
          Returns a URL for configuring portlets on the dashboard.
 String getPortletOperationUrl(Long portletConfigurationId, String operationName)
          Returns a URL for dashboard configuration operation.
 String getRunPortletUrl(DashboardPageConfigUrlFactory.PortletConfigurationAdaptor configurationAccessor)
          Returns a URL for RunPortlet action that will execute the given portlet configuration.
 String getRunPortletUrl(PortletConfiguration portletConfiguration)
          Returns a URL for RunPortlet action that will execute the given portlet configuration.
 

Method Detail

getRunPortletUrl

String getRunPortletUrl(DashboardPageConfigUrlFactory.PortletConfigurationAdaptor configurationAccessor)
Returns a URL for RunPortlet action that will execute the given portlet configuration.

Parameters:
configurationAccessor - portlet configuration
Returns:
URL as String, never null

getRunPortletUrl

String getRunPortletUrl(PortletConfiguration portletConfiguration)
Returns a URL for RunPortlet action that will execute the given portlet configuration.

Parameters:
portletConfiguration - portlet configuration
Returns:
URL as String, never null

getDashboardBaseUrl

String getDashboardBaseUrl(Long portletConfigurationId)
Returns a URL for dashboard configuration operation.

This method can be used to generate URL that does not require an operation to be specified. The operation can be appended to it.

Parameters:
portletConfigurationId - portlet configuration id
Returns:
URL as String, never null

getPortletOperationUrl

String getPortletOperationUrl(Long portletConfigurationId,
                              String operationName)
Returns a URL for dashboard configuration operation.

This is used for operations such as 'left', 'right', 'up', 'down', 'first' and 'last'.

Parameters:
portletConfigurationId - portlet configuration id
operationName - operation name
Returns:
URL as String, never null

getAddPortletUrl

String getAddPortletUrl()
Returns a URL for adding a portlet to the dashboard.

Returns:
the URL, never null.

getEditPortletUrl

String getEditPortletUrl(Long portletConfigId)
Returns a URL for configuring portlets on the dashboard.

Parameters:
portletConfigId - the portlet to configure.
Returns:
the URL, never null.


Copyright © 2002-2008 Atlassian. All Rights Reserved.