2 * Copyright (c) 2015 Yale University and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.alto.core.northbound.route.endpointcost.impl;
11 import javax.ws.rs.core.Response;
13 import com.fasterxml.jackson.databind.JsonNode;
15 public class EndpointcostRouteChecker {
17 public static Response checkMissing(JsonNode target, String field, String origin) {
19 // TODO :: report missing field, something like
20 // return new AltoMissingFieldError(field, origin);
26 public static Response checkList(JsonNode list, String field, String origin) {
27 if (!list.isArray()) {
28 // TODO :: report invalid field type, something like
29 // return new AltoInvalidFieldType(field, "array", origin);