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

edu.stanford.protege.webprotege.perspective.PerspectivesManager Maven / Gradle / Ivy

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

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import edu.stanford.protege.webprotege.common.ProjectId;
import edu.stanford.protege.webprotege.common.UserId;

import javax.annotation.Nonnull;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 18/02/16
 */
public interface PerspectivesManager {

    @Nonnull
    ImmutableList getPerspectives(@Nonnull ProjectId projectId, @Nonnull UserId userId);

    void setPerspectives(@Nonnull ImmutableList perspectives);

    void setPerspectives(@Nonnull ProjectId projectId, @Nonnull ImmutableList perspectives);

    void setPerspectives(@Nonnull ProjectId projectId,
                         @Nonnull UserId userId,
                         @Nonnull ImmutableList perspectives);

    @Nonnull
    PerspectiveLayout getPerspectiveLayout(@Nonnull ProjectId projectId,
                                           @Nonnull UserId userId,
                                           @Nonnull PerspectiveId perspectiveId);

    void savePerspectiveLayout(@Nonnull ProjectId projectId, @Nonnull UserId userId, @Nonnull PerspectiveLayout layout);

    void savePerspectiveLayout(@Nonnull ProjectId projectId, @Nonnull PerspectiveLayout layout);

    void savePerspectiveLayout(@Nonnull PerspectiveLayout layout);

    void resetPerspectiveLayout(@Nonnull ProjectId projectId,
                                @Nonnull UserId userId,
                                @Nonnull PerspectiveId perspectiveId);

    @Nonnull
    ImmutableSet getResettablePerspectiveIds(@Nonnull ProjectId projectId,
                                                            @Nonnull UserId userId);

    /**
     * Saves the specified list of perspectives as the project defaults, copying
     * the layouts for the perspectives.
     * @param projectId The project
     * @param perspectiveDescriptors the descriptors of the perspectives
     * @param userId The user id from which to copy the perspective layouts
     */
    void savePerspectivesAsProjectDefault(@Nonnull ProjectId projectId,
                                          @Nonnull ImmutableList perspectiveDescriptors,
                                          UserId userId);

    @Nonnull
    ImmutableList getPerspectiveDetails(@Nonnull ProjectId projectId,
                                                            @Nonnull UserId userId);

    void resetPerspectives(@Nonnull ProjectId projectId, @Nonnull UserId userId);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy