changed interface to abstract class instead so we can use Override annotation to warn if we get dead methods when the definitions changes

This commit is contained in:
Ole Lensmar
2015-05-13 15:58:20 -07:00
parent 75b39e812e
commit adcd0f4bb8
2 changed files with 4 additions and 3 deletions

View File

@@ -19,9 +19,9 @@ import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
{{#operations}}
public interface {{classname}}Service {
public abstract class {{classname}}Service {
{{#operation}}
public Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}{{#hasMore}},{{/hasMore}}{{/allParams}})
public abstract Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}{{#hasMore}},{{/hasMore}}{{/allParams}})
throws NotFoundException;
{{/operation}}
}

View File

@@ -19,8 +19,9 @@ import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
{{#operations}}
public class {{classname}}ServiceImpl implements {{classname}}Service {
public class {{classname}}ServiceImpl extends {{classname}}Service {
{{#operation}}
@Override
public Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}{{#hasMore}},{{/hasMore}}{{/allParams}})
throws NotFoundException {
// do some magic!