com.atlassian.gadgets.dashboard.internal
Interface Dashboard

All Known Implementing Classes:
DashboardImpl

public interface Dashboard


Method Summary
 void addGadget(DashboardState.ColumnIndex column, Gadget gadget)
           
 void addGadget(Gadget gadget)
           
 void appendGadget(DashboardState.ColumnIndex column, Gadget gadget)
          Add a gadget to the tab specified by the tabId.
 void appendGadget(Gadget gadget)
          Add a gadget to the default tab.
 void changeGadgetColor(GadgetId gadgetId, Color color)
          Change the color of the gadgets chrome.
 void changeLayout(Layout layout, GadgetLayout gadgetLayout)
          Change the layout of the dashboard and use the gadget layout to update the gadget positioning.
 void clearChanges()
          Clears the stored list of changes that have been made to this Dashboard
 Gadget findGadget(GadgetId gadgetId)
          Lookup a Gadget in this Dashboard given the gadget's id.
 List<DashboardChange> getChanges()
          Returns an immutable list of changes that have been made to this Dashboard, in the order that they occurred.
 Iterable<Gadget> getGadgetsInColumn(DashboardState.ColumnIndex column)
           
 DashboardId getId()
           
 Layout getLayout()
           
 DashboardState getState()
           
 String getTitle()
           
 void rearrangeGadgets(GadgetLayout layout)
          Rearrange and reposition the gadgets on the dashboard according to the specified layout.
 void removeGadget(GadgetId gadgetId)
          Remove the gadget with the provided id from the dashboard.
 void updateGadgetUserPrefs(GadgetId gadgetId, Map<String,String> prefValues)
          Save user prefs for a gadget
 

Method Detail

getId

DashboardId getId()

getTitle

String getTitle()

getLayout

Layout getLayout()

getGadgetsInColumn

Iterable<Gadget> getGadgetsInColumn(DashboardState.ColumnIndex column)

getState

DashboardState getState()

findGadget

Gadget findGadget(GadgetId gadgetId)
Lookup a Gadget in this Dashboard given the gadget's id.

Parameters:
gadgetId - The gadgetId of the gadget to lookup
Returns:
The Gadget or null if none could be found matching the id

getChanges

List<DashboardChange> getChanges()
Returns an immutable list of changes that have been made to this Dashboard, in the order that they occurred.

Returns:
immutable list of changes that have been made to this Dashboard

clearChanges

void clearChanges()
Clears the stored list of changes that have been made to this Dashboard


appendGadget

void appendGadget(Gadget gadget)
Add a gadget to the default tab. Let the dashboard pick which column it should go in.

Parameters:
gadget - the gadget being added

addGadget

void addGadget(Gadget gadget)

appendGadget

void appendGadget(DashboardState.ColumnIndex column,
                  Gadget gadget)
Add a gadget to the tab specified by the tabId. Let the dashboard pick which column it should go in.

Parameters:
column - index of column to append the gadget to.
gadget - the gadget being added

addGadget

void addGadget(DashboardState.ColumnIndex column,
               Gadget gadget)

removeGadget

void removeGadget(GadgetId gadgetId)
Remove the gadget with the provided id from the dashboard.

Parameters:
gadgetId - id of the gadget to remove

rearrangeGadgets

void rearrangeGadgets(GadgetLayout layout)
                      throws GadgetLayoutException
Rearrange and reposition the gadgets on the dashboard according to the specified layout.

Parameters:
layout - Layout to match
Throws:
GadgetLayoutException - thrown if the layout is invalid

changeLayout

void changeLayout(Layout layout,
                  GadgetLayout gadgetLayout)
                  throws GadgetLayoutException
Change the layout of the dashboard and use the gadget layout to update the gadget positioning.

Parameters:
layout - New layout to use for the dashboard
gadgetLayout - New positioning of the gadgets
Throws:
GadgetLayoutException - thrown if the positioning of the gadgets is not valid for the new layout - e.g. threre are gadgets in columns that don't exist in the new layout

changeGadgetColor

void changeGadgetColor(GadgetId gadgetId,
                       Color color)
                       throws GadgetNotFoundException,
                              GadgetNotLoadedException
Change the color of the gadgets chrome.

Parameters:
gadgetId - Id of gadget to change the color of.
color - Color to change the chrome to
Throws:
GadgetNotFoundException
GadgetNotLoadedException

updateGadgetUserPrefs

void updateGadgetUserPrefs(GadgetId gadgetId,
                           Map<String,String> prefValues)
                           throws GadgetNotFoundException,
                                  GadgetNotLoadedException
Save user prefs for a gadget

Parameters:
gadgetId - Id of gadget to change the color of.
prefValues - preferences to save
Throws:
GadgetNotFoundException
GadgetNotLoadedException


Copyright © 2009 Atlassian. All Rights Reserved.