use of one.kii.summer.io.context.ReadContext in project kiimate by SINeWang.
the class VisitExtensionCtl method visit.
@RequestMapping(value = "/{group}/{name:.+}", method = RequestMethod.GET)
public ResponseEntity<VisitExtensionApi.Receipt> visit(@RequestHeader(value = ErestHeaders.REQUEST_ID, required = false) String requestId, @RequestHeader(ErestHeaders.VISITOR_ID) String visitorId, @PathVariable(OWNER_ID) String ownerId, @PathVariable("group") String group, @PathVariable("name") String name) {
ReadContext context = buildContext(requestId, visitorId, ownerId);
VisitExtensionApi.Form form = new VisitExtensionApi.Form();
form.setGroup(group);
form.setName(name);
return VisitApiCaller.sync(api, context, form);
}
use of one.kii.summer.io.context.ReadContext in project kiimate by SINeWang.
the class VisitModelCtl method exploreModels.
@RequestMapping(value = "/{" + PUB_SET + ":.+}")
public ResponseEntity<VisitModelApi.Model> exploreModels(@RequestHeader(value = ErestHeaders.REQUEST_ID, required = false) String requestId, @RequestHeader(ErestHeaders.VISITOR_ID) String visitorId, @PathVariable(PUB_SET) Long pubSet) {
ReadContext context = buildContext(requestId, null, visitorId);
VisitModelApi.VisitModelForm form = new VisitModelApi.VisitModelForm();
form.setPubSet(pubSet);
return VisitApiCaller.sync(api, context, form);
}
use of one.kii.summer.io.context.ReadContext in project kiimate by SINeWang.
the class SearchStatusesCtl method exploreModels.
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<List<SearchStatusesApi.Statuses>> exploreModels(@RequestHeader(value = ErestHeaders.REQUEST_ID, required = false) String requestId, @RequestHeader(ErestHeaders.VISITOR_ID) String visitorId, @RequestParam("q") String query, @RequestParam("ownerId") String ownerId) {
ReadContext context = buildContext(requestId, ownerId, visitorId);
SearchStatusesApi.QueryForm form = new SearchStatusesApi.QueryForm();
form.setQuery(query);
List<SearchStatusesApi.Statuses> models = api.search(context, form);
return ErestResponse.ok(requestId, models);
}
use of one.kii.summer.io.context.ReadContext in project kiimate by SINeWang.
the class VisitAssetCtl method visit.
@RequestMapping(value = "/{" + GROUP + "}/{" + NAME + "}/{" + STABILITY + "}/{" + VERSION + ":.+}")
public ResponseEntity<VisitFatAssetApi.Asset> visit(@RequestHeader(value = ErestHeaders.REQUEST_ID, required = false) String requestId, @RequestHeader(ErestHeaders.VISITOR_ID) String visitorId, @PathVariable(OWNER_ID) String ownerId, @PathVariable(GROUP) String group, @PathVariable(NAME) String name, @PathVariable(STABILITY) String stability, @PathVariable(VERSION) String version) {
ReadContext context = buildContext(requestId, ownerId, visitorId);
VisitFatAssetApi.GroupNameForm form = new VisitFatAssetApi.GroupNameForm();
form.setGroup(group);
form.setName(name);
if (null != stability) {
form.setStability(stability);
}
if (null != version) {
form.setVersion(version);
}
return VisitApiCaller.sync(api, context, form);
}
use of one.kii.summer.io.context.ReadContext in project kiimate by SINeWang.
the class VisitStatusCtl method visit.
@RequestMapping(value = "/{" + SUB_ID + "}")
public ResponseEntity<?> visit(@RequestHeader(value = ErestHeaders.REQUEST_ID, required = false) String requestId, @RequestHeader(ErestHeaders.VISITOR_ID) String visitorId, @PathVariable(OWNER_ID) String ownerId, @PathVariable(SUB_ID) String subId) {
ReadContext context = buildContext(requestId, ownerId, visitorId);
VisitFatStatusApi.StatusIdForm form = new VisitFatStatusApi.StatusIdForm();
form.setId(subId);
return VisitApiCaller.sync(fatStatusApi, context, form);
}
Aggregations