return scheduler_.getListenerManager().removeTriggerListener(name);
}
public void addTriggerListener(AddTriggerListenerComponentPlugin plugin) throws Exception
{
TriggerListener tl = (TriggerListener)plugin;
try
{
List<Matcher<TriggerKey>> matchers = null;
if (plugin.getKeys() != null)
{
matchers = new ArrayList<Matcher<TriggerKey>>();
for (org.exoplatform.services.scheduler.JobKey key : plugin.getKeys())
{
matchers.add(KeyMatcher.keyEquals(TriggerKey.triggerKey(key.getName(), getGroupName(key.getGroup()))));
}
}
scheduler_.getListenerManager().addTriggerListener(tl, matchers);
}
catch (Exception e)
{
LOG.warn("Could not add the trigger listener (" + tl.getName() + ") defined in the plugin " + plugin.getName()
+ " : " + e.getMessage());
}
}