com.atlassian.jira.portal
Interface PortletConfiguration

All Superinterfaces:
Comparable, com.atlassian.configurable.ObjectConfigurable
All Known Implementing Classes:
PortletConfigurationImpl

public interface PortletConfiguration
extends Comparable, com.atlassian.configurable.ObjectConfigurable

A representation of a configuration for a Portlet on a page. In addition to the ObjectConfigurable properties of the Portlet, the row and column are available as well as the id of the dashboard page. The interface is a bit bogus - partially a dashboard page position bean with some other stuff on it.

Only the main implementation, PortletConfigurationImpl, properly uses the full interface. Bear in mind there is an implementation in the JIRA Charting Plugin called SearchRequestViewPortletConfiguration which is used to quickly render charts as issue navigator views.


Method Summary
 Integer getColumn()
          Represents the column that the configured portlet resides in.
 Long getDashboardPageId()
          Provides the dashboard page id.
 Long getId()
          Return the id of the PortletConfiguration.
 Portlet getPortlet()
          Returns the portlet implementation that this PortletConfiguration is for.
 Integer getRow()
          Represents the row that the configured portlet resides in.
 boolean isResourcesProvided()
          Declares whether the portlet should expect to have resources such as CSS and JavaScript files included in the page.
 void setColumn(Integer column)
          Sets the column for the Portlet, effectively moving the portlet left or right on the page.
 void setDashboardPageId(Long portalPageId)
          Sets the dashboard page id.
 void setRow(Integer row)
          Sets the row for the Portlet, effectively moving the portlet up or down on the page.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.atlassian.configurable.ObjectConfigurable
getDefaultProperty, getKey, getLongProperty, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty
 

Method Detail

getId

Long getId()
Return the id of the PortletConfiguration.

Returns:
the id of the PortletConfiguration.

getPortlet

Portlet getPortlet()
Returns the portlet implementation that this PortletConfiguration is for.

Returns:
the portlet.

getColumn

Integer getColumn()
Represents the column that the configured portlet resides in.

Returns:
the column number starting from 1.

setColumn

void setColumn(Integer column)
Sets the column for the Portlet, effectively moving the portlet left or right on the page.

Parameters:
column - the column number starting from 1.

getRow

Integer getRow()
Represents the row that the configured portlet resides in.

Returns:
the row number starting from 1.

setRow

void setRow(Integer row)
Sets the row for the Portlet, effectively moving the portlet up or down on the page.

Parameters:
row - the row number starting from 1.

getDashboardPageId

Long getDashboardPageId()
Provides the dashboard page id.

Returns:
the dashboard page id.

setDashboardPageId

void setDashboardPageId(Long portalPageId)
Sets the dashboard page id.

Parameters:
portalPageId - the dashboard page id.

isResourcesProvided

boolean isResourcesProvided()
Declares whether the portlet should expect to have resources such as CSS and JavaScript files included in the page. If false, the portlet should assume that these resources are unavailable and not render any tricky sexy magic that relies on JavaScript functions defined in these files. The RunPortlet action will most likely provide an implementaion which returns false to this method and Portlets rendered there will therefore need to work without their resource files.

Returns:
true only if the CSS and JavaScript files etc. will be available on the rendered page.


Copyright © 2002-2008 Atlassian. All Rights Reserved.