Copyright© 2008-2026 Sitevision AB, all rights reserved.
@Requireable(value="TemporaryNodeBuilder") public interface TemporaryNodeBuilder extends Builder<Node>
Important note! Temporary nodes are very volatile and short-lived. They have no parent, nor any children. A temporary node can never be looked up by its identifier and it should never be cached. Temporary nodes should only be used for temporary purposes, typically during a single rendering phase.
See Builder for a comprehensive example of how to work with builders.
An instance of the Sitevision class implementing this interface can be obtained via
NodeFactoryUtil.getTemporaryNodeBuilder().
See NodeFactoryUtil for how to obtain an instance of the NodeFactoryUtil interface.
| Modifier and Type | Method and Description |
|---|---|
TemporaryNodeBuilder |
addBooleanProperty(String aName,
boolean aBoolean)
Adds a boolean property to this builder.
|
TemporaryNodeBuilder |
addCalendarProperty(String aName,
Calendar aCalendar)
Adds a Calendar property to this builder.
|
TemporaryNodeBuilder |
addDateProperty(String aName,
Date aDate)
Adds a Date property to this builder.
|
TemporaryNodeBuilder |
addDoubleProperty(String aName,
double aDouble)
Adds a double property to this builder.
|
TemporaryNodeBuilder |
addIntProperty(String aName,
int aInt)
Adds a int property to this builder.
|
TemporaryNodeBuilder |
addLongProperty(String aName,
long aLong)
Adds a long property to this builder.
|
TemporaryNodeBuilder |
addNodeProperty(String aName,
Node aNode)
Adds a Node property to this builder.
|
TemporaryNodeBuilder |
addNumericProperty(String aName,
Number aNumber)
Adds a numeric property (typically: Integer, Long or Double) to this builder.
|
TemporaryNodeBuilder |
addStringProperty(String aName,
String aString)
Adds a String property to this builder.
|
Node |
build()
Creates a volatile and short-lived temporary node using current state (name and properties).
|
TemporaryNodeBuilder |
clearAll()
Clears the state of this builder.
|
TemporaryNodeBuilder |
setName(String aNodeName)
Sets the name of the temporary node that can be built by this builder.
|
TemporaryNodeBuilder setName(String aNodeName)
aNodeName - the name of the nodeTemporaryNodeBuilder addStringProperty(String aName, String aString)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaString - the property valueTemporaryNodeBuilder addDateProperty(String aName, Date aDate)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaDate - the property valueTemporaryNodeBuilder addCalendarProperty(String aName, Calendar aCalendar)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaCalendar - the property valueTemporaryNodeBuilder addBooleanProperty(String aName, boolean aBoolean)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaBoolean - the property valueTemporaryNodeBuilder addIntProperty(String aName, int aInt)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaInt - the property valueTemporaryNodeBuilder addLongProperty(String aName, long aLong)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaLong - the property valueTemporaryNodeBuilder addDoubleProperty(String aName, double aDouble)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaDouble - the property valueTemporaryNodeBuilder addNumericProperty(String aName, Number aNumber)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaNumber - the property valueTemporaryNodeBuilder addNodeProperty(String aName, Node aNode)
Note! Any previously added property with name aName will be overwritten with the value of this add operation.
aName - the name of the propertyaNode - the property valueTemporaryNodeBuilder clearAll()
This method will set the name to null and remove all properties.
Node build() throws IllegalStateException
build in interface Builder<Node>IllegalStateException - if no node name is setSitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2026 Sitevision AB, all rights reserved.