9e1ff98e08d131b61a41460987f286abbe7a4ab1
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / restconf / impl / PatchContext.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.netconf.sal.restconf.impl;
10
11 import com.google.common.base.Preconditions;
12 import java.util.List;
13 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
14
15 public class PatchContext {
16
17     private final InstanceIdentifierContext<? extends SchemaNode> context;
18     private final List<PatchEntity> data;
19     private final String patchId;
20
21     public PatchContext(final InstanceIdentifierContext<? extends SchemaNode> context,
22                         final List<PatchEntity> data, final String patchId) {
23         this.context = Preconditions.checkNotNull(context);
24         this.data = Preconditions.checkNotNull(data);
25         this.patchId = Preconditions.checkNotNull(patchId);
26     }
27
28     public InstanceIdentifierContext<? extends SchemaNode> getInstanceIdentifierContext() {
29         return context;
30     }
31
32     public List<PatchEntity> getData() {
33         return data;
34     }
35
36     public String getPatchId() {
37         return patchId;
38     }
39 }