com.atlassian.jira.portal
Class PortletConfigurationImpl

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

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, String portletKey, Portlet portlet, Integer column, Integer row, com.opensymphony.module.propertyset.PropertySet configuration)
           
 
Method Summary
 int compareTo(Object o)
           
 Integer getColumn()
          Represents the column that the configured portlet resides in.
 Long getDashboardPageId()
          Provides the dashboard page id.
 String getDefaultProperty(String propertyKey)
           
 Long getId()
          Return the id of the PortletConfiguration.
 String getKey()
           
 Long getLongProperty(String propertyKey)
           
 com.atlassian.configurable.ObjectConfiguration getObjectConfiguration()
           
 Portlet getPortlet()
          Returns the portlet implementation that this PortletConfiguration is for.
 com.opensymphony.module.propertyset.PropertySet getProperties()
           
 String getProperty(String propertyKey)
          Return the property if it is found, else return the default property
 Integer getRow()
          Represents the row that the configured portlet resides in.
 String getTextProperty(String propertyKey)
           
 boolean hasProperty(String propertyKey)
           
 boolean isResourcesProvided()
          Normal rendition of the Portlet should have JavaScript and CSS etc.
 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.
 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,
                                String portletKey,
                                Portlet portlet,
                                Integer column,
                                Integer row,
                                com.opensymphony.module.propertyset.PropertySet configuration)
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.

getPortlet

public Portlet getPortlet()
Description copied from interface: PortletConfiguration
Returns the portlet implementation that this PortletConfiguration is for.

Specified by:
getPortlet in interface PortletConfiguration
Returns:
the portlet.

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.

getKey

public String getKey()
Specified by:
getKey in interface com.atlassian.configurable.ObjectConfigurable

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.

isResourcesProvided

public boolean isResourcesProvided()
Normal rendition of the Portlet should have JavaScript and CSS etc. resources provided somewhere on the page.

Specified by:
isResourcesProvided in interface PortletConfiguration
Returns:
true always.

getObjectConfiguration

public com.atlassian.configurable.ObjectConfiguration getObjectConfiguration()
                                                                      throws com.atlassian.configurable.ObjectConfigurationException
Specified by:
getObjectConfiguration in interface com.atlassian.configurable.ObjectConfigurable
Throws:
com.atlassian.configurable.ObjectConfigurationException

hasProperty

public boolean hasProperty(String propertyKey)
                    throws com.atlassian.configurable.ObjectConfigurationException
Specified by:
hasProperty in interface com.atlassian.configurable.ObjectConfigurable
Throws:
com.atlassian.configurable.ObjectConfigurationException

getProperty

public String getProperty(String propertyKey)
                   throws com.atlassian.configurable.ObjectConfigurationException
Return the property if it is found, else return the default property

Specified by:
getProperty in interface com.atlassian.configurable.ObjectConfigurable
Parameters:
propertyKey - The key to look up from the PropertySet
Throws:
com.atlassian.configurable.ObjectConfigurationException

getTextProperty

public String getTextProperty(String propertyKey)
                       throws com.atlassian.configurable.ObjectConfigurationException
Specified by:
getTextProperty in interface com.atlassian.configurable.ObjectConfigurable
Throws:
com.atlassian.configurable.ObjectConfigurationException

getLongProperty

public Long getLongProperty(String propertyKey)
                     throws com.atlassian.configurable.ObjectConfigurationException
Specified by:
getLongProperty in interface com.atlassian.configurable.ObjectConfigurable
Throws:
com.atlassian.configurable.ObjectConfigurationException

getDefaultProperty

public String getDefaultProperty(String propertyKey)
                          throws com.atlassian.configurable.ObjectConfigurationException
Specified by:
getDefaultProperty in interface com.atlassian.configurable.ObjectConfigurable
Throws:
com.atlassian.configurable.ObjectConfigurationException

getProperties

public com.opensymphony.module.propertyset.PropertySet getProperties()
Specified by:
getProperties in interface com.atlassian.configurable.ObjectConfigurable

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2008 Atlassian. All Rights Reserved.