Apply modernizations
[netconf.git] / restconf / restconf-common / src / main / java / org / opendaylight / restconf / common / patch / 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 package org.opendaylight.restconf.common.patch;
9
10 import static java.util.Objects.requireNonNull;
11
12 import java.util.List;
13 import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
14 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
15
16 public class PatchContext {
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 = requireNonNull(context);
24         this.data = requireNonNull(data);
25         this.patchId = requireNonNull(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 }