Class MetadataJsonResponseUtils
java.lang.Object
fr.gouv.vitam.metadata.core.utils.MetadataJsonResponseUtils
The purpose of this class is to centralize the generation of a metadata json response
- 
Method SummaryModifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ArrayNodepopulateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) create Json responsestatic com.fasterxml.jackson.databind.node.ArrayNodecreate Json response with diff information
- 
Method Details- 
populateJSONObjectResponsepublic static com.fasterxml.jackson.databind.node.ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) throws InvalidParseOperationException create Json response- Parameters:
- result- contains final unit(s)/ObjectGroup(s) list
 can be empty
- selectRequest- the select request of type RequestParserMultiple
- Returns:
- ArrayNode {$hits{},$context{},$result:[{}....{}],} 
 $context will be added later (Access) $result array of units or ObjectGroup (can be empty)
- Throws:
- InvalidParseOperationException- thrown when json query is not valid
 
- 
populateJSONObjectResponsepublic static com.fasterxml.jackson.databind.node.ArrayNode populateJSONObjectResponse(Result result, Map<String, List<String>> diff) create Json response with diff information- Parameters:
- result- contains final unit(s)/ObjectGroup(s) list
 can be empty
- diff- the diff map list with the unit id as key and the diff list as value
- Returns:
- JsonNode {$hits{},$context{},$result:[{_id:...,_diff:...}},...{}]} 
 $context will be added later (Access) $result array of units or ObjectGroup (can be empty)
 
 
-