org.hackystat.sensorbase.resource.projects
Class UserProjectSensorDataResource

java.lang.Object
  extended by org.restlet.Handler
      extended by org.restlet.resource.Resource
          extended by org.hackystat.sensorbase.resource.sensorbase.SensorBaseResource
              extended by org.hackystat.sensorbase.resource.projects.UserProjectSensorDataResource

public class UserProjectSensorDataResource
extends SensorBaseResource

The resource for processing GET host/projects/{user}/{projectname}/sensordata. Returns an index to the SensorData resources associated with this Project. This includes all of the SensorData from all members that matches the UriPattern. Note that this could be quite large if you do not also specify a start and end time.

Author:
Philip Johnson

Field Summary
 
Fields inherited from class org.hackystat.sensorbase.resource.sensorbase.SensorBaseResource
authUser, project, projectManager, projectName, responseMsg, sdtManager, sensorDataManager, server, uriUser, user, userManager
 
Constructor Summary
UserProjectSensorDataResource(org.restlet.Context context, org.restlet.data.Request request, org.restlet.data.Response response)
          Provides the following representational variants: TEXT_XML.
 
Method Summary
 org.restlet.resource.Representation represent(org.restlet.resource.Variant variant)
          Returns a SensorDataIndex of all SensorData associated with this Project.
 
Methods inherited from class org.hackystat.sensorbase.resource.sensorbase.SensorBaseResource
getStringRepresentation, setStatusBadTimestamp, setStatusInternalError, setStatusMiscError, validateAuthUserIsAdmin, validateAuthUserIsAdminOrUriUser, validateProjectOwner, validateProjectViewer, validateUriProjectName, validateUriUserIsUser
 
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

UserProjectSensorDataResource

public UserProjectSensorDataResource(org.restlet.Context context,
                                     org.restlet.data.Request request,
                                     org.restlet.data.Response response)
Provides the following representational variants: TEXT_XML.

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 a SensorDataIndex of all SensorData associated with this Project. This includes all SensorData from all Members in this project over the (optional) specified time period for the (optional) SDT and (optional) tool that match at least one of the UriPatterns in the project definition. Returns an error condition if:

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