use of one.kii.summer.io.context.ReadContext in project kiimate by SINeWang.
the class SearchSubjectsCtl method search.
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<List<SearchSubjectsApi.Subjects>> search(@RequestHeader(value = ErestHeaders.REQUEST_ID, required = false) String requestId, @RequestHeader(ErestHeaders.VISITOR_ID) String visitorId, @PathVariable(OBJECT_TYPE) String objectType, @PathVariable(ACCESS_TYPE) String accessType, @RequestParam("q") String q) {
ReadContext context = buildContext(requestId, null, visitorId);
SearchSubjectsApi.Form form = new SearchSubjectsApi.Form();
form.setGroup(q);
form.setAccessType(SearchSubjectsApi.AccessType.valueOf(accessType.toUpperCase()));
form.setObjectType(SearchSubjectsApi.ObjectType.valueOf(objectType.toUpperCase()));
return ErestResponse.ok(requestId, api.search(context, form));
}
Aggregations