|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Handler
org.restlet.resource.Resource
org.hackystat.dailyprojectdata.resource.dailyprojectdata.DailyProjectDataResource
public abstract class DailyProjectDataResource
An abstract superclass for all DailyProjectData resources that supplies common initialization processing. This includes:
Field Summary | |
---|---|
protected java.lang.String |
authUser
The authenticated user, retrieved from the ChallengeResponse, or null. |
protected java.lang.String |
badAuth
The standard error message returned from invalid authentication. |
protected java.lang.String |
project
To be retrieved from the URL as the 'project' template parameter, or null. |
protected long |
requestStartTime
Records the time at which each HTTP request was initiated. |
protected Server |
server
The server. |
protected java.lang.String |
timestamp
To be retrieved from the URL as the 'timestamp' template parameter, or null. |
protected java.lang.String |
uriString
|
protected java.lang.String |
uriUser
To be retrieved from the URL as the 'email' template parameter, or null. |
Constructor Summary | |
---|---|
DailyProjectDataResource(org.restlet.Context context,
org.restlet.data.Request request,
org.restlet.data.Response response)
Provides the following representational variants: TEXT_XML. |
Method Summary | |
---|---|
org.hackystat.sensorbase.client.SensorBaseClient |
getSensorBaseClient()
Returns a SensorBaseClient instance associated with the User in this request. |
org.restlet.resource.StringRepresentation |
getStringRepresentation(java.lang.String xmlData)
Creates and returns a new Restlet StringRepresentation built from xmlData. |
protected void |
logRequest(java.lang.String requestType)
Generates a log message indicating the type of request, the elapsed time required, the user who requested the data, and the day. |
protected void |
logRequest(java.lang.String requestType,
java.lang.String... optionalParams)
Generates a log message indicating the type of request, the elapsed time required, the user who requested the data, and the day. |
abstract org.restlet.resource.Representation |
represent(org.restlet.resource.Variant variant)
The Restlet getRepresentation method which must be overridden by all concrete Resources. |
protected void |
setStatusError(java.lang.String msg)
Called when an error resulting from an exception is caught during processing. |
protected void |
setStatusError(java.lang.String msg,
java.lang.Exception e)
Called when an error resulting from an exception is caught during processing. |
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 |
Field Detail |
---|
protected java.lang.String uriUser
protected java.lang.String project
protected java.lang.String timestamp
protected java.lang.String authUser
protected Server server
protected java.lang.String badAuth
protected long requestStartTime
protected java.lang.String uriString
Constructor Detail |
---|
public DailyProjectDataResource(org.restlet.Context context, org.restlet.data.Request request, org.restlet.data.Response response)
context
- The context.request
- The request object.response
- The response object.Method Detail |
---|
public abstract org.restlet.resource.Representation represent(org.restlet.resource.Variant variant)
represent
in class org.restlet.resource.Resource
variant
- The variant requested.
public org.restlet.resource.StringRepresentation getStringRepresentation(java.lang.String xmlData)
xmlData
- The xml data as a string.
public org.hackystat.sensorbase.client.SensorBaseClient getSensorBaseClient()
protected void logRequest(java.lang.String requestType)
requestType
- The type of DPD request, such as "Commit", "FileMetric", etc.protected void logRequest(java.lang.String requestType, java.lang.String... optionalParams)
requestType
- The type of DPD request, such as "Commit", "FileMetric", etc.optionalParams
- Any additional parameters to the request.protected void setStatusError(java.lang.String msg, java.lang.Exception e)
msg
- A description of the error.e
- A chained exception.protected void setStatusError(java.lang.String msg)
msg
- A description of the error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |