org.hackystat.telemetry.service.resource.chart
Class ChartDataResource

java.lang.Object
  extended by org.restlet.Handler
      extended by org.restlet.resource.Resource
          extended by org.hackystat.telemetry.service.resource.telemetry.TelemetryResource
              extended by org.hackystat.telemetry.service.resource.chart.ChartDataResource

public class ChartDataResource
extends TelemetryResource

Processes GET {host}/chart/{chart}/{email}/{project}/{granularity}/{start}/{end} and GET {host}/chart/{chart}/{email}/{project}/{granularity}/{start}/{end}?params={params} requests. Requires the authenticated user to be {email} or else the Admin user for the sensorbase connected to this service.

Author:
Philip Johnson

Field Summary
 
Fields inherited from class org.hackystat.telemetry.service.resource.telemetry.TelemetryResource
authUser, badAuth, chart, dpdHost, end, granularity, params, projectName, requestStartTime, sensorBaseHost, start, telemetryServer, uriUser
 
Constructor Summary
ChartDataResource(org.restlet.Context context, org.restlet.data.Request request, org.restlet.data.Response response)
          The standard constructor.
 
Method Summary
 org.restlet.resource.Representation represent(org.restlet.resource.Variant variant)
          Returns an TelemetryChart instance representing the trend information associated with the Project data, or null if not authorized.
 
Methods inherited from class org.hackystat.telemetry.service.resource.telemetry.TelemetryResource
getDailyProjectDataClient, getSensorBaseClient, getStringRepresentation, getTelemetryDefinitions, logRequest, logRequest, setStatusError, setStatusError, setStatusInternalError
 
Methods inherited from class org.restlet.resource.Resource
acceptRepresentation, allowDelete, allowGet, allowPost, allowPut, delete, getPreferredRepresentation, getPreferredVariant, getRepresentation, getVariants, handleDelete, handleGet, handlePost, handlePut, init, isAvailable, isModifiable, isNegotiateContent, isReadable, post, put, removeRepresentations, represent, setAvailable, setModifiable, setNegotiateContent, setReadable, setVariants, storeRepresentation
 
Methods inherited from class org.restlet.Handler
allowHead, allowOptions, generateRef, getAllowedMethods, getApplication, getContext, getLogger, getMatrix, getQuery, getRequest, getResponse, handleHead, handleOptions, setContext, setRequest, setResponse, updateAllowedMethods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartDataResource

public ChartDataResource(org.restlet.Context context,
                         org.restlet.data.Request request,
                         org.restlet.data.Response response)
The standard constructor.

Parameters:
context - The context.
request - The request object.
response - The response object.
Method Detail

represent

public org.restlet.resource.Representation represent(org.restlet.resource.Variant variant)
Returns an TelemetryChart instance representing the trend information associated with the Project data, or null if not authorized.

Specified by:
represent in class TelemetryResource
Parameters:
variant - The representational variant requested.
Returns:
The representation.