it.eng.spago.event.manager
Class TriggerManager

java.lang.Object
  extended byit.eng.spago.event.manager.TriggerManager
All Implemented Interfaces:
TriggerManagerIFace

public class TriggerManager
extends java.lang.Object
implements TriggerManagerIFace


Field Summary
protected  EventsFacadeIFace _eventsFacade
           
 
Constructor Summary
TriggerManager(EventsFacadeIFace eventsFacade)
          Constructor for TriggerHandler.
 
Method Summary
 void createNewTrigger(java.lang.String event, java.lang.String plugin, java.lang.String idProfile, java.lang.String typeProfile)
          This method provide to create a new trigger identified by event, plugin, idProfile, typeProfile This method throws an exception if something goes wrong
 java.util.ArrayList getAllPluginsByEvent(java.lang.String eventName)
          This method provide to return a list of pluginName which are related with the event identified by eventName in some triggers This method throws an exception if something goes wrong
 SourceBean getAllTriggers()
          This method provide to return a SourceBean representing all triggers This method throws an exception if something goes wrong
 SourceBean getAllTriggers(java.lang.String event, java.lang.String plugin, java.lang.String idProfile, java.lang.String typeProfile)
          This method provide to return all triggers matching with attribute passed in input If some atrribute is equals to "", the condition is ignored This method throws an exception if something goes wrong
 SourceBean getAllTriggersByEvent(java.lang.String eventName)
          This method provide to return a SourceBean representing all triggers related with the event identified by eventName This method throws an exception if something goes wrong
 SourceBean getAllTriggersByEventPlugin(java.lang.String eventName, java.lang.String pluginName)
          This method provide to return a SourceBean representing all triggers related with the event and plugin identified by eventName and pluginName If eventName or pluginName are equals to "" the condition is ignored This method throws an exception if something goes wrong
 SourceBean getAllTriggersByPlugin(java.lang.String pluginName)
          This method provide to return a SourceBean representing all triggers related with the plugin identified by pluginName This method throws an exception if something goes wrong
 java.util.ArrayList getAllUsersTriggered(java.lang.String eventName, java.lang.String pluginName)
          This method provide to return all user related with the event identified by eventName and the plugin This method throws an exception if something goes wrong
 boolean isUserTriggered(java.lang.String userId, java.lang.String eventName, java.lang.String pluginName)
          This method provide to return true if exists some relationship between the user identify by user and the event identified by eventName and the plugin or if exists some relationship between a user's roles the event identified by eventName and the plugin This method throws an exception if something goes wrong
 void removeTrigger(java.lang.String event, java.lang.String plugin, java.lang.String idProfile, java.lang.String typeProfile)
          This method provide to remove the trigger identified by event, plugin, idProfile, typeProfile 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

TriggerManager

public TriggerManager(EventsFacadeIFace eventsFacade)
Constructor for TriggerHandler.

Method Detail

getAllTriggers

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

Specified by:
getAllTriggers in interface TriggerManagerIFace
Returns:
SourceBean representing all triggers
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getAllTriggersByEvent

public SourceBean getAllTriggersByEvent(java.lang.String eventName)
                                 throws java.lang.Exception
This method provide to return a SourceBean representing all triggers related with the event identified by eventName This method throws an exception if something goes wrong

Specified by:
getAllTriggersByEvent in interface TriggerManagerIFace
Returns:
a SourceBean representing triggers
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getAllTriggersByPlugin

public SourceBean getAllTriggersByPlugin(java.lang.String pluginName)
                                  throws java.lang.Exception
This method provide to return a SourceBean representing all triggers related with the plugin identified by pluginName This method throws an exception if something goes wrong

Specified by:
getAllTriggersByPlugin in interface TriggerManagerIFace
Returns:
a SourceBean representing triggers
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getAllTriggersByEventPlugin

public SourceBean getAllTriggersByEventPlugin(java.lang.String eventName,
                                              java.lang.String pluginName)
                                       throws java.lang.Exception
This method provide to return a SourceBean representing all triggers related with the event and plugin identified by eventName and pluginName If eventName or pluginName are equals to "" the condition is ignored This method throws an exception if something goes wrong

Specified by:
getAllTriggersByEventPlugin in interface TriggerManagerIFace
Returns:
a SourceBean representing triggers
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getAllTriggers

public SourceBean getAllTriggers(java.lang.String event,
                                 java.lang.String plugin,
                                 java.lang.String idProfile,
                                 java.lang.String typeProfile)
                          throws java.lang.Exception
This method provide to return all triggers matching with attribute passed in input If some atrribute is equals to "", the condition is ignored This method throws an exception if something goes wrong

Specified by:
getAllTriggers in interface TriggerManagerIFace
Returns:
SourceBean representing all triggers matching
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

getAllPluginsByEvent

public java.util.ArrayList getAllPluginsByEvent(java.lang.String eventName)
This method provide to return a list of pluginName which are related with the event identified by eventName in some triggers This method throws an exception if something goes wrong

Specified by:
getAllPluginsByEvent in interface TriggerManagerIFace
Returns:
a List of plugins
Throws:
<{Exception}> - - if some problems occurs during operation

isUserTriggered

public boolean isUserTriggered(java.lang.String userId,
                               java.lang.String eventName,
                               java.lang.String pluginName)
This method provide to return true if exists some relationship between the user identify by user and the event identified by eventName and the plugin or if exists some relationship between a user's roles the event identified by eventName and the plugin This method throws an exception if something goes wrong

Specified by:
isUserTriggered in interface TriggerManagerIFace
Throws:
<{Exception}> - - if some problems occurs during operation

getAllUsersTriggered

public java.util.ArrayList getAllUsersTriggered(java.lang.String eventName,
                                                java.lang.String pluginName)
                                         throws java.lang.Exception
This method provide to return all user related with the event identified by eventName and the plugin This method throws an exception if something goes wrong

Specified by:
getAllUsersTriggered in interface TriggerManagerIFace
Returns:
a List of user
Throws:
<{Exception}> - - if some problems occurs during operation
java.lang.Exception

removeTrigger

public void removeTrigger(java.lang.String event,
                          java.lang.String plugin,
                          java.lang.String idProfile,
                          java.lang.String typeProfile)
                   throws java.lang.Exception
This method provide to remove the trigger identified by event, plugin, idProfile, typeProfile This method throws an exception if something goes wrong

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

createNewTrigger

public void createNewTrigger(java.lang.String event,
                             java.lang.String plugin,
                             java.lang.String idProfile,
                             java.lang.String typeProfile)
                      throws java.lang.Exception
This method provide to create a new trigger identified by event, plugin, idProfile, typeProfile This method throws an exception if something goes wrong

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