org.glassfish.jersey.examples.sparklines
Class SparklinesResource

java.lang.Object
  extended by org.glassfish.jersey.examples.sparklines.SparklinesResource

@Path(value="/")
@Produces(value="image/png")
public class SparklinesResource
extends Object

Author:
Paul Sandoz

Constructor Summary
SparklinesResource(IntegerList data, Interval limits, javax.ws.rs.core.Request request, javax.ws.rs.core.UriInfo ui)
           
 
Method Summary
 javax.ws.rs.core.Response discrete(int width, int upper, ColorParam upperColor, ColorParam lowerColor)
           
 javax.ws.rs.core.Response smooth(int step, boolean hasMin, boolean hasMax, boolean hasLast, ColorParam minColor, ColorParam maxColor, ColorParam lastColor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparklinesResource

public SparklinesResource(@QueryParam(value="d")
                          IntegerList data,
                          @DefaultValue(value="0,100")@QueryParam(value="limits")
                          Interval limits,
                          @Context
                          javax.ws.rs.core.Request request,
                          @Context
                          javax.ws.rs.core.UriInfo ui)
Method Detail

discrete

@Path(value="discrete")
@GET
public javax.ws.rs.core.Response discrete(@DefaultValue(value="2")@QueryParam(value="width")
                                                   int width,
                                                   @DefaultValue(value="50")@QueryParam(value="upper")
                                                   int upper,
                                                   @DefaultValue(value="red")@QueryParam(value="upper-color")
                                                   ColorParam upperColor,
                                                   @DefaultValue(value="gray")@QueryParam(value="lower-color")
                                                   ColorParam lowerColor)

smooth

@Path(value="smooth")
@GET
public javax.ws.rs.core.Response smooth(@DefaultValue(value="2")@QueryParam(value="step")
                                                 int step,
                                                 @DefaultValue(value="true")@QueryParam(value="min-m")
                                                 boolean hasMin,
                                                 @DefaultValue(value="true")@QueryParam(value="max-m")
                                                 boolean hasMax,
                                                 @DefaultValue(value="true")@QueryParam(value="last-m")
                                                 boolean hasLast,
                                                 @DefaultValue(value="blue")@QueryParam(value="min-color")
                                                 ColorParam minColor,
                                                 @DefaultValue(value="green")@QueryParam(value="max-color")
                                                 ColorParam maxColor,
                                                 @DefaultValue(value="red")@QueryParam(value="last-color")
                                                 ColorParam lastColor)


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.