com.atlassian.jira.portal
Class OfbizPortletConfigurationStore

java.lang.Object
  extended by com.atlassian.jira.portal.OfbizPortletConfigurationStore
All Implemented Interfaces:
PortletConfigurationStore

public class OfbizPortletConfigurationStore
extends Object
implements PortletConfigurationStore


Nested Class Summary
static class OfbizPortletConfigurationStore.Columns
           
static class OfbizPortletConfigurationStore.UserPreferenceColumns
           
 
Field Summary
static String TABLE
           
static String USER_PREFERENCES_TABLE
           
 
Constructor Summary
OfbizPortletConfigurationStore(OfBizDelegator delegator)
           
 
Method Summary
 PortletConfiguration addGadget(Long portalPageId, Long portletConfigurationId, Integer column, Integer row, URI gadgetXml, com.atlassian.gadgets.dashboard.Color color, Map<String,String> userPreferences)
          Creates and adds a new PortletConfiguration to given PortalPage.
 void delete(PortletConfiguration pc)
          Deletes the given PortletConfiguration.
 EnclosedIterable<PortletConfiguration> getAllPortletConfigurations()
          Returns an iterable over all PortletConfigurations available in the database.
 List<PortletConfiguration> getByPortalPage(Long portalPageId)
          Get all PortletConfiguration objects for a given PortalPage id.
 PortletConfiguration getByPortletId(Long portletId)
          Gall a PortletConfiguration by its id.
 void store(PortletConfiguration pc)
          Saves the given PortletConfiguration.
 void updateGadgetColor(Long gadgetId, com.atlassian.gadgets.dashboard.Color color)
          Given a gadget, this method will update the color value for this gadget.
 void updateGadgetPosition(Long gadgetId, int row, int column, Long dashboardId)
          Given a gadget, this method will update it's row, column and parent dashboard id.
 void updateUserPrefs(Long gadgetId, Map<String,String> userPrefs)
          Given a gadget, this method updates all userprefs for this gadget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE

public static final String TABLE
See Also:
Constant Field Values

USER_PREFERENCES_TABLE

public static final String USER_PREFERENCES_TABLE
See Also:
Constant Field Values
Constructor Detail

OfbizPortletConfigurationStore

public OfbizPortletConfigurationStore(OfBizDelegator delegator)
Method Detail

getByPortalPage

public List<PortletConfiguration> getByPortalPage(Long portalPageId)
Description copied from interface: PortletConfigurationStore
Get all PortletConfiguration objects for a given PortalPage id.

Specified by:
getByPortalPage in interface PortletConfigurationStore
Parameters:
portalPageId - The id of the page to retreive all configurations for.
Returns:
The configurations associated with the given page.

getByPortletId

public PortletConfiguration getByPortletId(Long portletId)
Description copied from interface: PortletConfigurationStore
Gall a PortletConfiguration by its id.

Specified by:
getByPortletId in interface PortletConfigurationStore
Parameters:
portletId - The id of the portlet configuration
Returns:
The configuration of the given id.

delete

public void delete(PortletConfiguration pc)
Description copied from interface: PortletConfigurationStore
Deletes the given PortletConfiguration.

Specified by:
delete in interface PortletConfigurationStore
Parameters:
pc - The PortletConfiguration to delete.

updateGadgetPosition

public void updateGadgetPosition(Long gadgetId,
                                 int row,
                                 int column,
                                 Long dashboardId)
Description copied from interface: PortletConfigurationStore
Given a gadget, this method will update it's row, column and parent dashboard id.

Specified by:
updateGadgetPosition in interface PortletConfigurationStore
Parameters:
gadgetId - The id of the gadget being updated
row - The new row value for this gadget
column - The new column value for this gadget
dashboardId - The new parent dashboard id value for this gadget

updateGadgetColor

public void updateGadgetColor(Long gadgetId,
                              com.atlassian.gadgets.dashboard.Color color)
Description copied from interface: PortletConfigurationStore
Given a gadget, this method will update the color value for this gadget.

Specified by:
updateGadgetColor in interface PortletConfigurationStore
Parameters:
gadgetId - The id of the gadget being updated
color - The new color value for this gadget

updateUserPrefs

public void updateUserPrefs(Long gadgetId,
                            Map<String,String> userPrefs)
Description copied from interface: PortletConfigurationStore
Given a gadget, this method updates all userprefs for this gadget.

Specified by:
updateUserPrefs in interface PortletConfigurationStore
Parameters:
gadgetId - The id of the gadget being updated
userPrefs - The new userprefs to set for this gadget.

store

public void store(PortletConfiguration pc)
Description copied from interface: PortletConfigurationStore
Saves the given PortletConfiguration.

Specified by:
store in interface PortletConfigurationStore
Parameters:
pc - The PortletConfiguration to save.

addGadget

public PortletConfiguration addGadget(Long portalPageId,
                                      Long portletConfigurationId,
                                      Integer column,
                                      Integer row,
                                      URI gadgetXml,
                                      com.atlassian.gadgets.dashboard.Color color,
                                      Map<String,String> userPreferences)
Description copied from interface: PortletConfigurationStore
Creates and adds a new PortletConfiguration to given PortalPage. This should be used to add a gadget.

Specified by:
addGadget in interface PortletConfigurationStore
Parameters:
portalPageId - The id of the page to add the configuration to.
portletConfigurationId - The id to use for adding the gadget. This will correspond to JiraGadgetStateFactory.createGadgetState(java.net.URI). May be null for a generated id.
column - The column position of the portlet.
row - The row position of the portlet
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 PortletConfiguration with the id set.

getAllPortletConfigurations

public EnclosedIterable<PortletConfiguration> getAllPortletConfigurations()
Description copied from interface: PortletConfigurationStore
Returns an iterable over all PortletConfigurations available in the database.

Specified by:
getAllPortletConfigurations in interface PortletConfigurationStore
Returns:
iterable over all PortletConfigurations available in the database


Copyright © 2002-2014 Atlassian. All Rights Reserved.