com.atlassian.gadgets.dashboard.internal.rest.representations
Interface RepresentationFactory

All Known Implementing Classes:
RepresentationFactoryImpl

public interface RepresentationFactory

Factory to construct new REST representations given the required domain objects.


Method Summary
 DashboardRepresentation createDashboardRepresentation(Dashboard dashboard, com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext, boolean writable)
          Given a Dashboard, this creates a new JAXB dashboard representation.
 GadgetRepresentation createGadgetRepresentation(com.atlassian.gadgets.dashboard.DashboardId dashboardId, Gadget gadget, com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext, boolean writable, com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex column)
          Given a Gadget, this creates a new JAXB gadget representation
 

Method Detail

createDashboardRepresentation

DashboardRepresentation createDashboardRepresentation(Dashboard dashboard,
                                                      com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
                                                      boolean writable)
Given a Dashboard, this creates a new JAXB dashboard representation.

Parameters:
dashboard - The dashboard state for the JAXB representation
gadgetRequestContext - request context
writable - If the user has permission to udpate this dashboard
Returns:
A DashboardRepresentation containing all the dashboard information, as well as all GadgetRepresentations for this dashboard

createGadgetRepresentation

GadgetRepresentation createGadgetRepresentation(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
                                                Gadget gadget,
                                                com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
                                                boolean writable,
                                                com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex column)
Given a Gadget, this creates a new JAXB gadget representation

Parameters:
dashboardId - The dashboard this gadget is on
gadget - The gadet state for the JAXB representation
gadgetRequestContext - request context
writable - If the user has permission to update this dashboard
column - The column in which this gadget resides on the dashbaord.
Returns:
A GadgetRepresentation containing all information required to render the gadget


Copyright © 2013 Atlassian. All Rights Reserved.