2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.mdsal.binding.dom.codec.spi;
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ForwardingObject;
12 import java.time.Instant;
13 import java.util.Map.Entry;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.mdsal.binding.dom.codec.api.BindingAugmentationCodecTreeNode;
16 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeNode;
17 import org.opendaylight.mdsal.binding.dom.codec.api.BindingDataObjectCodecTreeNode;
18 import org.opendaylight.mdsal.binding.dom.codec.api.BindingIdentityCodec;
19 import org.opendaylight.mdsal.binding.dom.codec.api.BindingInstanceIdentifierCodec;
20 import org.opendaylight.mdsal.binding.dom.codec.api.BindingLazyContainerNode;
21 import org.opendaylight.mdsal.binding.dom.codec.api.BindingStreamEventWriter;
22 import org.opendaylight.mdsal.binding.dom.codec.api.CommonDataObjectCodecTreeNode;
23 import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
24 import org.opendaylight.yangtools.yang.binding.Action;
25 import org.opendaylight.yangtools.yang.binding.Augmentation;
26 import org.opendaylight.yangtools.yang.binding.BaseNotification;
27 import org.opendaylight.yangtools.yang.binding.DataContainer;
28 import org.opendaylight.yangtools.yang.binding.DataObject;
29 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
30 import org.opendaylight.yangtools.yang.binding.Notification;
31 import org.opendaylight.yangtools.yang.binding.RpcInput;
32 import org.opendaylight.yangtools.yang.binding.RpcOutput;
33 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
34 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
35 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
36 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
37 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
38 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
41 public abstract class ForwardingBindingDOMCodecServices extends ForwardingObject implements BindingDOMCodecServices {
43 protected abstract @NonNull BindingDOMCodecServices delegate();
46 public BindingLazyContainerNode<RpcInput> toLazyNormalizedNodeActionInput(
47 final Class<? extends Action<?, ?, ?>> action, final NodeIdentifier identifier, final RpcInput input) {
48 return delegate().toLazyNormalizedNodeActionInput(action, identifier, input);
52 public BindingLazyContainerNode<RpcInput> toLazyNormalizedNodeActionInput(
53 final Class<? extends Action<?, ?, ?>> action, final RpcInput input) {
54 return delegate().toLazyNormalizedNodeActionInput(action, input);
58 public BindingLazyContainerNode<RpcOutput> toLazyNormalizedNodeActionOutput(
59 final Class<? extends Action<?, ?, ?>> action, final NodeIdentifier identifier, final RpcOutput output) {
60 return delegate().toLazyNormalizedNodeActionOutput(action, identifier, output);
64 public BindingLazyContainerNode<RpcOutput> toLazyNormalizedNodeActionOutput(
65 final Class<? extends Action<?, ?, ?>> action, final RpcOutput output) {
66 return delegate().toLazyNormalizedNodeActionOutput(action, output);
70 public YangInstanceIdentifier toYangInstanceIdentifier(final InstanceIdentifier<?> binding) {
71 return delegate().toYangInstanceIdentifier(binding);
75 public <T extends DataObject> InstanceIdentifier<T> fromYangInstanceIdentifier(final YangInstanceIdentifier dom) {
76 return delegate().fromYangInstanceIdentifier(dom);
80 public <T extends DataObject> NormalizedResult toNormalizedNode(final InstanceIdentifier<T> path, final T data) {
81 return delegate().toNormalizedNode(path, data);
85 public <A extends Augmentation<?>> @NonNull AugmentationResult toNormalizedAugmentation(
86 final InstanceIdentifier<A> path, final A data) {
87 return delegate().toNormalizedAugmentation(path, data);
91 public <T extends DataObject> @NonNull NodeResult toNormalizedDataObject(final InstanceIdentifier<T> path,
93 return delegate().toNormalizedDataObject(path, data);
97 public ContainerNode toNormalizedNodeNotification(final Notification<?> data) {
98 return delegate().toNormalizedNodeNotification(data);
102 public ContainerNode toNormalizedNodeNotification(final Absolute path, final BaseNotification data) {
103 return delegate().toNormalizedNodeNotification(path, data);
107 public ContainerNode toNormalizedNodeRpcData(final DataContainer data) {
108 return delegate().toNormalizedNodeRpcData(data);
112 public ContainerNode toNormalizedNodeActionInput(final Class<? extends Action<?, ?, ?>> action,
113 final RpcInput input) {
114 return delegate().toNormalizedNodeActionInput(action, input);
118 public ContainerNode toNormalizedNodeActionOutput(final Class<? extends Action<?, ?, ?>> action,
119 final RpcOutput output) {
120 return delegate().toNormalizedNodeActionOutput(action, output);
124 public Entry<InstanceIdentifier<?>, DataObject> fromNormalizedNode(final YangInstanceIdentifier path,
125 final NormalizedNode data) {
126 return delegate().fromNormalizedNode(path, data);
130 public BaseNotification fromNormalizedNodeNotification(final Absolute path, final ContainerNode data) {
131 return delegate().fromNormalizedNodeNotification(path, data);
135 public BaseNotification fromNormalizedNodeNotification(final Absolute path, final ContainerNode data,
136 final Instant eventInstant) {
137 return delegate().fromNormalizedNodeNotification(path, data, eventInstant);
141 public DataObject fromNormalizedNodeRpcData(final Absolute containerPath, final ContainerNode data) {
142 return delegate().fromNormalizedNodeRpcData(containerPath, data);
146 public <T extends RpcInput> T fromNormalizedNodeActionInput(final Class<? extends Action<?, ?, ?>> action,
147 final ContainerNode input) {
148 return delegate().fromNormalizedNodeActionInput(action, input);
152 public <T extends RpcOutput> T fromNormalizedNodeActionOutput(final Class<? extends Action<?, ?, ?>> action,
153 final ContainerNode output) {
154 return delegate().fromNormalizedNodeActionOutput(action, output);
158 public Entry<YangInstanceIdentifier, BindingStreamEventWriter> newWriterAndIdentifier(
159 final InstanceIdentifier<?> path, final NormalizedNodeStreamWriter domWriter) {
160 return delegate().newWriterAndIdentifier(path, domWriter);
164 public BindingStreamEventWriter newWriter(final InstanceIdentifier<?> path,
165 final NormalizedNodeStreamWriter domWriter) {
166 return delegate().newWriter(path, domWriter);
170 public BindingStreamEventWriter newNotificationWriter(final Class<? extends Notification<?>> notification,
171 final NormalizedNodeStreamWriter streamWriter) {
172 return delegate().newNotificationWriter(notification, streamWriter);
176 public BindingStreamEventWriter newActionInputWriter(final Class<? extends Action<?, ?, ?>> action,
177 final NormalizedNodeStreamWriter domWriter) {
178 return delegate().newActionInputWriter(action, domWriter);
182 public BindingStreamEventWriter newActionOutputWriter(final Class<? extends Action<?, ?, ?>> action,
183 final NormalizedNodeStreamWriter domWriter) {
184 return delegate().newActionOutputWriter(action, domWriter);
188 public BindingStreamEventWriter newRpcWriter(final Class<? extends DataContainer> rpcInputOrOutput,
189 final NormalizedNodeStreamWriter streamWriter) {
190 return delegate().newRpcWriter(rpcInputOrOutput, streamWriter);
194 public <T extends DataObject> CodecWithPath<T> getSubtreeCodecWithPath(final InstanceIdentifier<T> path) {
195 return delegate().getSubtreeCodecWithPath(path);
199 public <A extends Augmentation<?>> BindingAugmentationCodecTreeNode<A> getAugmentationCodec(
200 final InstanceIdentifier<A> path) {
201 return delegate().getAugmentationCodec(path);
205 public <T extends DataObject> BindingDataObjectCodecTreeNode<T> getDataObjectCodec(
206 final InstanceIdentifier<T> path) {
207 return delegate().getDataObjectCodec(path);
211 public <T extends DataObject> CommonDataObjectCodecTreeNode<T> getSubtreeCodec(final InstanceIdentifier<T> path) {
212 return delegate().getSubtreeCodec(path);
216 public BindingCodecTreeNode getSubtreeCodec(final YangInstanceIdentifier path) {
217 return delegate().getSubtreeCodec(path);
221 public BindingCodecTreeNode getSubtreeCodec(final Absolute path) {
222 return delegate().getSubtreeCodec(path);
226 public BindingIdentityCodec getIdentityCodec() {
227 return delegate().getIdentityCodec();
231 public BindingInstanceIdentifierCodec getInstanceIdentifierCodec() {
232 return delegate().getInstanceIdentifierCodec();
236 public BindingRuntimeContext getRuntimeContext() {
237 return delegate().getRuntimeContext();
241 public <E extends DataObject> CommonDataObjectCodecTreeNode<E> getStreamChild(final Class<E> childClass) {
242 return delegate().getStreamChild(childClass);