Class RenderUnit
java.lang.Object
org.apache.sling.scripting.sightly.render.RenderUnit
- All Implemented Interfaces:
Record<RenderUnit>
Basic unit of rendering. This also extends the record interface. The properties for a unit are the sub-units.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddSubTemplate(String name, RenderUnit renderUnit) protected voidcallUnit(PrintWriter out, RenderContext renderContext, Object templateObj, Object argsObj) getProperty(String name) Gets the value of a specified property.Gets the set of names for this record's properties.protected RenderUnit.FluentMapobj()protected abstract voidrender(PrintWriter out, Bindings bindings, Bindings arguments, RenderContext renderContext) final voidrender(PrintWriter out, RenderContext renderContext, Bindings arguments) Render the main script template
-
Constructor Details
-
RenderUnit
public RenderUnit()
-
-
Method Details
-
render
Render the main script template- Parameters:
out- thePrintWriterto which the commands are writtenrenderContext- the rendering contextarguments- the arguments for this unit
-
getProperty
Description copied from interface:RecordGets the value of a specified property.- Specified by:
getPropertyin interfaceRecord<RenderUnit>- Parameters:
name- the name of the property- Returns:
- the value of the property or
nullif this record does not have the specified property
-
getPropertyNames
Description copied from interface:RecordGets the set of names for this record's properties.- Specified by:
getPropertyNamesin interfaceRecord<RenderUnit>- Returns:
- this record's properties' names
-
render
protected abstract void render(PrintWriter out, Bindings bindings, Bindings arguments, RenderContext renderContext) -
callUnit
protected void callUnit(PrintWriter out, RenderContext renderContext, Object templateObj, Object argsObj) -
obj
-
addSubTemplate
-