com.atlassian.gadgets.dashboard.internal.rest.representations
Class RepresentationFactoryImpl

java.lang.Object
  extended by com.atlassian.gadgets.dashboard.internal.rest.representations.RepresentationFactoryImpl
All Implemented Interfaces:
RepresentationFactory

public class RepresentationFactoryImpl
extends Object
implements RepresentationFactory


Constructor Summary
RepresentationFactoryImpl(RenderedGadgetUriBuilder renderedGadgetUriBuilder, DashboardUrlBuilder dashboardUrlBuilder)
           
 
Method Summary
 DashboardRepresentation createDashboardRepresentation(Dashboard dashboard, GadgetRequestContext gadgetRequestContext, boolean writable)
          Given a Dashboard, this creates a new JAXB dashboard representation.
 GadgetRepresentation createGadgetRepresentation(DashboardId dashboardId, Gadget gadget, GadgetRequestContext gadgetRequestContext, boolean writable, DashboardState.ColumnIndex column)
          Given a Gadget, this creates a new JAXB gadget representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepresentationFactoryImpl

public RepresentationFactoryImpl(RenderedGadgetUriBuilder renderedGadgetUriBuilder,
                                 DashboardUrlBuilder dashboardUrlBuilder)
Method Detail

createDashboardRepresentation

public DashboardRepresentation createDashboardRepresentation(Dashboard dashboard,
                                                             GadgetRequestContext gadgetRequestContext,
                                                             boolean writable)
Description copied from interface: RepresentationFactory
Given a Dashboard, this creates a new JAXB dashboard representation.

Specified by:
createDashboardRepresentation in interface RepresentationFactory
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

public GadgetRepresentation createGadgetRepresentation(DashboardId dashboardId,
                                                       Gadget gadget,
                                                       GadgetRequestContext gadgetRequestContext,
                                                       boolean writable,
                                                       DashboardState.ColumnIndex column)
Description copied from interface: RepresentationFactory
Given a Gadget, this creates a new JAXB gadget representation

Specified by:
createGadgetRepresentation in interface RepresentationFactory
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 © 2010 Atlassian. All Rights Reserved.