|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.portal.OfbizPortletConfigurationStore
public class OfbizPortletConfigurationStore
| 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,
JiraPropertySetFactory propertySetFactory,
PortletAccessManager portletAccessManager)
|
|
| Method Summary | |
|---|---|
PortletConfiguration |
add(Long portalPageId,
String portletKey,
Integer column,
Integer row)
Creates and adds a new PortletConfiguration to given PortalPage |
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. |
PortletConfiguration |
addLegacyGadget(Long portalPageId,
Long portletConfigurationId,
Integer column,
Integer row,
URI gadgetXml,
com.atlassian.gadgets.dashboard.Color color,
Map<String,String> userPreferences,
String portletKey)
Creates and adds a new PortletConfiguration to given PortalPage. |
void |
delete(PortletConfiguration pc)
Deletes the given PortletConfiguration. |
Set<PortletConfiguration> |
deleteByProject(Project project)
Removes all the portlet configurations for a project on any portal page. |
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 |
|---|
public static final String TABLE
public static final String USER_PREFERENCES_TABLE
| Constructor Detail |
|---|
public OfbizPortletConfigurationStore(OfBizDelegator delegator,
JiraPropertySetFactory propertySetFactory,
PortletAccessManager portletAccessManager)
| Method Detail |
|---|
public List<PortletConfiguration> getByPortalPage(Long portalPageId)
PortletConfigurationStorePortletConfiguration objects for a given PortalPage id.
getByPortalPage in interface PortletConfigurationStoreportalPageId - The id of the page to retreive all configurations for.
public Set<PortletConfiguration> deleteByProject(Project project)
PortletConfigurationStore
deleteByProject in interface PortletConfigurationStoreproject - The project whose portlets will be deleted
public PortletConfiguration getByPortletId(Long portletId)
PortletConfigurationStorePortletConfiguration by its id.
getByPortletId in interface PortletConfigurationStoreportletId - The id of the portlet configuration
public void delete(PortletConfiguration pc)
PortletConfigurationStorePortletConfiguration.
delete in interface PortletConfigurationStorepc - The PortletConfiguration to delete.
public void updateGadgetPosition(Long gadgetId,
int row,
int column,
Long dashboardId)
PortletConfigurationStore
updateGadgetPosition in interface PortletConfigurationStoregadgetId - 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
public void updateGadgetColor(Long gadgetId,
com.atlassian.gadgets.dashboard.Color color)
PortletConfigurationStore
updateGadgetColor in interface PortletConfigurationStoregadgetId - The id of the gadget being updatedcolor - The new color value for this gadget
public void updateUserPrefs(Long gadgetId,
Map<String,String> userPrefs)
PortletConfigurationStore
updateUserPrefs in interface PortletConfigurationStoregadgetId - The id of the gadget being updateduserPrefs - The new userprefs to set for this gadget.public void store(PortletConfiguration pc)
PortletConfigurationStorePortletConfiguration.
store in interface PortletConfigurationStorepc - The PortletConfiguration to save.
public PortletConfiguration add(Long portalPageId,
String portletKey,
Integer column,
Integer row)
PortletConfigurationStorePortletConfiguration to given PortalPage
add in interface PortletConfigurationStoreportalPageId - The id of the page to add the configuration to.portletKey - The key of the portlet.column - The column position of the portlet.row - The row position of the portlet
public PortletConfiguration addGadget(Long portalPageId,
Long portletConfigurationId,
Integer column,
Integer row,
URI gadgetXml,
com.atlassian.gadgets.dashboard.Color color,
Map<String,String> userPreferences)
PortletConfigurationStorePortletConfiguration to given PortalPage. This should
be used to add a gadget.
addGadget in interface PortletConfigurationStoreportalPageId - 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 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.
public PortletConfiguration addLegacyGadget(Long portalPageId,
Long portletConfigurationId,
Integer column,
Integer row,
URI gadgetXml,
com.atlassian.gadgets.dashboard.Color color,
Map<String,String> userPreferences,
String portletKey)
PortletConfigurationStorePortletConfiguration to given PortalPage. This should
be used to add a legacy gadget only!
addLegacyGadget in interface PortletConfigurationStoreportalPageId - 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 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.portletKey - The portletKey of the old portlet.
public EnclosedIterable<PortletConfiguration> getAllPortletConfigurations()
PortletConfigurationStore
getAllPortletConfigurations in interface PortletConfigurationStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||