it.eng.spago.event.manager
Class EventManager

java.lang.Object
  extended byit.eng.spago.event.manager.EventManager
All Implemented Interfaces:
EventManagerIFace

public class EventManager
extends java.lang.Object
implements EventManagerIFace


Field Summary
protected  EventsFacadeIFace _eventsFacade
           
 
Constructor Summary
EventManager(EventsFacadeIFace eventsFacade)
          Constructor for EventHandler.
 
Method Summary
 void associatePluginToEvent(java.lang.String pluginName, java.lang.String eventName)
          This method provide to associate a Plugin to an Event.
 void associateRoleToEvent(java.lang.String roleName, java.lang.String eventName)
          This method provide to associate a Role to an Event.
 void createNewEvent(java.lang.String key, java.lang.String description, java.lang.String type)
          This method provide to create a New event This method throws an exception if something goes wrong
 void createNewEventType(java.lang.String key, java.lang.String description)
          This method provide to create a New event type This method throws an exception if something goes wrong
 SourceBean getAllEvents()
          This method provide to return a SourceBean representing all events This method throws an exception if something goes wrong
 SourceBean getEventsForRole(java.lang.String roleName)
          This method return a SourceBean representing events associated with this role This method throws an exception if something goes wrong
 SourceBean getEventsForType(java.lang.String typeEvent)
          This method provide to return a SourceBean representing all events with the type identified by typeEvent If typeEvent is equals to "", the method return all events This method throws an exception if something goes wrong
 SourceBean getEventsForUser(java.lang.String userId)
          This method return the array list rapresenting the events associated with this user This method throws an exception if something goes wrong
 SourceBean getEventsType()
          This method provide to return a SourceBean representing all event's typologies This method throws an exception if something goes wrong
 SourceBean getPluginAssociableWithEvent(java.lang.String eventName, java.lang.String pluginType)
          This method provide to return a SourceBean representing plugin with type identified by pluginType and that is associable with an event identified by eventName This method throws an exception if something goes wrong
 SourceBean getPluginsAssociableWithEvent(java.lang.String eventName)
          This method provide to return a SourceBean of plugins associable with the event identified by eventName This method throws an exception if something goes wrong
 SourceBean getRolesForEvent(java.lang.String eventName)
          This method provide to return a SourceBean representing roles associated with the event specified by event name This method throws an exception if something goes wrong
 void removeEvent(java.lang.String key)
          This method provide to remove the event identified by key, all associations with plugins, roles and all triggers associated to it This method throws an exception if something goes wrong
 void removeEventType(java.lang.String key)
          This method provide to remove the event type This method throws an exception if something goes wrong or if there are some events associated
 void removePluginFromEvent(java.lang.String pluginName, java.lang.String eventName)
          This method provide to remove association between a Plugin and an Event.
 void removeRoleFromEvent(java.lang.String roleName, java.lang.String eventName)
          This method provide to remove association between Role and Event This method throws an exception if something goes wrong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_eventsFacade

protected EventsFacadeIFace _eventsFacade
Constructor Detail

EventManager

public EventManager(EventsFacadeIFace eventsFacade)
Constructor for EventHandler.

Method Detail

getAllEvents

public SourceBean getAllEvents()
                        throws java.lang.Exception
This method provide to return a SourceBean representing all events This method throws an exception if something goes wrong

Specified by:
getAllEvents in interface EventManagerIFace
Returns:
a SourceBean of all event
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getEventsForType

public SourceBean getEventsForType(java.lang.String typeEvent)
                            throws java.lang.Exception
This method provide to return a SourceBean representing all events with the type identified by typeEvent If typeEvent is equals to "", the method return all events This method throws an exception if something goes wrong

Specified by:
getEventsForType in interface EventManagerIFace
Returns:
a SourceBean of all events
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getPluginsAssociableWithEvent

public SourceBean getPluginsAssociableWithEvent(java.lang.String eventName)
                                         throws java.lang.Exception
This method provide to return a SourceBean of plugins associable with the event identified by eventName This method throws an exception if something goes wrong

Specified by:
getPluginsAssociableWithEvent in interface EventManagerIFace
Returns:
a SourceBean of plugins
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getPluginAssociableWithEvent

