Search in sources :

Example 1 with WorkflowName

use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName in project miso-lims by miso-lims.

the class DefaultWorkflowManager method beginWorkflow.

@Override
public Workflow beginWorkflow(String workflowNameString) throws IOException {
    WorkflowName workflowName = WorkflowName.valueOf(workflowNameString);
    Progress progress = new ProgressImpl();
    progress.setWorkflowName(workflowName);
    save(progress);
    return workflowName.createWorkflow(progress);
}
Also used : ProgressImpl(uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.ProgressImpl) Progress(uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress) WorkflowName(uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName)

Example 2 with WorkflowName

use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName in project miso-lims by miso-lims.

the class WorkflowRestController method addFavourite.

@PostMapping(value = "/favourites/add/{workflowName}")
@ResponseStatus(HttpStatus.NO_CONTENT)
@ResponseBody
public void addFavourite(@PathVariable WorkflowName workflowName) throws IOException {
    User user = authorizationManager.getCurrentUser();
    Set<WorkflowName> favouriteWorkflows = user.getFavouriteWorkflows();
    favouriteWorkflows.add(workflowName);
    userService.update(user);
}
Also used : User(com.eaglegenomics.simlims.core.User) WorkflowName(uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName) PostMapping(org.springframework.web.bind.annotation.PostMapping) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 3 with WorkflowName

use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName in project miso-lims by miso-lims.

the class WorkflowRestController method removeFavourite.

@PostMapping(value = "/favourites/remove/{workflowName}")
@ResponseStatus(HttpStatus.NO_CONTENT)
@ResponseBody
public void removeFavourite(@PathVariable WorkflowName workflowName) throws IOException {
    User user = authorizationManager.getCurrentUser();
    Set<WorkflowName> favouriteWorkflows = user.getFavouriteWorkflows();
    favouriteWorkflows.remove(workflowName);
    userService.update(user);
}
Also used : User(com.eaglegenomics.simlims.core.User) WorkflowName(uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName) PostMapping(org.springframework.web.bind.annotation.PostMapping) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

WorkflowName (uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName)3 User (com.eaglegenomics.simlims.core.User)2 PostMapping (org.springframework.web.bind.annotation.PostMapping)2 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)2 ResponseStatus (org.springframework.web.bind.annotation.ResponseStatus)2 Progress (uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress)1 ProgressImpl (uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.ProgressImpl)1