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(com.atlassian.gadgets.view.RenderedGadgetUriBuilder renderedGadgetUriBuilder, DashboardUrlBuilder dashboardUrlBuilder)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepresentationFactoryImpl

public RepresentationFactoryImpl(com.atlassian.gadgets.view.RenderedGadgetUriBuilder renderedGadgetUriBuilder,
                                 DashboardUrlBuilder dashboardUrlBuilder)
Method Detail

createDashboardRepresentation

public DashboardRepresentation createDashboardRepresentation(Dashboard dashboard,
                                                             com.atlassian.gadgets.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(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
                                                       Gadget gadget,
                                                       com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
                                                       boolean writable,
                                                       com.atlassian.gadgets.dashboard.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 © 2012 Atlassian. All Rights Reserved.