Package com.atlassian.jira.portal
Class PortletConfigurationImpl
java.lang.Object
com.atlassian.jira.portal.PortletConfigurationImpl
- All Implemented Interfaces:
PortletConfiguration,Comparable<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.
-
Constructor Summary
ConstructorsConstructorDescriptionPortletConfigurationImpl(Long id, Long dashboardPageId, Integer column, Integer row, io.atlassian.fugue.Option<URI> openSocialSpecUri, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPrefs, io.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey> completeModuleKey) -
Method Summary
Modifier and TypeMethodDescriptionintcom.atlassian.gadgets.dashboard.ColorgetColor()Returns the color to use when rendering the Chrome of this gadget.Represents the column that the configured portlet resides in.io.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey>Return optional module key which identifies dashboard items which are described in atlassian-plugin.xml.Provides the dashboard page id.Returns the URI pointing to the OpenSocial gadget XML specification.getId()Return the id of the PortletConfiguration.io.atlassian.fugue.Option<URI>Returns optional URI pointing to the OpenSocial gadget XML specification.getRow()Represents the row that the configured portlet resides in.An unmodifiable map of user preferences stored for this gadget.voidsetColor(com.atlassian.gadgets.dashboard.Color color) Set the color of the chrome for a gadget.voidSets the column for the Portlet, effectively moving the portlet left or right on the page.voidsetDashboardPageId(Long dashboardPageId) Sets the dashboard page id.voidSets the row for the Portlet, effectively moving the portlet up or down on the page.voidsetUserPrefs(Map<String, String> userPrefs) Sets the userPreferences for this portletconfig.toString()
-
Constructor Details
-
PortletConfigurationImpl
public PortletConfigurationImpl(Long id, Long dashboardPageId, Integer column, Integer row, io.atlassian.fugue.Option<URI> openSocialSpecUri, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPrefs, io.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey> completeModuleKey)
-
-
Method Details
-
getId
Description copied from interface:PortletConfigurationReturn the id of the PortletConfiguration.- Specified by:
getIdin interfacePortletConfiguration- Returns:
- the id of the PortletConfiguration.
-
getColumn
Description copied from interface:PortletConfigurationRepresents the column that the configured portlet resides in.- Specified by:
getColumnin interfacePortletConfiguration- Returns:
- the column number starting from 1.
-
setColumn
Description copied from interface:PortletConfigurationSets the column for the Portlet, effectively moving the portlet left or right on the page.- Specified by:
setColumnin interfacePortletConfiguration- Parameters:
column- the column number starting from 1.
-
getRow
Description copied from interface:PortletConfigurationRepresents the row that the configured portlet resides in.- Specified by:
getRowin interfacePortletConfiguration- Returns:
- the row number starting from 1.
-
getDashboardPageId
Description copied from interface:PortletConfigurationProvides the dashboard page id.- Specified by:
getDashboardPageIdin interfacePortletConfiguration- Returns:
- the dashboard page id.
-
setDashboardPageId
Description copied from interface:PortletConfigurationSets the dashboard page id.- Specified by:
setDashboardPageIdin interfacePortletConfiguration- Parameters:
dashboardPageId- the dashboard page id.
-
setRow
Description copied from interface:PortletConfigurationSets the row for the Portlet, effectively moving the portlet up or down on the page.- Specified by:
setRowin interfacePortletConfiguration- Parameters:
row- the row number starting from 1.
-
getGadgetURI
Description copied from interface:PortletConfigurationReturns 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.- Specified by:
getGadgetURIin interfacePortletConfiguration- Returns:
- URI pointing to the Gadget XML or null
deprecated Use
PortletConfiguration.getOpenSocialSpecUri()instead. Since v6.4.
-
getUserPrefs
Description copied from interface:PortletConfigurationAn unmodifiable map of user preferences stored for this gadget.- Specified by:
getUserPrefsin interfacePortletConfiguration- Returns:
- map of user preferences stored for this gadget.
-
setUserPrefs
Description copied from interface:PortletConfigurationSets the userPreferences for this portletconfig.- Specified by:
setUserPrefsin interfacePortletConfiguration- Parameters:
userPrefs- A map of key value pairs
-
getColor
public com.atlassian.gadgets.dashboard.Color getColor()Description copied from interface:PortletConfigurationReturns the color to use when rendering the Chrome of this gadget.- Specified by:
getColorin interfacePortletConfiguration- 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:PortletConfigurationSet the color of the chrome for a gadget.- Specified by:
setColorin interfacePortletConfiguration- Parameters:
color- the color of the chrome for a gadget.
-
getCompleteModuleKey
public io.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey> getCompleteModuleKey()Description copied from interface:PortletConfigurationReturn optional module key which identifies dashboard items which are described in atlassian-plugin.xml.- Specified by:
getCompleteModuleKeyin interfacePortletConfiguration- Returns:
- optional complete module key
-
getOpenSocialSpecUri
Description copied from interface:PortletConfigurationReturns optional URI pointing to the OpenSocial gadget XML specification. It returns an emptyOptionfor dashboard item without replacement uri.- Specified by:
getOpenSocialSpecUriin interfacePortletConfiguration- Returns:
- optional URI pointing to the Gadget XML
-
compareTo
- Specified by:
compareToin interfaceComparable<PortletConfiguration>
-
toString
-