edu.ntnu.cikmr.services.resources
Class ResourceMethod

java.lang.Object
  extended by edu.ntnu.cikmr.services.resources.ResourceMethod

public class ResourceMethod
extends java.lang.Object


Field Summary
protected  Resource resource
           
 
Constructor Summary
ResourceMethod()
           
 
Method Summary
 void addParameter(java.lang.String type)
           
 void addParameter(java.lang.String type, int index)
           
static ResourceMethod fromXML(org.w3c.dom.Node methodNode)
           
 java.lang.String getMethodName()
           
 java.lang.String[] getParameters()
           
 java.lang.String getReturnType()
           
 InvocationResult invokeMethod(java.lang.Object[] parameters)
           
 void removeParameter(int index)
           
 void setMethodName(java.lang.String name)
           
 void setReturnType(java.lang.String returnType)
           
static java.lang.String toXML(ResourceMethod method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

protected Resource resource
Constructor Detail

ResourceMethod

public ResourceMethod()
Method Detail

setMethodName

public void setMethodName(java.lang.String name)

getMethodName

public java.lang.String getMethodName()

addParameter

public void addParameter(java.lang.String type)

addParameter

public void addParameter(java.lang.String type,
                         int index)

removeParameter

public void removeParameter(int index)

getParameters

public java.lang.String[] getParameters()

setReturnType

public void setReturnType(java.lang.String returnType)

getReturnType

public java.lang.String getReturnType()

fromXML

public static ResourceMethod fromXML(org.w3c.dom.Node methodNode)
                              throws java.text.ParseException
Throws:
java.text.ParseException

toXML

public static java.lang.String toXML(ResourceMethod method)

invokeMethod

public InvocationResult invokeMethod(java.lang.Object[] parameters)
                              throws java.lang.reflect.InvocationTargetException
Throws:
java.lang.reflect.InvocationTargetException