Class Loop
- java.lang.Object
-
- com.cloudofficeprint.RenderElements.RenderElement
-
- com.cloudofficeprint.RenderElements.Loops.Loop
-
- Direct Known Subclasses:
InlineDataLoop
,Labels
,SheetLoop
,SlideLoop
,TableRowLoop
public class Loop extends RenderElement
Represents elements to be included in loops in templates.
-
-
Constructor Summary
Constructors Constructor Description Loop(java.lang.String name)
Loop elements for a template.Loop(java.lang.String name, RenderElement[] elements)
Loop elements for a template.Loop(java.lang.String name, java.util.ArrayList<RenderElement> elements)
Loop elements for a template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElement(RenderElement element)
java.util.ArrayList<RenderElement>
getElements()
com.google.gson.JsonObject
getJSON()
java.util.Set<java.lang.String>
getTemplateTags()
void
setElements(java.util.ArrayList<RenderElement> elements)
-
Methods inherited from class com.cloudofficeprint.RenderElements.RenderElement
getName, getValue, setName, setValue
-
-
-
-
Constructor Detail
-
Loop
public Loop(java.lang.String name, java.util.ArrayList<RenderElement> elements)
Loop elements for a template.- Parameters:
name
- Name of this loop for the tag.elements
- Elements to replace the tag with.
-
Loop
public Loop(java.lang.String name, RenderElement[] elements)
Loop elements for a template.- Parameters:
name
- Name of this loop for the tag.elements
- Elements to replace the tag with.
-
Loop
public Loop(java.lang.String name)
Loop elements for a template.- Parameters:
name
- Name of this loop for the tag.
-
-
Method Detail
-
getElements
public java.util.ArrayList<RenderElement> getElements()
- Returns:
- All the elements of the loop.
-
setElements
public void setElements(java.util.ArrayList<RenderElement> elements)
- Parameters:
elements
- All the elements of the loop.
-
addElement
public void addElement(RenderElement element)
- Parameters:
element
- RenderElement to add to the loop.
-
getJSON
public com.google.gson.JsonObject getJSON()
- Specified by:
getJSON
in classRenderElement
- Returns:
- JSONObject with the tags for this element for the Cloud Office Print server.
-
getTemplateTags
public java.util.Set<java.lang.String> getTemplateTags()
- Specified by:
getTemplateTags
in classRenderElement
- Returns:
- An immutable set containing all available template tags this element can replace.
-
-