2 * Copyright (c) 2016 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package io.fd.honeycomb.translate;
19 import java.util.Collection;
21 import javax.annotation.Nonnull;
22 import org.opendaylight.yangtools.yang.binding.DataObject;
23 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
26 * Registry builder where {@link SubtreeManager}s can be added with or without relationships between them.
27 * The relationships express what the order of execution should be.
29 public interface ModifiableSubtreeManagerRegistryBuilder<S extends SubtreeManager<? extends DataObject>> {
32 * Add a handler responsible for writing only a single complex node.
34 ModifiableSubtreeManagerRegistryBuilder<S> add(@Nonnull S handler);
37 * Add a handler responsible for writing multiple complex nodes within a subtree its responsible for. Identifiers for
38 * subtree nodes handled by a single handler have to be relative from {@link DataObject} that represents subtree
41 ModifiableSubtreeManagerRegistryBuilder<S> subtreeAdd(@Nonnull Set<InstanceIdentifier<?>> handledChildren,
45 * Add a handler and make sure it will be executed before handler identifier by relatedType is executed.
47 ModifiableSubtreeManagerRegistryBuilder<S> addBefore(@Nonnull S handler,
48 @Nonnull InstanceIdentifier<?> relatedType);
50 ModifiableSubtreeManagerRegistryBuilder<S> addBefore(@Nonnull S handler,
51 @Nonnull Collection<InstanceIdentifier<?>> relatedTypes);
53 ModifiableSubtreeManagerRegistryBuilder<S> subtreeAddBefore(@Nonnull Set<InstanceIdentifier<?>> handledChildren,
55 @Nonnull InstanceIdentifier<?> relatedType);
57 ModifiableSubtreeManagerRegistryBuilder<S> subtreeAddBefore(@Nonnull Set<InstanceIdentifier<?>> handledChildren,
59 @Nonnull Collection<InstanceIdentifier<?>> relatedTypes);
62 * Add a handler and make sure it will be executed after handler identifier by relatedType is executed.
64 ModifiableSubtreeManagerRegistryBuilder<S> addAfter(@Nonnull S handler,
65 @Nonnull InstanceIdentifier<?> relatedType);
67 ModifiableSubtreeManagerRegistryBuilder<S> addAfter(@Nonnull S handler,
68 @Nonnull Collection<InstanceIdentifier<?>> relatedTypes);
70 ModifiableSubtreeManagerRegistryBuilder<S> subtreeAddAfter(@Nonnull Set<InstanceIdentifier<?>> handledChildren,
72 @Nonnull InstanceIdentifier<?> relatedType);
74 ModifiableSubtreeManagerRegistryBuilder<S> subtreeAddAfter(@Nonnull Set<InstanceIdentifier<?>> handledChildren,
76 @Nonnull Collection<InstanceIdentifier<?>> relatedTypes);