use of org.osgi.service.event.Event in project sling by apache.
the class MongoDBContext method notifyUpdated.
public void notifyUpdated(final String[] info) {
final Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put(SlingConstants.PROPERTY_PATH, this.rootWithSlash + info[0] + '/' + info[1]);
props.put("event.distribute", "");
final Event event = new Event(SlingConstants.TOPIC_RESOURCE_CHANGED, props);
this.eventAdmin.postEvent(event);
}
use of org.osgi.service.event.Event in project sling by apache.
the class MongoDBContext method notifyAddeed.
public void notifyAddeed(final String[] info) {
final Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put(SlingConstants.PROPERTY_PATH, this.rootWithSlash + info[0] + '/' + info[1]);
props.put("event.distribute", "");
final Event event = new Event(SlingConstants.TOPIC_RESOURCE_ADDED, props);
this.eventAdmin.postEvent(event);
}
use of org.osgi.service.event.Event in project sling by apache.
the class ListTreeCommand method log.
private void log(String text, long start, long end) {
Map<String, Object> props = new HashMap<>();
props.put(CommandExecutionProperties.RESULT_TEXT, text);
props.put(CommandExecutionProperties.RESULT_STATUS, Boolean.TRUE);
props.put(CommandExecutionProperties.ACTION_TYPE, getClass().getSimpleName());
props.put(CommandExecutionProperties.ACTION_TARGET, getPath());
props.put(CommandExecutionProperties.TIMESTAMP_START, start);
props.put(CommandExecutionProperties.TIMESTAMP_END, end);
Event event = new Event(CommandExecutionProperties.REPOSITORY_TOPIC, props);
eventAdmin.postEvent(event);
}
use of org.osgi.service.event.Event in project jersey by jersey.
the class WebAppContextListener method contextInitialized.
@Override
public void contextInitialized(final ServletContextEvent sce) {
if (getEa() != null) {
final String contextPath = sce.getServletContext().getContextPath();
getEa().sendEvent(new Event("jersey/test/DEPLOYED", new HashMap<String, String>() {
{
put("context-path", contextPath);
}
}));
}
}
use of org.osgi.service.event.Event in project eclipse.themes.darker by jinmingjian.
the class DarkerThemer method onExecute.
@Execute
public void onExecute() {
eventBroker.subscribe(IThemeEngine.Events.THEME_CHANGED, new EventHandler() {
public void handleEvent(Event event) {
ITheme currentTheme = (ITheme) event.getProperty(IThemeEngine.Events.THEME);
// THEME_DARKER_PREF_THEMEENABLED, false))
if (currentTheme.getId().equals(THEME_DARKER_ID)) {
setupPreferences();
isLastThemeDarker = true;
DarkerWeavingHook.enableWeaving();
hookDarkerCore();
} else if (isLastThemeDarker) {
DarkerWeavingHook.disableWeaving();
setToDefaultPreferences();
}
}
});
}
Aggregations