001/* 002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Thierry Delprat 018 */ 019package org.nuxeo.scim.server.jaxrs.marshalling; 020 021import org.json.JSONArray; 022import org.json.JSONException; 023import org.json.JSONObject; 024 025import com.unboundid.scim.data.BaseResource; 026import com.unboundid.scim.data.ResourceFactory; 027import com.unboundid.scim.marshal.json.JsonParser; 028import com.unboundid.scim.schema.ResourceDescriptor; 029import com.unboundid.scim.sdk.InvalidResourceException; 030 031/** 032 * Hack to make a method public ! 033 * 034 * @author tiry 035 * @since 7.4 036 */ 037public class NXJsonParser extends JsonParser { 038 039 public <R extends BaseResource> R doUnmarshal( 040 final JSONObject jsonObject, 041 final ResourceDescriptor resourceDescriptor, 042 final ResourceFactory<R> resourceFactory, 043 final JSONArray defaultSchemas) 044 throws JSONException, InvalidResourceException { 045 return super.unmarshal(jsonObject, resourceDescriptor, resourceFactory, defaultSchemas); 046 } 047 048}