* {@link ModuleStateChangeListener#moduleStateChanged(ModuleStateHolder, ModuleStateChange)}
* should be called.
*/
public void notify(ModuleStateHolder moduleStateHolder, TransitionResult transitionResult) {
ModuleStateChange moduleStateChange = transitionResult.getModuleStateChange();
ModuleDefinition moduleDefinition = moduleStateChange.getModuleDefinition();
for (ModuleStateChangeListener moduleStateChangeListener : listeners) {
String moduleName = moduleStateChangeListener.getModuleName();
boolean notify = true;
if (moduleName != null) {
if (!moduleName.equals(moduleDefinition.getName())) {
notify = false;
}
}
if (notify) {
String transition = moduleStateChangeListener.getTransition();
if (transition != null) {
if (!transition.equals(moduleStateChange.getTransition())) {
notify = false;
}
}
}