send the _id as a string
parent
3b6412219b
commit
ad228e8953
|
@ -24,6 +24,7 @@ import com.google.gson.FieldAttributes;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.LongSerializationPolicy;
|
||||||
|
|
||||||
@Component(ResourceSetEntityAbbreviatedView.VIEWNAME)
|
@Component(ResourceSetEntityAbbreviatedView.VIEWNAME)
|
||||||
public class ResourceSetEntityAbbreviatedView extends AbstractView {
|
public class ResourceSetEntityAbbreviatedView extends AbstractView {
|
||||||
|
@ -55,6 +56,7 @@ public class ResourceSetEntityAbbreviatedView extends AbstractView {
|
||||||
})
|
})
|
||||||
.serializeNulls()
|
.serializeNulls()
|
||||||
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||||
|
.setLongSerializationPolicy(LongSerializationPolicy.STRING)
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -82,7 +84,7 @@ public class ResourceSetEntityAbbreviatedView extends AbstractView {
|
||||||
|
|
||||||
JsonObject o = new JsonObject();
|
JsonObject o = new JsonObject();
|
||||||
|
|
||||||
o.addProperty("_id", rs.getId());
|
o.addProperty("_id", rs.getId().toString()); // set the ID to a string
|
||||||
o.addProperty("user_access_policy_uri", config.getIssuer() + "manage/resource/" + rs.getId());
|
o.addProperty("user_access_policy_uri", config.getIssuer() + "manage/resource/" + rs.getId());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.google.gson.FieldAttributes;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.LongSerializationPolicy;
|
||||||
|
|
||||||
@Component(ResourceSetEntityView.VIEWNAME)
|
@Component(ResourceSetEntityView.VIEWNAME)
|
||||||
public class ResourceSetEntityView extends AbstractView {
|
public class ResourceSetEntityView extends AbstractView {
|
||||||
|
@ -56,6 +57,7 @@ public class ResourceSetEntityView extends AbstractView {
|
||||||
})
|
})
|
||||||
.serializeNulls()
|
.serializeNulls()
|
||||||
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||||
|
.setLongSerializationPolicy(LongSerializationPolicy.STRING)
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -83,7 +85,7 @@ public class ResourceSetEntityView extends AbstractView {
|
||||||
|
|
||||||
JsonObject o = new JsonObject();
|
JsonObject o = new JsonObject();
|
||||||
|
|
||||||
o.addProperty("_id", rs.getId());
|
o.addProperty("_id", rs.getId().toString()); // send the id as a string
|
||||||
o.addProperty("user_access_policy_uri", config.getIssuer() + "manage/resource/" + rs.getId());
|
o.addProperty("user_access_policy_uri", config.getIssuer() + "manage/resource/" + rs.getId());
|
||||||
o.addProperty("name", rs.getName());
|
o.addProperty("name", rs.getName());
|
||||||
o.addProperty("uri", rs.getUri());
|
o.addProperty("uri", rs.getUri());
|
||||||
|
|
Loading…
Reference in New Issue