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.controller.cluster.datastore.messages;
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
16 public abstract class ModifyData implements SerializableMessage {
17 protected final YangInstanceIdentifier path;
18 protected final NormalizedNode<?, ?> data;
19 protected final SchemaContext schemaContext;
21 public ModifyData(YangInstanceIdentifier path, NormalizedNode<?, ?> data,
22 SchemaContext context) {
23 Preconditions.checkNotNull(context,
24 "Cannot serialize an object which does not have a schema schemaContext");
29 this.schemaContext = context;
32 public YangInstanceIdentifier getPath() {
36 public NormalizedNode<?, ?> getData() {