All Downloads are FREE. Search and download functionalities are using the official Maven repository.

JavaJaxRS.resteasy.apiServiceImpl.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

{{#imports}}import {{import}};
{{/imports}}

import java.util.List;
import {{package}}.NotFoundException;

import java.io.InputStream;

{{#jakarta}}
import jakarta.enterprise.context.RequestScoped;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.SecurityContext;
{{/jakarta}}
{{^jakarta}}
import javax.enterprise.context.RequestScoped;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
{{/jakarta}}

@RequestScoped
{{>generatedAnnotation}}
{{#operations}}
public class {{classname}}ServiceImpl implements {{classname}}Service {
  {{#operation}}
      public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{^isMultipart}}{{>serviceFormParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}SecurityContext securityContext)
      throws NotFoundException {
      // do some magic!
      return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
  }
  {{/operation}}
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy