|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.workstate.core.EventRepository
public class EventRepository
A MetaEvent container.
An object of this class allows the management of MetaEvent instances
and the creation of events starting from these.
To create events you will need the event name to find the correct
MetaEvent to be used, and the list of the actual parameters.
These parameters can be objects compatibles with the class of the formal
parameter, or strings. Strings will be converted to the right class using a
ConversionService instance.
| Constructor Summary | |
|---|---|
EventRepository(ConversionService defaultConversionService)
Construct a new EventRepository whose default ConversionService
is passed as a parameter. |
|
| Method Summary | |
|---|---|
void |
addMetaEvent(MetaEvent newMetaEvent)
Add a MetaEvent to this repository. |
Event |
buildEvent(String name,
Map<String,Object> stringParameters)
Build a new event. |
Event |
buildEvent(String name,
Map<String,Object> stringParameters,
ConversionService customConversionService)
Build a new event given: Its name (tag) Its actual parameters A conversion service to transform string parameters to real parameters In the parameters map the keys are the parameter names while the values are the parameter values or strings that can be converted to the parameter values using the conversion service. |
boolean |
containsEvent(String name)
Check if this repository contains a MetaEvent with the given tag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventRepository(ConversionService defaultConversionService)
ConversionService
is passed as a parameter.
defaultConversionService - the default conversion service| Method Detail |
|---|
public void addMetaEvent(MetaEvent newMetaEvent)
MetaEvent to this repository. The added MetaEvent
will be referenced later using its tag. If this repository already
conatins a MetaEvent with the same tag it will be replaced.
newMetaEvent - the meta-event to be added
public Event buildEvent(String name,
Map<String,Object> stringParameters,
ConversionService customConversionService)
throws WorkflowException
name - The event name (tag)stringParameters - A map containing the event actual parameters. The keys are the
parameter names while the values are the parameter values or
strings that can be converted to the parameter values using
the conversion servicecustomConversionService - A conversion service. If null the default one will be used
MetaEvent contained in this repository null will be
returned
ClassCastException - if a parameter class is not a string and is not compatible
with the formal parameter definition
WorkflowException - if the conversion service is not able to convert a string in
the real parameter
public Event buildEvent(String name,
Map<String,Object> stringParameters)
throws WorkflowException
buildEvent(String, Map, ConversionService) but with default
conversion service.
WorkflowExceptionpublic boolean containsEvent(String name)
MetaEvent with the given tag.
name - the meta-event tag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||