2 * Copyright (c) 2015 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
8 package org.opendaylight.restconf.common.context;
10 import java.util.List;
12 import org.opendaylight.yangtools.yang.common.QName;
14 public final class WriterParameters {
15 private final String content;
16 private final Integer depth;
17 private final List<Set<QName>> fields;
18 private final boolean prettyPrint;
19 private final boolean tagged;
21 private WriterParameters(final WriterParametersBuilder builder) {
22 this.content = builder.content;
23 this.depth = builder.depth;
24 this.fields = builder.fields;
25 this.prettyPrint = builder.prettyPrint;
26 this.tagged = builder.tagged;
29 public String getContent() {
33 public Integer getDepth() {
37 public List<Set<QName>> getFields() {
41 public boolean isPrettyPrint() {
42 return this.prettyPrint;
45 public boolean isTagged() {
49 public static class WriterParametersBuilder {
50 private String content;
51 private Integer depth;
52 private List<Set<QName>> fields;
53 private boolean prettyPrint;
54 private boolean tagged;
56 public WriterParametersBuilder() {
60 public WriterParametersBuilder setContent(final String content) {
61 this.content = content;
65 public WriterParametersBuilder setDepth(final int depth) {
70 public WriterParametersBuilder setFields(final List<Set<QName>> fields) {
75 public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
76 this.prettyPrint = prettyPrint;
80 public WriterParameters build() {
81 return new WriterParameters(this);
84 public void setTagged(final boolean tagged) {