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

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

There is a newer version: 2.0.2-WHO
Show newest version
package edu.stanford.protege.webprotege.watches;

import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.collect.ImmutableSet;
import edu.stanford.protege.webprotege.common.ChangeRequest;
import edu.stanford.protege.webprotege.common.ChangeRequestId;
import edu.stanford.protege.webprotege.common.ProjectId;
import edu.stanford.protege.webprotege.common.UserId;
import edu.stanford.protege.webprotege.dispatch.ProjectAction;
import org.semanticweb.owlapi.model.OWLEntity;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 29/02/16
 */
@JsonTypeName("webprotege.watches.SetWatches")
public record SetWatchesAction(ChangeRequestId changeRequestId,
                               ProjectId projectId, UserId userId, OWLEntity entity, ImmutableSet watches) implements ProjectAction, ChangeRequest {

    public static final String CHANNEL = "webprotege.watches.SetWatches";

    @Override
    public String getChannel() {
        return CHANNEL;
    }

    public SetWatchesAction(ChangeRequestId changeRequestId,
                            ProjectId projectId,
                            UserId userId,
                            OWLEntity entity,
                            ImmutableSet watches) {
        this.changeRequestId = checkNotNull(changeRequestId);
        this.projectId = checkNotNull(projectId);
        this.userId = checkNotNull(userId);
        this.entity = checkNotNull(entity);
        this.watches = checkNotNull(watches);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy