Package net.officefloor.web.value.load
Class RootStatelessValueLoader
java.lang.Object
net.officefloor.web.value.load.RootStatelessValueLoader
- All Implemented Interfaces:
StatelessValueLoader
Root
StatelessValueLoader.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionRootStatelessValueLoader(Map<PropertyKey, StatelessValueLoader> valueLoaders, PropertyKeyFactory propertyKeyFactory) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidloadValue(Object object, String name, int nameIndex, String value, HttpValueLocation location, Map<PropertyKey, Object> state) Loads the value onto the object graph.voidvisitValueNames(Consumer<ValueName> visitor, String namePrefix, List<StatelessValueLoader> visitedLoaders) Traverses theValueNameinstances.
-
Constructor Details
-
RootStatelessValueLoader
public RootStatelessValueLoader(Map<PropertyKey, StatelessValueLoader> valueLoaders, PropertyKeyFactory propertyKeyFactory) Initiate.- Parameters:
valueLoaders-StatelessValueLoaderinstances byPropertyKey.propertyKeyFactory-PropertyKeyFactory.
-
-
Method Details
-
loadValue
public void loadValue(Object object, String name, int nameIndex, String value, HttpValueLocation location, Map<PropertyKey, Object> state) throws HttpExceptionDescription copied from interface:StatelessValueLoaderLoads the value onto the object graph.- Specified by:
loadValuein 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(Consumer<ValueName> visitor, String namePrefix, List<StatelessValueLoader> visitedLoaders) Description copied from interface:StatelessValueLoaderTraverses theValueNameinstances.- Specified by:
visitValueNamesin interfaceStatelessValueLoader- Parameters:
visitor- Visits theValueNameinstances.namePrefix- Prefix for name ofValueName.visitedLoaders- Tracks already visitedStatelessValueLoaderinstances. This avoids infinite loops in recursiveValueNameinstances.
-