Package com.atlassian.jira.portal
Class OfbizPortletConfigurationStore
java.lang.Object
com.atlassian.jira.portal.OfbizPortletConfigurationStore
- All Implemented Interfaces:
PortletConfigurationStore
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOfbizPortletConfigurationStore
(OfBizDelegator delegator, JsonEntityPropertyManager jsonEntityPropertyManager) -
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 newPortletConfiguration
to given PortalPage.addGadget
(Long pageId, Long portletConfigurationId, Integer column, Integer row, URI gadgetXml, com.atlassian.gadgets.dashboard.Color color, Map<String, String> userPreferences) Creates and adds a newPortletConfiguration
to given PortalPage.void
Deletes the givenPortletConfiguration
.Returns an iterable over all PortletConfigurations available in the database.getByPortalPage
(Long portalPageId) Get allPortletConfiguration
objects for a givenPortalPage
id.getByPortletId
(Long portletId) Gall aPortletConfiguration
by its id.protected void
removePropertySet
(org.ofbiz.core.entity.GenericValue gv) void
Saves the givenPortletConfiguration
.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.
-
Field Details
-
TABLE
- See Also:
-
USER_PREFERENCES_TABLE
- See Also:
-
-
Constructor Details
-
OfbizPortletConfigurationStore
public OfbizPortletConfigurationStore(OfBizDelegator delegator, JsonEntityPropertyManager jsonEntityPropertyManager)
-
-
Method Details
-
getByPortalPage
Description copied from interface:PortletConfigurationStore
Get allPortletConfiguration
objects for a givenPortalPage
id.- Specified by:
getByPortalPage
in interfacePortletConfigurationStore
- Parameters:
portalPageId
- The id of the page to retreive all configurations for.- Returns:
- The configurations associated with the given page.
-
getByPortletId
Description copied from interface:PortletConfigurationStore
Gall aPortletConfiguration
by its id.- Specified by:
getByPortletId
in interfacePortletConfigurationStore
- Parameters:
portletId
- The id of the portlet configuration.- Returns:
- The configuration of the given id or null.
-
delete
Description copied from interface:PortletConfigurationStore
Deletes the givenPortletConfiguration
.- Specified by:
delete
in interfacePortletConfigurationStore
- Parameters:
pc
- The PortletConfiguration to delete.
-
updateGadgetPosition
Description copied from interface:PortletConfigurationStore
Given a gadget, this method will update it's row, column and parent dashboard id.- Specified by:
updateGadgetPosition
in interfacePortletConfigurationStore
- 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
Description copied from interface:PortletConfigurationStore
Given a gadget, this method will update the color value for this gadget.- Specified by:
updateGadgetColor
in interfacePortletConfigurationStore
- Parameters:
gadgetId
- The id of the gadget being updatedcolor
- The new color value for this gadget
-
updateUserPrefs
Description copied from interface:PortletConfigurationStore
Given a gadget, this method updates all userprefs for this gadget.- Specified by:
updateUserPrefs
in interfacePortletConfigurationStore
- Parameters:
gadgetId
- The id of the gadget being updateduserPrefs
- The new userprefs to set for this gadget.
-
store
Description copied from interface:PortletConfigurationStore
Saves the givenPortletConfiguration
.- Specified by:
store
in interfacePortletConfigurationStore
- Parameters:
pc
- The PortletConfiguration to save.
-
addGadget
public PortletConfiguration addGadget(Long pageId, 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 newPortletConfiguration
to given PortalPage. This should be used to add a gadget.- Specified by:
addGadget
in interfacePortletConfigurationStore
- 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
PortletConfigurationStore.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
public 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) Description copied from interface:PortletConfigurationStore
Creates and adds a newPortletConfiguration
to given PortalPage. This should be used to add a gadget.- Specified by:
addDashboardItem
in interfacePortletConfigurationStore
- 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.
-
getAllPortletConfigurations
Description copied from interface:PortletConfigurationStore
Returns an iterable over all PortletConfigurations available in the database.- Specified by:
getAllPortletConfigurations
in interfacePortletConfigurationStore
- Returns:
- iterable over all PortletConfigurations available in the database
-
removePropertySet
protected void removePropertySet(org.ofbiz.core.entity.GenericValue gv)
-