Search in sources :

Example 1 with MoveProjectsToTrashResult

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

the class MoveProjectsToTrashActionHandler method execute.

@Nonnull
@Override
public MoveProjectsToTrashResult execute(@Nonnull MoveProjectsToTrashAction action, @Nonnull ExecutionContext executionContext) {
    List<ProjectMovedToTrashEvent> events = new ArrayList<>();
    ProjectId projectId = action.getProjectId();
    projectDetailsManager.setInTrash(projectId, true);
    events.add(new ProjectMovedToTrashEvent(projectId));
    return new MoveProjectsToTrashResult(new EventList<>(EventTag.getFirst(), events, EventTag.getFirst()));
}
Also used : ProjectMovedToTrashEvent(edu.stanford.bmir.protege.web.shared.event.ProjectMovedToTrashEvent) MoveProjectsToTrashResult(edu.stanford.bmir.protege.web.shared.project.MoveProjectsToTrashResult) ArrayList(java.util.ArrayList) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) Nonnull(javax.annotation.Nonnull)

Aggregations

ProjectMovedToTrashEvent (edu.stanford.bmir.protege.web.shared.event.ProjectMovedToTrashEvent)1 MoveProjectsToTrashResult (edu.stanford.bmir.protege.web.shared.project.MoveProjectsToTrashResult)1 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)1 ArrayList (java.util.ArrayList)1 Nonnull (javax.annotation.Nonnull)1