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

JavaPlayFramework.newApi.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
package {{package}};

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

import play.mvc.Http;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
import java.io.FileInputStream;
{{#useBeanValidation}}
import javax.validation.constraints.*;
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#operations}}
public class {{classname}}ControllerImp {{#useInterfaces}}implements {{classname}}ControllerImpInterface{{/useInterfaces}} {
{{#operation}}
    {{#useInterfaces}}@Override{{/useInterfaces}}
    public {{^returnType}}void{{/returnType}}{{#returnType}}{{#supportAsync}}CompletionStage<{{/supportAsync}}{{>returnTypesNoVoid}}{{#supportAsync}}>{{/supportAsync}}{{/returnType}} {{operationId}}({{#allParams}}{{>pathParams}}{{>queryParams}}{{>bodyParams}}{{>formParams}}{{>headerParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{#handleExceptions}}throws Exception{{/handleExceptions}} {
        //Do your magic!!!
        {{#returnType}}
        {{#supportAsync}}
        return CompletableFuture.supplyAsync(() -> {
        {{/supportAsync}}
        {{#isResponseFile}}
        return new FileInputStream("replace this");
        {{/isResponseFile}}
        {{^isResponseFile}}
        {{#supportAsync}}   {{/supportAsync}}return new {{>returnTypesNoVoidNoAbstract}}({{#vendorExtensions.missingReturnInfoIfNeeded}}{{vendorExtensions.missingReturnInfoIfNeeded}}{{/vendorExtensions.missingReturnInfoIfNeeded}});
        {{/isResponseFile}}
        {{#supportAsync}}
        });
        {{/supportAsync}}
        {{/returnType}}
    }

{{/operation}}
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy