All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.protege.webprotege.watches.WatchManager Maven / Gradle / Ivy

The newest version!
package edu.stanford.protege.webprotege.watches;

import edu.stanford.protege.webprotege.inject.ProjectSingleton;
import edu.stanford.protege.webprotege.common.UserId;
import org.semanticweb.owlapi.model.OWLEntity;

import javax.annotation.Nonnull;
import java.util.Set;

/**
 * Author: Matthew Horridge
* Stanford University
* Bio-Medical Informatics Research Group
* Date: 20/03/2013 * * Manages the watches for a project and the firing of events related to the watches. */ @ProjectSingleton public interface WatchManager { /** * Gets the {@link Watch}es for the specified {@link UserId}. * @param userId The {@link UserId}. Not {@code null}. * @return The set of {@link Watch} objects for the specified {@link UserId}. * @throws NullPointerException if {@code userId} is {@code null}. */ Set getWatches(@Nonnull UserId userId); /** * Adds the specified watch for the specified user. * * @param watch The {@link Watch} to be added for the specified user. Not {@code null}. * @throws NullPointerException if any parameters are {@code null}. */ void addWatch(@Nonnull Watch watch); /** * Removes the specified watch for the specified user. * * @param watch The {@link Watch} to be removed for the specified user. Not {@code null}. * @throws NullPointerException if any parameters are {@code null}. */ void removeWatch(@Nonnull Watch watch); /** * Gets the watches that are attached to the specified entity by the specified user. * @param watchedObject The entity to which the watches are attched. * @param userId The user who the watches belong to. * @return The watches. */ Set getDirectWatches(@Nonnull OWLEntity watchedObject, @Nonnull UserId userId); /** * Gets all direct watches for the specfied entity. * @param watchedEntity The watched entity * @return Direct watches for the specified entity */ Set getDirectWatches(@Nonnull OWLEntity watchedEntity); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy