use of org.eclipse.vorto.plugin.generator.GeneratorPluginInfo in project vorto by eclipse.
the class GeneratorMetaHandler method handleRequest.
@Override
public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {
ApiGatewayRequest request = ApiGatewayRequest.createFromJson(input);
GeneratorPluginInfo pluginInfo = GeneratorPluginInfoFactory.getInstance().getForPlugin(request.getPathParam("pluginkey"));
if (pluginInfo == null) {
ApiGatewayResponse response = ApiGatewayResponse.builder().setStatusCode(404).build();
objectMapper.writeValue(output, response);
} else {
ApiGatewayResponse gatewayResponse = ApiGatewayResponse.builder().setStatusCode(200).setRawBody(objectMapper.writeValueAsString(pluginInfo)).build();
objectMapper.writeValue(output, gatewayResponse);
}
}
Aggregations