Hi
The LocationEnhancementEngine (geonames.org) defines an dependency to
"OnlineMode" so if the "OfflineMode" is activated this dependency
would be no longer available and the Engine would be deactivated by
OSGI.
Fot the ReferencedSiteEntityTaggingEnhancementEngine this decision is
not static but depends on
(1) The configuration of the ReferencedSite (if a local Cache is
configured and the used CacheStrategy supports queries on the local
cache
(2) If the local Cache is currently active
Note also that this engine uses "configurationFactory = true" so there
may be multiple instances using different referenced sites.
The question is:
Is it enough to
(a) avoid the execution of the computeEnhancements(...) in cases it
is not possible because Stanbol operates in OfflineMode or
(b) is it required to deactivate the enhancement engine.
The current implementation does (a)
computeEnhancements(...) {
...
if(isOfflineMode() && !site.supportsLocalMode()){
log.warn("Unable to enhance ci {} because "+
"OfflineMode is not supported by ReferencedSite {}.",
ci.getId(),site.getId());
return;
}
...
}
For (b) I would not even know how to implement the dynamic
removal/adding of services if either
- offline mode is enabled/disabled or
- offline mode is active but because of an other change an Engine can
no longer operate in offline mode
In summary
(a) only ensures that no remote services are called in OfflineMode it
does not communicate to the JobManager that an Engine can no longer be
used
(b) would only deactivate the engine, but also not tell why this
engine is no longer available
so maybe we need a (c) where an engine can communicate some status
messages to the JobManager and extend the user interface.
WDYT
Rupert
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen