Fix copyright header
[groupbasedpolicy.git] / groupbasedpolicy / src / main / java / org / opendaylight / groupbasedpolicy / resolver / validator / validators / SubjectFeatureInstancesValidator.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.groupbasedpolicy.resolver.validator.validators;
10
11 import java.util.ArrayList;
12 import java.util.List;
13 import org.opendaylight.groupbasedpolicy.resolver.validator.AbstractValidator;
14
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.SubjectFeatureInstances;
16 import org.opendaylight.yangtools.yang.binding.ChildOf;
17
18 /**
19  * Validator for {@link SubjectFeatureInstances}
20  */
21 public class SubjectFeatureInstancesValidator extends AbstractValidator<SubjectFeatureInstances> {
22
23     @Override
24     protected List<ChildOf<SubjectFeatureInstances>> getChildObjects(SubjectFeatureInstances objectToValidate) {
25         List<ChildOf<SubjectFeatureInstances>> childObjects = new ArrayList<>();
26
27         childObjects.addAll(objectToValidate.getActionInstance());
28         childObjects.addAll(objectToValidate.getClassifierInstance());
29
30         return childObjects;
31     }
32
33     @Override
34     public Class<SubjectFeatureInstances> getType() {
35         return SubjectFeatureInstances.class;
36     }
37
38 }