This project has retired. For details please refer to its Attic page.
LensResourceMethod (Lens 2.1.0-beta-incubating API)

org.apache.lens.server.model
Class LensResourceMethod

java.lang.Object
  extended by org.apache.lens.server.model.LensResourceMethod

public class LensResourceMethod
extends Object

Model object wrapping ResourceMethod. Adds utility methods.


Constructor Summary
LensResourceMethod()
           
 
Method Summary
 String getDefaultValueForParam(String paramName)
          Extract default value of a parameter from the parameter annotations of the handler method
 com.google.common.base.Optional<String> getMultiPurposeFormParam()
          if handler method is annotated with MultiPurposeResource, extract that and return MultiPurposeResource.formParamName()
 String name()
          className.methodname.httpmethod
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LensResourceMethod

public LensResourceMethod()
Method Detail

getMultiPurposeFormParam

public com.google.common.base.Optional<String> getMultiPurposeFormParam()
if handler method is annotated with MultiPurposeResource, extract that and return MultiPurposeResource.formParamName()

Returns:

name

public String name()
className.methodname.httpmethod

Returns:
qualified name of the handler method

getDefaultValueForParam

public String getDefaultValueForParam(String paramName)
Extract default value of a parameter from the parameter annotations of the handler method

Parameters:
paramName - value of FormDataParam annotation on the handler method. Which will be the name of the argument in the request parameters
Returns:
value of DefaultValue annotation on the handler method


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.