com.atlassian.jira.portal
Class PortletConfigurationManagerImpl

java.lang.Object
  extended by com.atlassian.jira.portal.PortletConfigurationManagerImpl
All Implemented Interfaces:
PortletConfigurationManager

public class PortletConfigurationManagerImpl
extends java.lang.Object
implements PortletConfigurationManager


Constructor Summary
PortletConfigurationManagerImpl(PortletConfigurationStore portletConfigurationStore, LegacyGadgetUrlProvider legacyGadgetUrlProvider)
           
 
Method Summary
 PortletConfiguration addGadget(java.lang.Long portalPageId, java.lang.Integer column, java.lang.Integer row, java.net.URI gadgetXml, com.atlassian.gadgets.dashboard.Color color, java.util.Map<java.lang.String,java.lang.String> userPreferences)
          Create a new portlet configuration for the passed parameters.
 PortletConfiguration addLegacyPortlet(java.lang.Long pageId, java.lang.String portletKey, java.lang.Integer column, java.lang.Integer row)
          Adds a new legacy portlet to a dashboard.
 void delete(PortletConfiguration pc)
          Remove the passed portlet configuration.
 java.util.List<PortletConfiguration> getByPortalPage(java.lang.Long portalPageId)
          Get all the PortletConfiguration associated with the passed Portal Page.
 PortletConfiguration getByPortletId(java.lang.Long portletId)
          Get the passed portlet configuration.
 void store(PortletConfiguration pc)
          Update the passed portlet configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletConfigurationManagerImpl

public PortletConfigurationManagerImpl(PortletConfigurationStore portletConfigurationStore,
                                       LegacyGadgetUrlProvider legacyGadgetUrlProvider)
Method Detail

getByPortalPage

public java.util.List<PortletConfiguration> getByPortalPage(java.lang.Long portalPageId)
Description copied from interface: PortletConfigurationManager
Get all the PortletConfiguration associated with the passed Portal Page.

Specified by:
getByPortalPage in interface PortletConfigurationManager
Parameters:
portalPageId - the portal page to query.
Returns:
a list of portlet configurations on the passed page.

getByPortletId

public PortletConfiguration getByPortletId(java.lang.Long portletId)
Description copied from interface: PortletConfigurationManager
Get the passed portlet configuration.

Specified by:
getByPortletId in interface PortletConfigurationManager
Parameters:
portletId - the id of the portlet configuration to return.
Returns:
the porlet configuration identified by the passed id.

delete

public void delete(PortletConfiguration pc)
Description copied from interface: PortletConfigurationManager
Remove the passed portlet configuration.

Specified by:
delete in interface PortletConfigurationManager
Parameters:
pc - the portlet configuration to remove.

addLegacyPortlet

public PortletConfiguration addLegacyPortlet(java.lang.Long pageId,
                                             java.lang.String portletKey,
                                             java.lang.Integer column,
                                             java.lang.Integer row)
Description copied from interface: PortletConfigurationManager
Adds a new legacy portlet to a dashboard. Hopefully one day JIRA will no longer support legacy portlets and this method can be deleted.

Specified by:
addLegacyPortlet in interface PortletConfigurationManager
Parameters:
pageId - the portal page the configuration will belong to.
portletKey - the portal the configuration will be associated with.
column - the column location for the new configuration.
row - the row location for the new configuration.
Returns:
the new portlet configuration.

addGadget

public PortletConfiguration addGadget(java.lang.Long portalPageId,
                                      java.lang.Integer column,
                                      java.lang.Integer row,
                                      java.net.URI gadgetXml,
                                      com.atlassian.gadgets.dashboard.Color color,
                                      java.util.Map<java.lang.String,java.lang.String> userPreferences)
Description copied from interface: PortletConfigurationManager
Create a new portlet configuration for the passed parameters.

Specified by:
addGadget in interface PortletConfigurationManager
Parameters:
portalPageId - the portal page the configuration will belong to.
column - the column location for the new configuration.
row - the row location for the new configuration.
gadgetXml - A URI specifying the location of the gadget XML. May be null if this is a legacy portlet.
color - The chrome color for the gadget.
userPreferences - A map of key -> value user preference pairs used to store gadget configuration.
Returns:
the new portlet configuration

store

public void store(PortletConfiguration pc)
Description copied from interface: PortletConfigurationManager
Update the passed portlet configuration.

Specified by:
store in interface PortletConfigurationManager
Parameters:
pc - the portlet configuration to change.


Copyright © 2002-2010 Atlassian. All Rights Reserved.