Class LineListController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.linelist.LineListController
-
@Controller @RequestMapping("/linelist") public class LineListController extends java.lang.Object
This controller is responsible for AJAX handling for the line list page, which displays sample metadata.
-
-
Constructor Summary
Constructors Constructor Description LineListController(ProjectService projectService, SampleService sampleService, MetadataTemplateService metadataTemplateService, ProjectOwnerPermission projectOwnerPermission, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<UIMetadataTemplate>
getLineListTemplates(long projectId, java.util.Locale locale)
Get aList
of allMetadataTemplate
associated with the project.java.util.List<AgGridColumn>
getProjectMetadataTemplateFields(long projectId, java.util.Locale locale)
Get a list of allMetadataTemplateField
s on aProject
EntriesResponse
getProjectSamplesMetadataEntries(long projectId, int current, int pageSize)
UIMetadataTemplate
saveLineListTemplate(UIMetadataTemplate template, java.lang.Long projectId, java.util.Locale locale, javax.servlet.http.HttpServletResponse response)
Save or update aMetadataTemplate
java.lang.String
saveMetadataEntry(long sampleId, java.lang.String label, java.lang.String value, javax.servlet.http.HttpServletResponse response)
Save an updated sample metadata entry
-
-
-
Constructor Detail
-
LineListController
@Autowired public LineListController(ProjectService projectService, SampleService sampleService, MetadataTemplateService metadataTemplateService, ProjectOwnerPermission projectOwnerPermission, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
getProjectSamplesMetadataEntries
@RequestMapping(value="/entries", method=GET) @ResponseBody public EntriesResponse getProjectSamplesMetadataEntries(@RequestParam long projectId, @RequestParam int current, @RequestParam int pageSize)
- Parameters:
projectId
-Long
identifier for aProject
current
- the number of thePage
pageSize
- the size of thePage
- Returns:
List
ofUISampleMetadata
s of allSample
metadata in aProject
-
saveMetadataEntry
@RequestMapping(value="/entries", method=POST) @ResponseBody public java.lang.String saveMetadataEntry(@RequestParam long sampleId, @RequestParam java.lang.String label, @RequestParam java.lang.String value, javax.servlet.http.HttpServletResponse response)
Save an updated sample metadata entry- Parameters:
sampleId
-Long
identifier for a samplelabel
-String
the name of theMetadataTemplateField
value
-String
the value to store in theMetadataEntry
response
-HttpServletResponse
- Returns:
- The status of the request.
-
getLineListTemplates
@RequestMapping("/templates") @ResponseBody public java.util.List<UIMetadataTemplate> getLineListTemplates(@RequestParam long projectId, java.util.Locale locale)
Get aList
of allMetadataTemplate
associated with the project.- Parameters:
projectId
-Long
Identifier for the project to get id's for.locale
-Locale
Locale of the currently logged in user.- Returns:
List
-
saveLineListTemplate
@RequestMapping(value="/templates", method=POST) public UIMetadataTemplate saveLineListTemplate(@RequestBody UIMetadataTemplate template, @RequestParam java.lang.Long projectId, java.util.Locale locale, javax.servlet.http.HttpServletResponse response)
Save or update aMetadataTemplate
- Parameters:
template
-UIMetadataTemplate
projectId
-Long
project identifierlocale
-Locale
response
-HttpServletResponse
- Returns:
- saved or updated
UIMetadataTemplate
-
getProjectMetadataTemplateFields
public java.util.List<AgGridColumn> getProjectMetadataTemplateFields(long projectId, java.util.Locale locale)
Get a list of allMetadataTemplateField
s on aProject
- Parameters:
projectId
-Long
identifier for aProject
locale
-Locale
- Returns:
List
ofUIMetadataField
-
-