public class

PortletConfigurationImpl

extends Object
implements PortletConfiguration
java.lang.Object
   ↳ com.atlassian.jira.portal.PortletConfigurationImpl

Class Overview

Represents the configuration for a portlet. This is the state that is saved to the database. This implmentation uses a passed in PropertySet to store the configurable properties. It is recommended that an in memory PropertySet is used as the store now persists this manually.

Summary

Public Constructors
PortletConfigurationImpl(Long id, Long dashboardPageId, Integer column, Integer row, Option<URI> openSocialSpecUri, Color color, Map<StringString> userPrefs, Option<ModuleCompleteKey> completeModuleKey)
Public Methods
int compareTo(PortletConfiguration that)
Color getColor()
Returns the color to use when rendering the Chrome of this gadget.
Integer getColumn()
Represents the column that the configured portlet resides in.
Option<ModuleCompleteKey> getCompleteModuleKey()
Return optional module key which identifies dashboard items which are described in atlassian-plugin.xml.
Long getDashboardPageId()
Provides the dashboard page id.
URI getGadgetURI()
Returns the URI pointing to the OpenSocial gadget XML specification.
Long getId()
Return the id of the PortletConfiguration.
Option<URI> getOpenSocialSpecUri()
Returns optional URI pointing to the OpenSocial gadget XML specification.
Integer getRow()
Represents the row that the configured portlet resides in.
Map<StringString> getUserPrefs()
An unmodifiable map of user preferences stored for this gadget.
void setColor(Color color)
Set the color of the chrome for a gadget.
void setColumn(Integer column)
Sets the column for the Portlet, effectively moving the portlet left or right on the page.
void setDashboardPageId(Long dashboardPageId)
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.
void setUserPrefs(Map<StringString> userPrefs)
Sets the userPreferences for this portletconfig.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.portal.PortletConfiguration
From interface java.lang.Comparable

Public Constructors

public PortletConfigurationImpl (Long id, Long dashboardPageId, Integer column, Integer row, Option<URI> openSocialSpecUri, Color color, Map<StringString> userPrefs, Option<ModuleCompleteKey> completeModuleKey)

Public Methods

public int compareTo (PortletConfiguration that)

public Color getColor ()

Returns the color to use when rendering the Chrome of this gadget.

Returns
  • color to use when rendering the Chrome of this gadget

public Integer getColumn ()

Represents the column that the configured portlet resides in.

Returns
  • the column number starting from 1.

public Option<ModuleCompleteKey> getCompleteModuleKey ()

Return optional module key which identifies dashboard items which are described in atlassian-plugin.xml.

Returns
  • optional complete module key

public Long getDashboardPageId ()

Provides the dashboard page id.

Returns
  • the dashboard page id.

public URI getGadgetURI ()

Returns the URI pointing to the OpenSocial gadget XML specification. May return null for legacy portlets (that don't implement the Gadget spec) or dashboard item without replacement uri.

Returns

public Long getId ()

Return the id of the PortletConfiguration.

Returns
  • the id of the PortletConfiguration.

public Option<URI> getOpenSocialSpecUri ()

Returns optional URI pointing to the OpenSocial gadget XML specification. It returns an empty com.atlassian.fugue.Option for dashboard item without replacement uri.

Returns
  • optional URI pointing to the Gadget XML

public Integer getRow ()

Represents the row that the configured portlet resides in.

Returns
  • the row number starting from 1.

public Map<StringString> getUserPrefs ()

An unmodifiable map of user preferences stored for this gadget.

Returns
  • map of user preferences stored for this gadget.

public void setColor (Color color)

Set the color of the chrome for a gadget.

Parameters
color the color of the chrome for a gadget.

public 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.

public void setDashboardPageId (Long dashboardPageId)

Sets the dashboard page id.

Parameters
dashboardPageId the dashboard page id.

public 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.

public void setUserPrefs (Map<StringString> userPrefs)

Sets the userPreferences for this portletconfig.

Parameters
userPrefs A map of key value pairs

public String toString ()