Package com.atlassian.jira.portal
Interface PortletConfigurationStore
- All Known Subinterfaces:
FlushablePortletConfigurationStore
- All Known Implementing Classes:
CachingPortletConfigurationStore,OfbizPortletConfigurationStore
public interface PortletConfigurationStore
Store for the
PortletConfiguration domain object.-
Method Summary
Modifier and TypeMethodDescriptionaddDashboardItem(Long pageId, Long portletConfigurationId, Integer column, Integer row, io.atlassian.fugue.Option<URI> openSocialSpecUri, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPreferences, io.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey> moduleKey) Creates and adds a newPortletConfigurationto given PortalPage.addGadget(Long pageId, Long portletConfigurationId, Integer column, Integer row, URI gadgetXml, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPreferences) Deprecated.voidDeletes the givenPortletConfiguration.Returns an iterable over all PortletConfigurations available in the database.getByPortalPage(Long portalPageId) Get allPortletConfigurationobjects for a givenPortalPageid.getByPortletId(Long portletId) Gall aPortletConfigurationby its id.voidSaves the givenPortletConfiguration.voidupdateGadgetColor(Long gadgetId, com.atlassian.gadgets.dashboard.Color color) Given a gadget, this method will update the color value for this gadget.voidupdateGadgetPosition(Long gadgetId, int row, int column, Long dashboardId) Given a gadget, this method will update it's row, column and parent dashboard id.voidupdateUserPrefs(Long gadgetId, Map<String, String> userPrefs) Given a gadget, this method updates all userprefs for this gadget.
-
Method Details
-
getByPortalPage
Get allPortletConfigurationobjects for a givenPortalPageid.- Parameters:
portalPageId- The id of the page to retreive all configurations for.- Returns:
- The configurations associated with the given page.
-
getByPortletId
Gall aPortletConfigurationby its id.- Parameters:
portletId- The id of the portlet configuration.- Returns:
- The configuration of the given id or null.
-
delete
Deletes the givenPortletConfiguration.- Parameters:
pc- The PortletConfiguration to delete.
-
store
Saves the givenPortletConfiguration.- Parameters:
pc- The PortletConfiguration to save.
-
updateGadgetPosition
Given a gadget, this method will update it's row, column and parent dashboard id.- Parameters:
gadgetId- The id of the gadget being updatedrow- The new row value for this gadgetcolumn- The new column value for this gadgetdashboardId- The new parent dashboard id value for this gadget
-
updateGadgetColor
Given a gadget, this method will update the color value for this gadget.- Parameters:
gadgetId- The id of the gadget being updatedcolor- The new color value for this gadget
-
updateUserPrefs
Given a gadget, this method updates all userprefs for this gadget.- Parameters:
gadgetId- The id of the gadget being updateduserPrefs- The new userprefs to set for this gadget.
-
addGadget
@Deprecated PortletConfiguration addGadget(Long pageId, Long portletConfigurationId, Integer column, Integer row, URI gadgetXml, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPreferences) Deprecated.Creates and adds a newPortletConfigurationto given PortalPage. This should be used to add a gadget.- Parameters:
pageId- The id of the page to add the configuration to.portletConfigurationId- The id to use for adding the gadget. May be null for a generated id.column- The column position of the portlet.row- The row position of the portletgadgetXml- 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.
deprecated Use
addDashboardItem(Long, Long, Integer, Integer, io.atlassian.fugue.Option, com.atlassian.gadgets.dashboard.Color, java.util.Map, io.atlassian.fugue.Option)instead. Since v6.4
-
addDashboardItem
PortletConfiguration addDashboardItem(Long pageId, Long portletConfigurationId, Integer column, Integer row, io.atlassian.fugue.Option<URI> openSocialSpecUri, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPreferences, io.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey> moduleKey) Creates and adds a newPortletConfigurationto given PortalPage. This should be used to add a gadget.- Parameters:
pageId- The id of the page to add the configuration to.portletConfigurationId- The id to use for adding the gadget. May be null for a generated id.column- The column position of the portlet.row- The row position of the portletopenSocialSpecUri- A URI specifying the location of the gadget XML. May be an empty option if this is a legacy portlet or dashboard item without uri replacement.color- The chrome color for the gadget.userPreferences- A map of key -> value user preference pairs used to store gadget configuration.moduleKey- A complete module key of dashboard items.- Returns:
- The new PortletConfiguration with the id set.
- Since:
- 6.4
-
getAllPortletConfigurations
EnclosedIterable<PortletConfiguration> getAllPortletConfigurations()Returns an iterable over all PortletConfigurations available in the database.- Returns:
- iterable over all PortletConfigurations available in the database
-