Class RequestParserHelperSingle
- java.lang.Object
-
- fr.gouv.vitam.common.database.parser.request.single.RequestParserHelperSingle
-
public class RequestParserHelperSingle extends java.lang.Object
RequestParser Helper to get the correct Request Parser from String or from Json.
Note however that is should be better to create the correct Parser based one the source of the request:
- POST: insert
- PATCH: update
- DELETE: delete
- GET: select
- PUT: delete and insert
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RequestParserSingle
getParser(com.fasterxml.jackson.databind.JsonNode jsonRequest)
Create one Parser for Internal API according to:
InsertParser if { $query : query, $filter : filter, $data : data}
UpdateParser if { $query : query, $filter : filter, $action : action }
SelectParser if { $query : query, $filter : filter, $projection : projection }
DeleteParser if { $query : query, $filter : multi }static RequestParserSingle
getParser(com.fasterxml.jackson.databind.JsonNode jsonRequest, VarNameAdapter varNameAdapter)
Create one Parser for Masterdata according to:
InsertParser if { $query : query, $filter : filter, $data : data}
UpdateParser if { $query : query, $filter : filter, $action : action }
SelectParser if { $query : query, $filter : filter, $projection : projection }
DeleteParser if { $query : query, $filter : multi }
-
-
-
Method Detail
-
getParser
public static RequestParserSingle getParser(com.fasterxml.jackson.databind.JsonNode jsonRequest) throws InvalidParseOperationException
Create one Parser for Internal API according to:
InsertParser if { $query : query, $filter : filter, $data : data}
UpdateParser if { $query : query, $filter : filter, $action : action }
SelectParser if { $query : query, $filter : filter, $projection : projection }
DeleteParser if { $query : query, $filter : multi }- Parameters:
jsonRequest
- the request to parse- Returns:
- the appropriate RequestParser
- Throws:
InvalidParseOperationException
- if jsonRequest could not parse to JSON
-
getParser
public static RequestParserSingle getParser(com.fasterxml.jackson.databind.JsonNode jsonRequest, VarNameAdapter varNameAdapter) throws InvalidParseOperationException
Create one Parser for Masterdata according to:
InsertParser if { $query : query, $filter : filter, $data : data}
UpdateParser if { $query : query, $filter : filter, $action : action }
SelectParser if { $query : query, $filter : filter, $projection : projection }
DeleteParser if { $query : query, $filter : multi }- Parameters:
jsonRequest
- the request to parsevarNameAdapter
- the VarNameAdapter to use with the created Parser- Returns:
- the appropriate RequestParser
- Throws:
InvalidParseOperationException
- if jsonRequest could not parse to JSON
-
-