1 package com.atlassian.plugins.rest.json; 2 3 import com.atlassian.plugins.rest.common.security.AnonymousAllowed; 4 5 import javax.ws.rs.GET; 6 import javax.ws.rs.Path; 7 8 import com.atlassian.plugins.rest.json.DummyJsonObject.DummyJsonParentObject; 9 import com.atlassian.plugins.rest.json.DummyJsonObject.DummyJsonChildObject; 10 import com.atlassian.plugins.rest.json.DummyJsonObject.DummyJsonParentObjectGeneric; 11 import com.atlassian.plugins.rest.json.DummyJsonObject.DummyJsonChildObjectGeneric; 12 13 @Path("dummyjson") 14 @AnonymousAllowed 15 public class DummyJsonObjectResource { 16 @GET 17 @Path("subclass") 18 public DummyJsonParentObject getSubClass() { 19 return new DummyJsonChildObject("parent", "child"); 20 } 21 22 @GET 23 @Path("generic") 24 public DummyJsonParentObjectGeneric getGeneric() { 25 return new DummyJsonParentObjectGeneric<String>("parent"); 26 } 27 28 @GET 29 @Path("subclassgeneric") 30 public DummyJsonParentObjectGeneric getSubClassGeneric() { 31 return new DummyJsonChildObjectGeneric("parent", "child"); 32 } 33 34 @GET 35 @Path("subclassgenericexplicit") 36 public DummyJsonParentObjectGeneric<String> getSubClassGenericExplicit() { 37 return new DummyJsonChildObjectGeneric<String>("parent", "child"); 38 } 39 }