2 * Copyright (c) 2013 Cisco Systems, Inc. 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
8 package org.opendaylight.protocol.pcep;
10 import java.util.Arrays;
11 import java.util.List;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcerr.message.pcerr.message.Errors;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcerr.message.pcerr.message.ErrorsBuilder;
16 import org.opendaylight.yangtools.yang.binding.DataContainer;
18 public class UnknownObject implements Object {
20 private final Errors error;
22 private final PCEPErrors e;
24 public UnknownObject(final PCEPErrors error) {
25 final PCEPErrorMapping mapping = PCEPErrorMapping.getInstance();
27 this.error = new ErrorsBuilder().setType(mapping.getFromErrorsEnum(error).type).setValue(mapping.getFromErrorsEnum(error).value).build();
30 public List<Errors> getErrors() {
31 return Arrays.asList(this.error);
34 public PCEPErrors getError() {
39 public Class<? extends DataContainer> getImplementedInterface() {
44 public Boolean isIgnore() {
49 public Boolean isProcessingRule() {