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 classstatic 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 newPortletConfigurationto 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 newPortletConfigurationto given PortalPage.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.protected voidremovePropertySet(org.ofbiz.core.entity.GenericValue gv) 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.
-
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:PortletConfigurationStoreGet allPortletConfigurationobjects for a givenPortalPageid.- Specified by:
getByPortalPagein 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:PortletConfigurationStoreGall aPortletConfigurationby its id.- Specified by:
getByPortletIdin interfacePortletConfigurationStore- Parameters:
portletId- The id of the portlet configuration.- Returns:
- The configuration of the given id or null.
-
delete
Description copied from interface:PortletConfigurationStoreDeletes the givenPortletConfiguration.- Specified by:
deletein interfacePortletConfigurationStore- Parameters:
pc- The PortletConfiguration to delete.
-
updateGadgetPosition
Description copied from interface:PortletConfigurationStoreGiven a gadget, this method will update it's row, column and parent dashboard id.- Specified by:
updateGadgetPositionin 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:PortletConfigurationStoreGiven a gadget, this method will update the color value for this gadget.- Specified by:
updateGadgetColorin interfacePortletConfigurationStore- Parameters:
gadgetId- The id of the gadget being updatedcolor- The new color value for this gadget
-
updateUserPrefs
Description copied from interface:PortletConfigurationStoreGiven a gadget, this method updates all userprefs for this gadget.- Specified by:
updateUserPrefsin interfacePortletConfigurationStore- Parameters:
gadgetId- The id of the gadget being updateduserPrefs- The new userprefs to set for this gadget.
-
store
Description copied from interface:PortletConfigurationStoreSaves the givenPortletConfiguration.- Specified by:
storein 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:PortletConfigurationStoreCreates and adds a newPortletConfigurationto given PortalPage. This should be used to add a gadget.- Specified by:
addGadgetin 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:PortletConfigurationStoreCreates and adds a newPortletConfigurationto given PortalPage. This should be used to add a gadget.- Specified by:
addDashboardItemin 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:PortletConfigurationStoreReturns an iterable over all PortletConfigurations available in the database.- Specified by:
getAllPortletConfigurationsin interfacePortletConfigurationStore- Returns:
- iterable over all PortletConfigurations available in the database
-
removePropertySet
protected void removePropertySet(org.ofbiz.core.entity.GenericValue gv)
-