org.ow2.jasmine.probe.rest.impl
Class JIndicators

java.lang.Object
  extended by org.ow2.jasmine.probe.rest.impl.JIndicators
All Implemented Interfaces:
Indicators

public class JIndicators
extends Object
implements Indicators


Field Summary
 
Fields inherited from interface org.ow2.jasmine.probe.rest.Indicators
RESOURCE_NAME
 
Constructor Summary
JIndicators(JasmineProbeManager jpManager)
           
 
Method Summary
 javax.ws.rs.core.Response changeIndicator(IndicatorBaseType indicatorDef, String name)
          Process HTTP PUT requests having /indicator/{name} URI and new indicator definition in its body.
 javax.ws.rs.core.Response createIndicator(IndicatorBaseType indicatorDef)
          Process HTTP POST requests having /indicator URI and new indicator definition in its body.
 javax.ws.rs.core.Response deleteIndicator(String name)
          Process HTTP DELETE requests having /indicator/{name} URI Corresponds to indicator-remove name
 javax.ws.rs.core.Response getIndicator(String name, javax.ws.rs.core.UriInfo ui)
          Process HTTP GET requests having /indicator/{name} URI Correspond to indicator-list -n name
 javax.ws.rs.core.Response getIndicators(String type, boolean verbose, javax.ws.rs.core.UriInfo ui)
          Process HTTP GET requests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JIndicators

public JIndicators(JasmineProbeManager jpManager)
Method Detail

getIndicators

public javax.ws.rs.core.Response getIndicators(String type,
                                               boolean verbose,
                                               javax.ws.rs.core.UriInfo ui)
Process HTTP GET requests. Possible URIs are: /indicator that corresponds to 'indicator-list' command or /indicator?type={typeName} that corresponds to 'indicator-list -t typeName' command or /indicator?verbose="true" that corresponds to 'indicator-list -v' command

Specified by:
getIndicators in interface Indicators
Returns:
response containing the existent indicators

getIndicator

public javax.ws.rs.core.Response getIndicator(String name,
                                              javax.ws.rs.core.UriInfo ui)
Process HTTP GET requests having /indicator/{name} URI Correspond to indicator-list -n name

Specified by:
getIndicator in interface Indicators
Parameters:
name - indicator name
type -
Returns:
response

createIndicator

public javax.ws.rs.core.Response createIndicator(IndicatorBaseType indicatorDef)
Description copied from interface: Indicators
Process HTTP POST requests having /indicator URI and new indicator definition in its body. Corresponds to indicator-create command

Specified by:
createIndicator in interface Indicators
Parameters:
indicatorDef - new indicator definition
Returns:

changeIndicator

public javax.ws.rs.core.Response changeIndicator(IndicatorBaseType indicatorDef,
                                                 String name)
Description copied from interface: Indicators
Process HTTP PUT requests having /indicator/{name} URI and new indicator definition in its body. Corresponds to indicator-change -n name command.

Specified by:
changeIndicator in interface Indicators
Parameters:
indicatorDef - updated indicator definition
name - indicator name
Returns:
response with state OK or NOT_FOUND or BAD_REQUEST if change failed

deleteIndicator

public javax.ws.rs.core.Response deleteIndicator(String name)
Description copied from interface: Indicators
Process HTTP DELETE requests having /indicator/{name} URI Corresponds to indicator-remove name

Specified by:
deleteIndicator in interface Indicators
Parameters:
name - the name of the indicator to remove


Copyright © 2012 OW2 Consortium. All Rights Reserved.