2 * Copyright (c) 2014 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
9 package org.opendaylight.groupbasedpolicy.renderer.vpp.sf;
11 import java.util.List;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClassifierDefinitionId;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ClassifierDefinition;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValue;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.capabilities.supported.classifier.definition.SupportedParameterValues;
20 * Represent a classifier definition.
22 public abstract class Classifier {
24 protected final Classifier parent;
26 public static final EtherTypeClassifier ETHER_TYPE_CL = new EtherTypeClassifier(null);
27 public static final IpProtoClassifier IP_PROTO_CL = new IpProtoClassifier(ETHER_TYPE_CL);
29 protected Classifier(Classifier parent) {
34 * Get the classifier definition id for this classifier.
36 * @return the {@link ClassifierDefinitionId} for this classifier
38 public abstract ClassifierDefinitionId getId();
41 * Get the classifier definition for this classifier.
43 * @return the {@link ClassifierDefinition} for this classifier
45 public abstract ClassifierDefinition getClassifierDefinition();
48 * Get parent for this classifier.
50 * @return parent classifier, see {@link Classifier}
52 public final Classifier getParent() {
57 * The result represents supported parameters for the classifier by renderer.
59 * @return list of supported parameters by the classifier
61 public abstract List<SupportedParameterValues> getSupportedParameterValues();
64 * Checks presence of required {@code params} in order to decide if classifier can update
65 * {@code matches} properly.
67 * @param params inserted parameters, not null
68 * @throws IllegalArgumentException when any of required {@code params} is not present
70 protected abstract void checkPresenceOfRequiredParams(Map<String, ParameterValue> params);