use of edu.stanford.bmir.protege.web.shared.watches.SetEntityWatchesResult in project webprotege by protegeproject.
the class SetEntityWatchesActionHandler method execute.
@Nonnull
@Override
public SetEntityWatchesResult execute(@Nonnull SetEntityWatchesAction action, @Nonnull ExecutionContext executionContext) {
EventTag startTag = eventManager.getCurrentTag();
UserId userId = action.getUserId();
Set<Watch> watches = watchManager.getDirectWatches(action.getEntity(), userId);
for (Watch watch : watches) {
watchManager.removeWatch(watch);
}
for (Watch watch : action.getWatches()) {
watchManager.addWatch(watch);
}
return new SetEntityWatchesResult(eventManager.getEventsFromTag(startTag));
}
Aggregations