Split out RFC8040-only constructs from yang-common
[netconf.git] / restconf / restconf-common / src / main / java / org / opendaylight / restconf / common / context / WriterParameters.java
index 03958b85870c9cd1e6165f30e82b14f7858a2398..aca8c5f43a3d55e6edbcbb58a0bf19383d3c3a26 100644 (file)
@@ -7,48 +7,23 @@
  */
 package org.opendaylight.restconf.common.context;
 
-import java.util.List;
-import java.util.Set;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-
-public final class WriterParameters {
+public class WriterParameters {
     static final WriterParameters EMPTY = new WriterParametersBuilder().build();
 
-    private final String content;
     private final Integer depth;
-    private final List<Set<QName>> fields;
-    private final List<YangInstanceIdentifier> fieldPaths;
     private final boolean prettyPrint;
     private final boolean tagged;
-    private final String withDefault;
 
-    private WriterParameters(final WriterParametersBuilder builder) {
-        content = builder.content;
+    protected WriterParameters(final WriterParametersBuilder builder) {
         depth = builder.depth;
-        fields = builder.fields;
-        fieldPaths = builder.fieldPaths;
         prettyPrint = builder.prettyPrint;
         tagged = builder.tagged;
-        withDefault = builder.withDefault;
-    }
-
-    public String getContent() {
-        return content;
     }
 
     public Integer getDepth() {
         return depth;
     }
 
-    public List<Set<QName>> getFields() {
-        return fields;
-    }
-
-    public List<YangInstanceIdentifier> getFieldPaths() {
-        return fieldPaths;
-    }
-
     public boolean isPrettyPrint() {
         return prettyPrint;
     }
@@ -57,53 +32,25 @@ public final class WriterParameters {
         return tagged;
     }
 
-    public String getWithDefault() {
-        return withDefault;
-    }
-
     public static class WriterParametersBuilder {
-        private String content;
         private Integer depth;
-        private List<Set<QName>> fields;
-        private List<YangInstanceIdentifier> fieldPaths;
         private boolean prettyPrint;
         private boolean tagged;
-        private String withDefault;
 
         public WriterParametersBuilder() {
 
         }
 
-        public WriterParametersBuilder setContent(final String content) {
-            this.content = content;
-            return this;
-        }
-
         public WriterParametersBuilder setDepth(final int depth) {
             this.depth = depth;
             return this;
         }
 
-        public WriterParametersBuilder setFields(final List<Set<QName>> fields) {
-            this.fields = fields;
-            return this;
-        }
-
-        public WriterParametersBuilder setFieldPaths(final List<YangInstanceIdentifier> fieldPaths) {
-            this.fieldPaths = fieldPaths;
-            return this;
-        }
-
         public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
             this.prettyPrint = prettyPrint;
             return this;
         }
 
-        public WriterParametersBuilder setWithDefault(final String withDefault) {
-            this.withDefault = withDefault;
-            return this;
-        }
-
         public WriterParameters build() {
             return new WriterParameters(this);
         }