Search in sources :

Example 1 with GetPerspectivesResult

use of edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesResult in project webprotege by protegeproject.

the class LoadProjectInNewWindowRequestHandlerImpl method handleLoadProjectInNewWindow.

@Override
public void handleLoadProjectInNewWindow(final ProjectId projectId) {
    UserId userId = loggedInUserProvider.getCurrentUserId();
    dispatchServiceManager.execute(new GetPerspectivesAction(projectId, userId), new DispatchServiceCallback<GetPerspectivesResult>() {

        @Override
        public void handleSuccess(GetPerspectivesResult result) {
            ImmutableList<PerspectiveId> perspectives = result.getPerspectives();
            handleOpenInNewWindow(perspectives, projectId);
        }
    });
}
Also used : GetPerspectivesResult(edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesResult) UserId(edu.stanford.bmir.protege.web.shared.user.UserId) ImmutableList(com.google.common.collect.ImmutableList) GetPerspectivesAction(edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesAction)

Example 2 with GetPerspectivesResult

use of edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesResult in project webprotege by protegeproject.

the class GetPerspectivesActionHandler method execute.

@Nonnull
@Override
public GetPerspectivesResult execute(@Nonnull GetPerspectivesAction action, @Nonnull ExecutionContext executionContext) {
    ProjectId projectId = action.getProjectId();
    UserId userId = action.getUserId();
    ImmutableList<PerspectiveId> perspectives = perspectivesManager.getPerspectives(projectId, userId);
    return new GetPerspectivesResult(perspectives);
}
Also used : GetPerspectivesResult(edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesResult) UserId(edu.stanford.bmir.protege.web.shared.user.UserId) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) PerspectiveId(edu.stanford.bmir.protege.web.shared.perspective.PerspectiveId) Nonnull(javax.annotation.Nonnull)

Aggregations

GetPerspectivesResult (edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesResult)2 UserId (edu.stanford.bmir.protege.web.shared.user.UserId)2 ImmutableList (com.google.common.collect.ImmutableList)1 GetPerspectivesAction (edu.stanford.bmir.protege.web.shared.perspective.GetPerspectivesAction)1 PerspectiveId (edu.stanford.bmir.protege.web.shared.perspective.PerspectiveId)1 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)1 Nonnull (javax.annotation.Nonnull)1