1ad69853d91528e745b74beb7d9dde9f35dab6c4
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / rest / impl / WriterParameters.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.netconf.sal.rest.impl;
9
10 @Deprecated(forRemoval = true, since = "2.0.6")
11 public final class WriterParameters {
12     static final WriterParameters EMPTY = new WriterParametersBuilder().build();
13
14     private final Integer depth;
15     private final boolean prettyPrint;
16
17     private WriterParameters(final WriterParametersBuilder builder) {
18         depth = builder.depth;
19         prettyPrint = builder.prettyPrint;
20     }
21
22     public Integer getDepth() {
23         return depth;
24     }
25
26     public boolean isPrettyPrint() {
27         return prettyPrint;
28     }
29
30     @Deprecated(forRemoval = true, since = "2.0.6")
31     public static final class WriterParametersBuilder {
32         private Integer depth;
33         private boolean prettyPrint;
34
35         public WriterParametersBuilder setDepth(final int depth) {
36             this.depth = depth;
37             return this;
38         }
39
40         public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
41             this.prettyPrint = prettyPrint;
42             return this;
43         }
44
45         public WriterParameters build() {
46             return new WriterParameters(this);
47         }
48     }
49 }