com.atlassian.jira.portal
Class PortletConfigurationImpl

java.lang.Object
  extended by com.atlassian.jira.portal.PortletConfigurationImpl
All Implemented Interfaces:
PortletConfiguration, Comparable<PortletConfiguration>

public class PortletConfigurationImpl
extends Object
implements PortletConfiguration

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.

Since:
??

Constructor Summary
PortletConfigurationImpl(Long id, Long dashboardPageId, Integer column, Integer row, URI gadgetUri, com.atlassian.gadgets.dashboard.Color color, Map<String,String> userPrefs)
           
 
Method Summary
 int compareTo(PortletConfiguration that)
           
 com.atlassian.gadgets.dashboard.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.
 Long getDashboardPageId()
          Provides the dashboard page id.
 URI getGadgetURI()
          Returns the URI pointing to the Gadget XML for this particular portlet.
 Long getId()
          Return the id of the PortletConfiguration.
 Integer getRow()
          Represents the row that the configured portlet resides in.
 Map<String,String> getUserPrefs()
          An unmodifiable map of user preferences stored for this gadget.
 void setColor(com.atlassian.gadgets.dashboard.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<String,String> userPrefs)
          Sets the userPreferences for this portletconfig.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortletConfigurationImpl

public PortletConfigurationImpl(Long id,
                                Long dashboardPageId,
                                Integer column,
                                Integer row,
                                URI gadgetUri,
                                com.atlassian.gadgets.dashboard.Color color,
                                Map<String,String> userPrefs)
Method Detail

getId

public Long getId()
Description copied from interface: PortletConfiguration
Return the id of the PortletConfiguration.

Specified by:
getId in interface PortletConfiguration
Returns:
the id of the PortletConfiguration.

getColumn

public Integer getColumn()
Description copied from interface: PortletConfiguration
Represents the column that the configured portlet resides in.

Specified by:
getColumn in interface PortletConfiguration
Returns:
the column number starting from 1.

setColumn

public void setColumn(Integer column)
Description copied from interface: PortletConfiguration
Sets the column for the Portlet, effectively moving the portlet left or right on the page.

Specified by:
setColumn in interface PortletConfiguration
Parameters:
column - the column number starting from 1.

getRow

public Integer getRow()
Description copied from interface: PortletConfiguration
Represents the row that the configured portlet resides in.

Specified by:
getRow in interface PortletConfiguration
Returns:
the row number starting from 1.

getDashboardPageId

public Long getDashboardPageId()
Description copied from interface: PortletConfiguration
Provides the dashboard page id.

Specified by:
getDashboardPageId in interface PortletConfiguration
Returns:
the dashboard page id.

setDashboardPageId

public void setDashboardPageId(Long dashboardPageId)
Description copied from interface: PortletConfiguration
Sets the dashboard page id.

Specified by:
setDashboardPageId in interface PortletConfiguration
Parameters:
dashboardPageId - the dashboard page id.

setRow

public void setRow(Integer row)
Description copied from interface: PortletConfiguration
Sets the row for the Portlet, effectively moving the portlet up or down on the page.

Specified by:
setRow in interface PortletConfiguration
Parameters:
row - the row number starting from 1.

getGadgetURI

public URI getGadgetURI()
Description copied from interface: PortletConfiguration
Returns the URI pointing to the Gadget XML for this particular portlet. May return null for legacy portlets (that don't implement the Gadget spec).

Specified by:
getGadgetURI in interface PortletConfiguration
Returns:
URI pointing to the Gadget XML or null
See Also:
http://code.google.com/apis/gadgets/docs/reference.html

getUserPrefs

public Map<String,String> getUserPrefs()
Description copied from interface: PortletConfiguration
An unmodifiable map of user preferences stored for this gadget. Will return an empty map in the case of a legacy gadget.

Specified by:
getUserPrefs in interface PortletConfiguration
Returns:
map of user preferences stored for this gadget.
See Also:
http://code.google.com/apis/gadgets/docs/reference.html#Userprefs_Ref

setUserPrefs

public void setUserPrefs(Map<String,String> userPrefs)
Description copied from interface: PortletConfiguration
Sets the userPreferences for this portletconfig.

Specified by:
setUserPrefs in interface PortletConfiguration
Parameters:
userPrefs - A map of key value pairs

getColor

public com.atlassian.gadgets.dashboard.Color getColor()
Description copied from interface: PortletConfiguration
Returns the color to use when rendering the Chrome of this gadget.

Specified by:
getColor in interface PortletConfiguration
Returns:
color to use when rendering the Chrome of this gadget

setColor

public void setColor(com.atlassian.gadgets.dashboard.Color color)
Description copied from interface: PortletConfiguration
Set the color of the chrome for a gadget.

Specified by:
setColor in interface PortletConfiguration
Parameters:
color - the color of the chrome for a gadget.

compareTo

public int compareTo(PortletConfiguration that)
Specified by:
compareTo in interface Comparable<PortletConfiguration>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012 Atlassian. All Rights Reserved.