2 * Copyright (c) 2015 CableLabs 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.controller.packetcable.provider.validation.impl.validators.ccaps;
11 import org.opendaylight.controller.packetcable.provider.validation.impl.validators.AbstractValidator;
12 import org.opendaylight.yang.gen.v1.urn.packetcable.rev161107.ccap.attributes.AmId;
17 public class AmIdValidator extends AbstractValidator<AmId> {
19 private static final String AM_TYPE = "amId.am-type";
20 private static final String AM_TAG = "amId.am-tag";
23 protected void doValidate(final AmId amId, Extent extent) {
25 getErrorMessages().add("amId must exist");
29 mustExist(amId.getAmTag(), AM_TAG);
30 mustExist(amId.getAmType(), AM_TYPE);