Class NegotiatorController


  • @Controller
    @RequestMapping("/plugin/directory")
    public class NegotiatorController
    extends org.molgenis.web.PluginController
    • Constructor Detail

      • NegotiatorController

        public NegotiatorController​(org.springframework.web.client.RestTemplate restTemplate,
                                    org.molgenis.security.core.UserPermissionEvaluator permissions,
                                    DataService dataService,
                                    org.molgenis.web.rsql.QueryRsqlConverter rsqlQueryConverter,
                                    org.molgenis.js.magma.JsMagmaScriptEvaluator jsMagmaScriptEvaluator,
                                    org.springframework.context.MessageSource messageSource)
    • Method Detail

      • showDirectoryButton

        public boolean showDirectoryButton​(String entityTypeId)
      • validateNegotiatorExport

        @PostMapping("/validate")
        @ResponseBody
        public ExportValidationResponse validateNegotiatorExport​(@RequestBody
                                                                 NegotiatorRequest request)
        Validates a NegotiatorRequest.

        Used by the data explorer to verify the request. Since the data explorer does not allow filtering on more than one repository, this endpoint does *NOT* support providing biobankRsql.

        • Checks if disabled collections are selected.
        • Checks if at least one collection is left after filtering out the disabled ones.
        Parameters:
        request - the request to validate
        Returns:
        ExportValidationResponse
        Throws:
        MolgenisDataException - if the negotiator is not configured for this entity type
      • exportToNegotiator

        @PostMapping("/export")
        @ResponseBody
        public String exportToNegotiator​(@RequestBody
                                         NegotiatorRequest request)
        Sends a NegotiatorQuery to the negotiator.

        Filters the repositories using the rsql in the request and sends the matching collections with their biobanks to the negotiator.

        Allows an extra biobankRsql expression to filter the biobanks as well. This allows you to filter on xref/mref values in the biobank, which would otherwise be impossible unless you increase the indexing depth on the collections to 2.

        Determines negotiator information based on NegotiatorEntityConfig and NegotiatorConfig stored in the database.

        Parameters:
        request - NegotiatorRequest
        Returns:
        Location on the Negotiator where the negotiation can be started.