Class NegotiatorController
- java.lang.Object
-
- org.molgenis.web.PluginController
-
- org.molgenis.dataexplorer.negotiator.NegotiatorController
-
@Controller @RequestMapping("/plugin/directory") public class NegotiatorController extends org.molgenis.web.PluginController
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringexportToNegotiator(NegotiatorRequest request)Sends aNegotiatorQueryto the negotiator.org.molgenis.web.ErrorMessageResponsehandleRuntimeException(RuntimeException e)booleanshowDirectoryButton(String entityTypeId)ExportValidationResponsevalidateNegotiatorExport(NegotiatorRequest request)Validates aNegotiatorRequest.
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
-
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 aNegotiatorRequest.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 aNegotiatorQueryto 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
NegotiatorEntityConfigandNegotiatorConfigstored in the database.- Parameters:
request-NegotiatorRequest- Returns:
- Location on the Negotiator where the negotiation can be started.
-
handleRuntimeException
@ExceptionHandler(java.lang.RuntimeException.class) @ResponseBody @ResponseStatus(INTERNAL_SERVER_ERROR) public org.molgenis.web.ErrorMessageResponse handleRuntimeException(RuntimeException e)
-
-