use of ca.corefacility.bioinformatics.irida.model.joins.impl.RelatedProjectJoin in project irida by phac-nml.
the class ProjectSettingsAssociatedProjectsController method ajaxAssociatedProjects.
/**
* Get a list of the local associated projects.
*
* @param projectId
* {@link Long} identifier for the current {@link Project}
*
* @return a list of the associated projects for the given project
*/
@RequestMapping("/ajax/associated")
@ResponseBody
public List<Project> ajaxAssociatedProjects(@PathVariable Long projectId) {
Project project = projectService.read(projectId);
List<RelatedProjectJoin> relatedProjectJoins = projectService.getRelatedProjects(project);
return relatedProjectJoins.stream().map(RelatedProjectJoin::getObject).collect(Collectors.toList());
}
Aggregations