refactored to create separate serviceinterface, implementation and corresponding factory. JaxRs class uses the factory to find the implementation. Also fixed possibility for a code generator to control which API files that should be overwritten

This commit is contained in:
Ole Lensmar
2015-05-12 13:18:35 -04:00
parent c7e22b7a3b
commit 75b39e812e
15 changed files with 149 additions and 24 deletions

View File

@@ -0,0 +1,28 @@
package {{package}};
import {{package}}.*;
import {{modelPackage}}.*;
import com.sun.jersey.multipart.FormDataParam;
{{#imports}}import {{import}};
{{/imports}}
import java.util.List;
import {{package}}.NotFoundException;
import java.io.InputStream;
import com.sun.jersey.core.header.FormDataContentDisposition;
import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
{{#operations}}
public interface {{classname}}Service {
{{#operation}}
public Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}{{#hasMore}},{{/hasMore}}{{/allParams}})
throws NotFoundException;
{{/operation}}
}
{{/operations}}