Class RootValueRetrieverImpl<T>

java.lang.Object
net.officefloor.web.value.retrieve.RootValueRetrieverImpl<T>
All Implemented Interfaces:
ValueRetriever<T>

public class RootValueRetrieverImpl<T> extends Object implements ValueRetriever<T>
ValueRetriever implementation.
Author:
Daniel Sagenschneider
  • Constructor Details

    • RootValueRetrieverImpl

      public RootValueRetrieverImpl(PropertyMetaData[] properties, boolean isCaseInsensitive)
      Initiate.
      Parameters:
      properties - PropertyMetaData instances.
      isCaseInsensitive - Indicates if case insensitive.
  • Method Details

    • getValueType

      public Class<?> getValueType(String name) throws HttpException
      Description copied from interface: ValueRetriever
      Obtains the value type for the property on the object graph. It may be null indicating the path does not exist on the bean graph.
      Specified by:
      getValueType in interface ValueRetriever<T>
      Parameters:
      name - Property name.
      Returns:
      Value type. May be null if the path not exists.
      Throws:
      HttpException - If fails to determine if value is retrievable.
    • getValueAnnotation

      public <A> A getValueAnnotation(String name, Class<A> annotationType) throws HttpException
      Description copied from interface: ValueRetriever
      Obtains the value annotation for the property on the object graph. It may be null indicating either:
      • the path does not exist on the bean graph, or
      • no annotation by type for property
      Specified by:
      getValueAnnotation in interface ValueRetriever<T>
      Type Parameters:
      A - Annotation type.
      Parameters:
      name - Property name.
      annotationType - Annotation type.
      Returns:
      Annotation. May be null.
      Throws:
      HttpException - If fails to obtain annotation.
    • retrieveValue

      public Object retrieveValue(T object, String name) throws HttpException
      Description copied from interface: ValueRetriever
      Retrieves the value from the object graph.
      Specified by:
      retrieveValue in interface ValueRetriever<T>
      Parameters:
      object - Root object of the object graph.
      name - Property name.
      Returns:
      Property value.
      Throws:
      HttpException - If fails to retrieve the value.