summaryrefslogtreecommitdiffstats
path: root/node-admin/src/main
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2022-01-11 14:44:59 +0100
committerHåkon Hallingstad <hakon@yahooinc.com>2022-01-11 14:44:59 +0100
commitb75fc51e5d0f6f43dad8e999273e1754545a647f (patch)
tree691f11e983bd7119f72a2cca22f29a7d92da8f30 /node-admin/src/main
parent30d845367c9018a2f423b612c05b0ecf28c01fb4 (diff)
Rename to Template::newForm
Diffstat (limited to 'node-admin/src/main')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/IfSection.java6
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/ListSection.java3
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Template.java8
3 files changed, 5 insertions, 12 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/IfSection.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/IfSection.java
index 6bf2811d72e..8775e764b4f 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/IfSection.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/IfSection.java
@@ -9,15 +9,15 @@ import java.util.Optional;
/**
* @author hakonhall
*/
-public class IfSection extends Section {
+class IfSection extends Section {
private final boolean negated;
private final String name;
private final Cursor nameOffset;
private final SectionList ifSections;
private final Optional<SectionList> elseSections;
- public IfSection(CursorRange range, boolean negated, String name, Cursor nameOffset,
- SectionList ifSections, Optional<SectionList> elseSections) {
+ IfSection(CursorRange range, boolean negated, String name, Cursor nameOffset,
+ SectionList ifSections, Optional<SectionList> elseSections) {
super(range);
this.negated = negated;
this.name = name;
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/ListSection.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/ListSection.java
index aede0647683..bc68cf96153 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/ListSection.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/ListSection.java
@@ -8,9 +8,6 @@ import java.util.ArrayList;
import java.util.List;
/**
- * Represents a template list section, to be replaced by any number of body form elements.
- *
- * @see Template
* @author hakonhall
*/
class ListSection extends Section {
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Template.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Template.java
index c5b752f2d6e..344424c7946 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Template.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/Template.java
@@ -19,13 +19,9 @@ package com.yahoo.vespa.hosted.node.admin.task.util.template;
* <p>If the directive's end delimiter (}) is preceded by a "-" char, then any newline (\n)
* immediately following the end delimiter is removed.</p>
*
- * <p>To use the template, <b>Instantiate</b> it to get a form ({@link #instantiate()}), fill it (e.g.
+ * <p>To use the template create a form ({@link #newForm()}), fill the form (e.g.
* {@link Form#set(String, String) Form.set()}), and render the String ({@link Form#render()}).</p>
*
- * <p>A form (like a template) has direct sections, and indirect sections in the body of direct list
- * sections (recursively). The variables that can be set for a form, are the variables defined in
- * either direct or indirect variable sections.</p>
- *
* @see Form
* @see TemplateFile
* @author hakonhall
@@ -43,6 +39,6 @@ public class Template {
this.form = form;
}
- public Form instantiate() { return form.copy(); }
+ public Form newForm() { return form.copy(); }
}