private static CmisEndpointsDocument convertEndpointsDocument(JSONObject json) { CmisEndpointsDocumentImpl result = new CmisEndpointsDocumentImpl(); for (Map.Entry<String, Object> entry : json.entrySet()) { if (CmisEndpointsDocument.KEY_ENDPOINTS.equals(entry.getKey()) && (entry.getValue() instanceof JSONArray)) { result.put(entry.getKey(), convertEndpoints((JSONArray) entry.getValue())); } else { result.put(entry.getKey(), entry.getValue()); } } return result; }
private static CmisEndpointsDocument convertEndpointsDocument(JSONObject json) { CmisEndpointsDocumentImpl result = new CmisEndpointsDocumentImpl(); for (Map.Entry<String, Object> entry : json.entrySet()) { if (CmisEndpointsDocument.KEY_ENDPOINTS.equals(entry.getKey()) && (entry.getValue() instanceof JSONArray)) { result.put(entry.getKey(), convertEndpoints((JSONArray) entry.getValue())); } else { result.put(entry.getKey(), entry.getValue()); } } return result; }
private static List<Object> convertEndpoints(JSONArray json) { List<Object> result = new ArrayList<Object>(); for (Object item : json) { if (item instanceof JSONObject) { CmisEndpointImpl endpoint = new CmisEndpointImpl(); for (Map.Entry<String, Object> entry : ((JSONObject) item).entrySet()) { if (CmisEndpoint.KEY_AUTHENTICATION.equals(entry.getKey()) && (entry.getValue() instanceof JSONArray)) { endpoint.put(entry.getKey(), convertAuthentication(endpoint, (JSONArray) entry.getValue())); } else { endpoint.put(entry.getKey(), entry.getValue()); } } result.add(endpoint); } else { result.add(item); } } return result; }
private static List<Object> convertEndpoints(JSONArray json) { List<Object> result = new ArrayList<Object>(); for (Object item : json) { if (item instanceof JSONObject) { CmisEndpointImpl endpoint = new CmisEndpointImpl(); for (Map.Entry<String, Object> entry : ((JSONObject) item).entrySet()) { if (CmisEndpoint.KEY_AUTHENTICATION.equals(entry.getKey()) && (entry.getValue() instanceof JSONArray)) { endpoint.put(entry.getKey(), convertAuthentication(endpoint, (JSONArray) entry.getValue())); } else { endpoint.put(entry.getKey(), entry.getValue()); } } result.add(endpoint); } else { result.add(item); } } return result; }
for (Map.Entry<String, Object> e : json.entrySet()) { if (JSONConstants.ERROR_EXCEPTION.equalsIgnoreCase(e.getKey()) || JSONConstants.ERROR_MESSAGE.equalsIgnoreCase(e.getKey())) {
for (Map.Entry<String, Object> e : json.entrySet()) { if (JSONConstants.ERROR_EXCEPTION.equalsIgnoreCase(e.getKey()) || JSONConstants.ERROR_MESSAGE.equalsIgnoreCase(e.getKey())) {