|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.events.EventsManager
public class EventsManager
This class menage SpagoBI Event System
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_EVENT_PRESENTAION_HANDLER_CLASS_NAME
|
Method Summary | |
---|---|
static EventsManager |
getInstance()
|
static java.lang.String |
getParamsStr(java.util.Map params)
|
EventLog |
getRegisteredEvent(java.lang.Integer id)
Get registered event with the id specified at input |
java.util.List |
getRegisteredEvents(it.eng.spago.security.IEngUserProfile profile)
Get the list of registered events (generated by the user at input) ordered by date |
static java.util.Map |
parseParamsStr(java.lang.String str)
|
java.lang.Integer |
registerEvent(java.lang.String user,
java.lang.String desc,
java.lang.String params,
java.util.List roles)
Fire a registered event |
java.lang.Integer |
registerEvent(java.lang.String user,
java.lang.String desc,
java.lang.String params,
java.util.List roles,
java.lang.String handler)
Register an event given its user name, description and parameters |
void |
registerHandler(long id,
java.lang.Object handler)
Associate an handler to the given event. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_EVENT_PRESENTAION_HANDLER_CLASS_NAME
Method Detail |
---|
public static EventsManager getInstance()
public void registerHandler(long id, java.lang.Object handler)
id
- the event unique id to which the handler is associatedhandler
- the handler to execute when the event is fired
TODO decide EventHandler interface
TODO decide EventHandler execution order policy
TODO implement some default EventHandler (i.e. NotificationHandler, HousekeepingHandler, ecc...)public java.lang.Integer registerEvent(java.lang.String user, java.lang.String desc, java.lang.String params, java.util.List roles)
id
- the event unique iduser
- the user that have registered the eventdesc
- a description provided by the agent that fired the eventparams
- parameters provided by the agent that fired the event (usefull for the handlers configuration)public java.lang.Integer registerEvent(java.lang.String user, java.lang.String desc, java.lang.String params, java.util.List roles, java.lang.String handler)
user
- The user who generated the eventdesc
- a description provided by the agentparams
- parameters provided by the agent (usefull for the handlers configuration)handler
- The presentation class (implementing it.eng.spagobi.events.handlers.IEventPresentationHandler
) for the eventpublic EventLog getRegisteredEvent(java.lang.Integer id)
id
- The id of the registered event
public java.util.List getRegisteredEvents(it.eng.spago.security.IEngUserProfile profile)
user
- The name of the user who generated the events
public static java.lang.String getParamsStr(java.util.Map params)
public static java.util.Map parseParamsStr(java.lang.String str)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |