org.qi4j.library.eventsourcing.application.source.helper
Class ApplicationEventParameters

java.lang.Object
  extended by org.qi4j.library.eventsourcing.application.source.helper.ApplicationEventParameters

public class ApplicationEventParameters
extends Object

Utility class to pick out parameters by name or index as strings from a ApplicationEvent


Constructor Summary
ApplicationEventParameters()
           
 
Method Summary
static String getParameter(ApplicationEvent event, int idx)
          Get parameter with given index.
static String getParameter(ApplicationEvent event, String name)
          Get the named parameter from an event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationEventParameters

public ApplicationEventParameters()
Method Detail

getParameter

public static String getParameter(ApplicationEvent event,
                                  String name)
Get the named parameter from an event.

Parameters:
event - event with parameters
name - name of parameter
Returns:
the parameter with the given name or null

getParameter

public static String getParameter(ApplicationEvent event,
                                  int idx)
Get parameter with given index.

Parameters:
event - event with parameters
idx - index of parameter
Returns:
the parameter with the given index or null
Throws:
JSONException