handlebars.JavaJaxRS.apiServiceImpl.mustache Maven / Gradle / Ivy
package {{package}}.impl;
import {{package}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#imports}}import {{import}};
{{/imports}}
import java.util.Map;
import java.util.List;
import {{package}}.NotFoundException;
import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
{{#useBeanValidation}}
import javax.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
public class {{classname}}ServiceImpl extends {{classname}}Service {
{{#operation}}
{{#contents}}
@Override
public Response {{nickname}}({{#parameters}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}{{>serviceCookieParams}}, {{/parameters}}SecurityContext securityContext) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
{{/contents}}
{{/operation}}
}
{{/operations}}