コード例 #1
0
ファイル: CompositeResource.java プロジェクト: winsx/Payara
 protected <T extends RestModel> T filterModel(
     Class<T> modelIface, T unfilteredModel, JsonFilter filter) throws Exception {
   JSONObject unfilteredJson =
       (JSONObject)
           JsonUtil.getJsonObject(unfilteredModel, false); // don't hide confidential properties
   JSONObject filteredJson = filter.trim(unfilteredJson);
   T filteredModel = getTypedModel(modelIface, filteredJson);
   filteredModel
       .trimmed(); // TBD - remove once the conversion to the new REST style guide is completed
   return filteredModel;
 }
コード例 #2
0
ファイル: CompositeResource.java プロジェクト: winsx/Payara
 protected JSONObject getJsonModel(RestModel typedModel) throws Exception {
   return (JSONObject)
       JsonUtil.getJsonObject(typedModel, false); // include confidential properties
 }