public SourceBean getPluginAssociableWithEvent(java.lang.String eventName,
                                               java.lang.String pluginType)
                                        throws java.lang.Exception
This method provide to return a SourceBean representing plugin with type identified by pluginType and that is associable with an event identified by eventName This method throws an exception if something goes wrong

Specified by:
getPluginAssociableWithEvent in interface EventManagerIFace
Returns:
a SourceBean representing the plugin
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

associatePluginToEvent

public void associatePluginToEvent(java.lang.String pluginName,
                                   java.lang.String eventName)
                            throws java.lang.Exception
This method provide to associate a Plugin to an Event. It's not possibile to add two plugins of the same type to an event (throws exception) This method throws an exception if something goes wrong

Specified by:
associatePluginToEvent in interface EventManagerIFace
Parameters:
pluginName -
eventName -
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

removePluginFromEvent

public void removePluginFromEvent(java.lang.String pluginName,
                                  java.lang.String eventName)
                           throws java.lang.Exception
This method provide to remove association between a Plugin and an Event. (and all triggers associated to plugin and event) This method throws an exception if something goes wrong

Specified by:
removePluginFromEvent in interface EventManagerIFace
Parameters:
pluginName -
eventName -
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getEventsType

public SourceBean getEventsType()
                         throws java.lang.Exception
This method provide to return a SourceBean representing all event's typologies This method throws an exception if something goes wrong

Specified by:
getEventsType in interface EventManagerIFace
Returns:
a SourceBean representing all event's typologies
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getEventsForRole

public SourceBean getEventsForRole(java.lang.String roleName)
                            throws java.lang.Exception
This method return a SourceBean representing events associated with this role This method throws an exception if something goes wrong

Specified by:
getEventsForRole in interface EventManagerIFace
Returns:
A SourceBean of events for roles
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getEventsForUser

public SourceBean getEventsForUser(java.lang.String userId)
                            throws java.lang.Exception
This method return the array list rapresenting the events associated with this user This method throws an exception if something goes wrong

Specified by:
getEventsForUser in interface EventManagerIFace
Parameters:
userId -
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getRolesForEvent

public SourceBean getRolesForEvent(java.lang.String eventName)
                            throws java.lang.Exception
This method provide to return a SourceBean representing roles associated with the event specified by event name This method throws an exception if something goes wrong

Specified by:
getRolesForEvent in interface EventManagerIFace
Returns:
SourceBean representing roles associated with this event
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

removeRoleFromEvent

public void removeRoleFromEvent(java.lang.String roleName,
                                java.lang.String eventName)
                         throws java.lang.Exception
This method provide to remove association between Role and Event This method throws an exception if something goes wrong

Specified by:
removeRoleFromEvent in interface EventManagerIFace
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

associateRoleToEvent

public void associateRoleToEvent(java.lang.String roleName,
                                 java.lang.String eventName)
                          throws java.lang.Exception
This method provide to associate a Role to an Event. This method throws an exception if something goes wrong

Specified by:
associateRoleToEvent in interface EventManagerIFace
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

createNewEventType

public void createNewEventType(java.lang.String key,
                               java.lang.String description)
                        throws java.lang.Exception
This method provide to create a New event type This method throws an exception if something goes wrong

Specified by:
createNewEventType in interface EventManagerIFace
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

removeEventType

public void removeEventType(java.lang.String key)
                     throws java.lang.Exception
This method provide to remove the event type This method throws an exception if something goes wrong or if there are some events associated

Specified by:
removeEventType in interface EventManagerIFace
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

createNewEvent

public void createNewEvent(java.lang.String key,
                           java.lang.String description,
                           java.lang.String type)
                    throws java.lang.Exception
This method provide to create a New event This method throws an exception if something goes wrong

Specified by:
createNewEvent in interface EventManagerIFace
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

removeEvent

public void removeEvent(java.lang.String key)
                 throws java.lang.Exception
This method provide to remove the event identified by key, all associations with plugins, roles and all triggers associated to it This method throws an exception if something goes wrong

Specified by:
removeEvent in interface EventManagerIFace
Parameters:
key - of event to remove
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception