Package com.hybris.cockpitng.core
Interface WidgetTemplateRulesEngine
-
- All Known Implementing Classes:
DefaultWidgetTemplateRulesEngine
public interface WidgetTemplateRulesEngineManages instances of a template widget. Uses template rules to make decision to which instance(s) an incoming socket event is to be sent.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RuleEngineResultforwardSocketEvent(Widget targetWidget, java.lang.String targetSocketId, WidgetInstance sourceInstance, java.lang.String sourceSocketId)Selects target widget instance(s) for the incoming event.RuleEngineResulthandleOutcomingEvent(WidgetInstance sourceInstance, java.lang.String sourceSocketId)Executes additional logic on an outgoing event according to rules - e.g.
-
-
-
Method Detail
-
forwardSocketEvent
RuleEngineResult forwardSocketEvent(Widget targetWidget, java.lang.String targetSocketId, WidgetInstance sourceInstance, java.lang.String sourceSocketId)
Selects target widget instance(s) for the incoming event. It might create new instance as well if rules are set up that way.- Parameters:
targetWidget- target widget for the incoming eventtargetSocketId- socket ID of the target widget the even is sent tosourceInstance- source of the eventsourceSocketId- socket ID of the source widget the event is sent from- Returns:
- list of widget instances the event should be sent to. Could be empty list if the event is not applicable to any of the target widget instances according to rules.
-
handleOutcomingEvent
RuleEngineResult handleOutcomingEvent(WidgetInstance sourceInstance, java.lang.String sourceSocketId)
Executes additional logic on an outgoing event according to rules - e.g. closes the source instance.- Parameters:
sourceInstance- source widget of the outgoing eventsourceSocketId- the socket ID the event is sent from- Returns:
-
-