| java.lang.Object org.directwebremoting.extend.InboundContext
InboundContext | final public class InboundContext (Code) | | InboundContext is the context for set of inbound conversions.
Since a data set may be recursive parts of some data members may refer to
others so we need to keep track of who is converted for what.
author: Joe Walker [joe at getahead dot ltd dot uk] |
Inner Class :protected static class Conversion | |
Method Summary | |
public void | addConverted(InboundVariable iv, Class> type, Object bean) | public void | clearConverted() Clear the list of converted objects. | public void | createInboundVariable(int callNum, String key, String type, String value) Create an inbound variable. | public void | createInboundVariable(int callNum, String key, String type, FormField value) Create an inbound file variable. | public void | dereference() When we are sure we have finished parsing the input, we can begin to
fix all cross-references. | public Object | getConverted(InboundVariable iv, Class> type) | public TypeHintContext | getCurrentTypeHintContext() | public InboundVariable | getInboundVariable(String name) | public Iterator<String> | getInboundVariableNames() | public InboundVariable | getParameter(int callNum, int index) | public int | getParameterCount() | public int | getParameterCount(int callNum) | public void | popContext() Someone wants to tell us about a finished conversion context. | public void | pushContext(TypeHintContext context) Someone wants to tell us about a new conversion context. | public String | toString() |
addConverted | public void addConverted(InboundVariable iv, Class> type, Object bean)(Code) | | Add to the (temporary) list of converted objects
Parameters: iv - The converted object Parameters: type - The type that we converted the object to Parameters: bean - The converted version |
clearConverted | public void clearConverted()(Code) | | Clear the list of converted objects.
If the conversion attempt for a given method failed, we may want to try
another so we will need to ditch the list of converted objects because
the next method could well have different parameter types.
|
createInboundVariable | public void createInboundVariable(int callNum, String key, String type, String value)(Code) | | Create an inbound variable.
Usually called by a query parser to setup a list of known variables.
This method also checks to see if the new variable is a parameter and if
it is it updates the count of parameters
Parameters: callNum - The call number to work on Parameters: key - The name of the variable Parameters: type - The javascript type of the variable Parameters: value - The value of the variable |
createInboundVariable | public void createInboundVariable(int callNum, String key, String type, FormField value)(Code) | | Create an inbound file variable.
Usually called by a query parser to setup a list of known variables.
This method also checks to see if the new variable is a parameter and if
it is it updates the count of parameters
Parameters: callNum - The call number to work on Parameters: key - The name of the variable Parameters: type - The javascript type of the variable Parameters: value - The value of the file |
dereference | public void dereference() throws MarshallException(Code) | | When we are sure we have finished parsing the input, we can begin to
fix all cross-references.
throws: MarshallException - If cross-references don't add up |
getConverted | public Object getConverted(InboundVariable iv, Class> type)(Code) | | Check to see if the conversion has already been done
Parameters: iv - The inbound data to check Parameters: type - The type that we want the object converted to The converted data or null if it has not been converted |
getCurrentTypeHintContext | public TypeHintContext getCurrentTypeHintContext()(Code) | | The method that we are currently converting data for |
getInboundVariable | public InboundVariable getInboundVariable(String name)(Code) | | Internal method to allow entries to resolve references
Parameters: name - The name of the variable to lookup The found variable |
getInboundVariableNames | public Iterator<String> getInboundVariableNames()(Code) | | A debug method so people can get a list of all the variable names
an iterator over the known variable names |
getParameter | public InboundVariable getParameter(int callNum, int index)(Code) | | Get a parameter by index
Parameters: callNum - The call number to work on Parameters: index - The parameter index The found parameter |
getParameterCount | public int getParameterCount()(Code) | | How many parameters are there?
The parameter count |
getParameterCount | public int getParameterCount(int callNum)(Code) | | This is a bit of a hack, needed for debug purposes - it counts the
parameters (including method and script params) for a given call number
Parameters: callNum - The Call number to count the parameters of The parameter count for a given Call |
popContext | public void popContext()(Code) | | Someone wants to tell us about a finished conversion context.
|
pushContext | public void pushContext(TypeHintContext context)(Code) | | Someone wants to tell us about a new conversion context.
Parameters: context - The current conversion context |
|
|