Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.owasp.appsensor.reporting;
  
  
  import javax.inject.Named;
  import  javax.ws.rs.GET;
  import  javax.ws.rs.Path;
  import  javax.ws.rs.Produces;
 import  javax.ws.rs.QueryParam;
 import  javax.ws.rs.container.ContainerRequestContext;
 import  javax.ws.rs.core.Context;
 import  javax.ws.rs.core.MediaType;
 
This is the restful endpoint that handles reporting requests on the server-side. This simple RESTful implementation queries the appropriate *Store implementations for matching entities.

Author(s):
John Melton (jtmelton@gmail.com) http://www.jtmelton.com/
Raphaƫl Taban
 
 @Path("/api/v1.0/reports")
 @Produces(MediaType.APPLICATION_JSON)
 public class RestReportingEngine implements ReportingEngine {
 
 	
 	
 	@Context
 	private ContainerRequestContext requestContext;

 
 	public void onAdd(Event event) { }

 
 	public void onAdd(Attack attack) { }

 
 	public void onAdd(Response response) { }

 
 	@GET
 	@Path("/events")
 	public Collection<EventfindEvents(@QueryParam("earliest"String earliestthrows NotAuthorizedException {
 		
 		SearchCriteria criteria = new SearchCriteria().setEarliest(earliest);
 		
 	}

 
 	@GET
 	@Path("/attacks")
 	public Collection<AttackfindAttacks(@QueryParam("earliest"String earliest) {
 		
 		SearchCriteria criteria = new SearchCriteria().setEarliest(earliest);
 		
 	}

 
 	@GET
 	@Path("/responses")
	public Collection<ResponsefindResponses(@QueryParam("earliest"String earliest) {
		SearchCriteria criteria = new SearchCriteria().setEarliest(earliest);
	}
New to GrepCode? Check out our FAQ X