org.ucmtwine.parameter
Class ParameterMarshaller

java.lang.Object
  extended by org.ucmtwine.parameter.ParameterMarshaller

public class ParameterMarshaller
extends Object

Handles the binder parameters and type coercion for service and idoc methods including parameter injection of context and user data when needed.

Author:
tim

Field Summary
static int EXTRA_FUNC_DEF_VALUES
          The function def table stores each param type plus the function index, the param count and return type
 
Constructor Summary
ParameterMarshaller()
           
ParameterMarshaller(Method method)
           
 
Method Summary
 int[] getFunctionDefinitionArray(int functionOffset, int maxParams, int returnType)
          Return the m_functionDefinition compatible array.
 int getParameterCount(boolean includeInjected)
           
 List<IParameter> getParameters()
           
 Class<?>[] getTypeArray()
          Returns an array of types for use with reflection method.invoke().
 Object[] getValueArray(Object[] arguments, intradoc.server.Service service)
          Returns an array of values given an array of script arguments for use with the reflection method.invoke(), injecting known service/user/context data.
 Object[] getValueArray(intradoc.server.Service service)
          Returns an array of values for use with the reflection method.invoke(), injecting known service/user/context data.
 Object[] getValueArray(intradoc.data.Workspace ws, intradoc.data.DataBinder binder, intradoc.common.ExecutionContext ctx)
          Returns an array of values given a filter execution context
 void setParameters(List<IParameter> parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTRA_FUNC_DEF_VALUES

public static final int EXTRA_FUNC_DEF_VALUES
The function def table stores each param type plus the function index, the param count and return type

See Also:
Constant Field Values
Constructor Detail

ParameterMarshaller

public ParameterMarshaller()

ParameterMarshaller

public ParameterMarshaller(Method method)
                    throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

getParameters

public List<IParameter> getParameters()

setParameters

public void setParameters(List<IParameter> parameters)

getTypeArray

public Class<?>[] getTypeArray()
Returns an array of types for use with reflection method.invoke().

Returns:

getParameterCount

public int getParameterCount(boolean includeInjected)
Parameters:
includeInjected -
Returns:

getFunctionDefinitionArray

public int[] getFunctionDefinitionArray(int functionOffset,
                                        int maxParams,
                                        int returnType)
Return the m_functionDefinition compatible array.

Parameters:
maxParams -
Returns:

getValueArray

public Object[] getValueArray(Object[] arguments,
                              intradoc.server.Service service)
Returns an array of values given an array of script arguments for use with the reflection method.invoke(), injecting known service/user/context data.

Returns:
Throws:
IllegalAccessException

getValueArray

public Object[] getValueArray(intradoc.data.Workspace ws,
                              intradoc.data.DataBinder binder,
                              intradoc.common.ExecutionContext ctx)
Returns an array of values given a filter execution context

Parameters:
ws - The system workspace
binder - The current binder
ctx - The current execution context
Returns:

getValueArray

public Object[] getValueArray(intradoc.server.Service service)
Returns an array of values for use with the reflection method.invoke(), injecting known service/user/context data.

Returns:
Throws:
IllegalAccessException


Copyright © 2012. All Rights Reserved.