org.sonar.api.server.ws
Class Request

java.lang.Object
  extended by org.sonar.api.server.ws.Request

public abstract class Request
extends Object

Since:
4.2

Constructor Summary
Request()
           
 
Method Summary
abstract  WebService.Action action()
           
 Boolean booleanParam(String key)
           
 boolean booleanParam(String key, boolean defaultValue)
           
 Integer intParam(String key)
           
 int intParam(String key, int defaultValue)
           
abstract  String method()
          Returns the name of the HTTP method with which this request was made.
abstract  String param(String key)
           
 String param(String key, String defaultValue)
           
 String requiredParam(String key)
          Returns value of a required parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Request

public Request()
Method Detail

action

public abstract WebService.Action action()

method

public abstract String method()
Returns the name of the HTTP method with which this request was made. Possible values are GET and POST. Others are not supported.


param

@CheckForNull
public abstract String param(String key)

requiredParam

public String requiredParam(String key)
Returns value of a required parameter

Throws:
IllegalArgumentException - is value is null or blank

param

@CheckForNull
public String param(String key,
                                 @CheckForNull
                                 String defaultValue)

intParam

@CheckForNull
public Integer intParam(String key)

intParam

public int intParam(String key,
                    int defaultValue)

booleanParam

@CheckForNull
public Boolean booleanParam(String key)

booleanParam

public boolean booleanParam(String key,
                            boolean defaultValue)


Copyright © 2009-2014 SonarSource. All Rights Reserved.