Package net.officefloor.web.value.load
Class RootStatelessValueLoader
- java.lang.Object
-
- net.officefloor.web.value.load.RootStatelessValueLoader
-
- All Implemented Interfaces:
StatelessValueLoader
public class RootStatelessValueLoader extends java.lang.Object implements StatelessValueLoader
RootStatelessValueLoader
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description RootStatelessValueLoader(java.util.Map<PropertyKey,StatelessValueLoader> valueLoaders, PropertyKeyFactory propertyKeyFactory)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
loadValue(java.lang.Object object, java.lang.String name, int nameIndex, java.lang.String value, HttpValueLocation location, java.util.Map<PropertyKey,java.lang.Object> state)
Loads the value onto the object graph.void
visitValueNames(java.util.function.Consumer<ValueName> visitor, java.lang.String namePrefix, java.util.List<StatelessValueLoader> visitedLoaders)
Traverses theValueName
instances.
-
-
-
Constructor Detail
-
RootStatelessValueLoader
public RootStatelessValueLoader(java.util.Map<PropertyKey,StatelessValueLoader> valueLoaders, PropertyKeyFactory propertyKeyFactory)
Initiate.- Parameters:
valueLoaders
-StatelessValueLoader
instances byPropertyKey
.propertyKeyFactory
-PropertyKeyFactory
.
-
-
Method Detail
-
loadValue
public void loadValue(java.lang.Object object, java.lang.String name, int nameIndex, java.lang.String value, HttpValueLocation location, java.util.Map<PropertyKey,java.lang.Object> state) throws HttpException
Description copied from interface:StatelessValueLoader
Loads the value onto the object graph.- Specified by:
loadValue
in interfaceStatelessValueLoader
- Parameters:
object
- Root object of the graph to have the value loaded.name
- Full property name.nameIndex
- Index into property name to identify particular property name for next stringed property to load.value
- Property value.location
-HttpValueLocation
.state
- State of loading values to the Object graph.- Throws:
HttpException
- If fails to load the value.
-
visitValueNames
public void visitValueNames(java.util.function.Consumer<ValueName> visitor, java.lang.String namePrefix, java.util.List<StatelessValueLoader> visitedLoaders)
Description copied from interface:StatelessValueLoader
Traverses theValueName
instances.- Specified by:
visitValueNames
in interfaceStatelessValueLoader
- Parameters:
visitor
- Visits theValueName
instances.namePrefix
- Prefix for name ofValueName
.visitedLoaders
- Tracks already visitedStatelessValueLoader
instances. This avoids infinite loops in recursiveValueName
instances.
-
-