protected void raiseEvent(String eventName, Object... params) { if (Events.exists()) { Events.instance().raiseEvent(eventName, params); } }
/** * Raise an event that is to be processed after the current transaction * ends * * @param type the event type * @param parameters parameters to be passes to the listener method */ public void raiseTransactionCompletionEvent(String type, Object... parameters) { getDispatcher().scheduleTransactionCompletionEvent(type, parameters); }
/** * Dispatches an event to get interested components informed when a changeable document was created (thus not saved) * and before the form is displayed. */ public static void raiseEventsOnDocumentCreate(DocumentModel document) { Events.instance().raiseEvent(EventNames.NEW_DOCUMENT_CREATED); }
protected Events getEvents() { return Events.instance(); }
protected void raiseEvent(String type, Object... parameters) { getEvents().raiseEvent(type, parameters); }
protected void notifyChildrenChanged(DocumentModel containerDocument) { if (containerDocument != null) { Events.instance().raiseEvent(DOCUMENT_CHILDREN_CHANGED, containerDocument); } }
public static boolean exists() { return Contexts.isEventContextActive() && instance()!=null; }
public void remove(String name) { if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name); map.remove(name); if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name); }
protected void notLoggedIn() { // TODO - Deprecated, remove for next major release Events.instance().raiseEvent("org.jboss.seam.notLoggedIn"); Events.instance().raiseEvent(Identity.EVENT_NOT_LOGGED_IN); }
/** * Raise an event that is to be processed after successful completion of * the current transaction * * @param type the event type * @param parameters parameters to be passes to the listener method */ public void raiseTransactionSuccessEvent(String type, Object... parameters) { getDispatcher().scheduleTransactionSuccessEvent(type, parameters); }
public void setUsername(String username) { if (this.username != username && (this.username == null || !this.username.equals(username))) { this.username = username; invalid = false; if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED); } }
protected void raiseBeginEvent(String pageflowDefinitionName) { Events.instance().raiseEvent("org.jboss.seam.beginPageflow." + pageflowDefinitionName); Events.instance().raiseEvent("org.jboss.seam.beginPageflow"); }
/** * Raise an event that is to be processed asynchronously * * @param type the event type * @param parameters parameters to be passes to the listener method */ public void raiseAsynchronousEvent(String type, Object... parameters) { getDispatcher().scheduleAsynchronousEvent(type, parameters); }
/** * Clears any roles added by calling addRole() while not authenticated. * This method may be overridden by a subclass if different * pre-authentication logic should occur. */ protected void preAuthenticate() { preAuthenticationRoles.clear(); if (Events.exists()) Events.instance().raiseEvent(EVENT_PRE_AUTHENTICATE); }
@Override protected void process() { Events.instance().raiseEvent(type, parameters); }
/** * Raise an event that is to be processed according to a "schedule" * * @see TimerSchedule (EJB, quartz or JDK timer service) * @see CronSchedule (quartz timer service only) * * @param type the event type * @param schedule the schedule object, specific to the dispatcher strategy * @param parameters parameters to be passes to the listener method */ public void raiseTimedEvent(String type, Schedule schedule, Object... parameters) { getDispatcher().scheduleTimedEvent(type, schedule, parameters); }
public void setPassword(String password) { if (this.password != password && (this.password == null || !this.password.equals(password))) { this.password = password; invalid = false; if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED); } }
/** * Permet de bien gérer le rafraîchissement de l'IHM lors de la circulation entre les sous-onglets */ public void notifySubTabSelectionChanged() { Events.instance().raiseEvent(ToutaticeGlobalConst.CST_EVENT_SUB_TAB_SELECTION_CHANGED, ""); }
public void remove(String name) { if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name); additions.remove(name); removals.add(name); if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name); }
protected void fireSeamEvent(String eventName) { Events evtManager = Events.instance(); evtManager.raiseEvent(eventName); }