Class ConcreteTransformationService

    • Method Detail

      • valueToExtract

        public Object valueToExtract​(Object owner,
                                     Object modelValue,
                                     ViewNode node,
                                     ScopedViewContext context)
                              throws Exception
        Description copied from interface: TransformationService
        Derives the value to extract for a model property.

        Property listeners on the view context are first allowed to transform the value as desired. Then a value type converter (if available) is used to converter the transformed model value to its view representation.

        Specified by:
        valueToExtract in interface TransformationService
        Parameters:
        owner - owner of the property in the model
        modelValue - value of the property in model representation
        node - associated view node
        context - view context
        Returns:
        derived view property value
        Throws:
        Exception
      • valueToInject

        public Object valueToInject​(ViewEntity ownerEntity,
                                    Class<?> type,
                                    Object viewValue,
                                    ViewNode node,
                                    ScopedViewContext context)
                             throws Exception
        Description copied from interface: TransformationService
        Derives the value to inject for a model property.

        The view value is first converted to an instance of the model data type. Then property listeners on the view context are allowed to transform the value as desired to arrive at the resulting derived value.

        Specified by:
        valueToInject in interface TransformationService
        Parameters:
        ownerEntity - view entity representing the owner of the property
        type - property type in the model
        viewValue - value of the property in view representation
        node - associated view node
        context - view context
        Returns:
        derived model property value
        Throws:
        Exception