Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4263

Iron out Spring configuration for page model pipeline

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.3.0
    • None
    • None

    Description

      Most of below are questions / remarks wrt the Spring wiring of the new page model pipeline introduced in HSTTWO-4227:

      below are remarks questions wrt SpringComponentManager-pagemodel.xml

      1) Should the pageModelPipeline contain the following valves?

             
      <ref bean="actionValve" />
      <ref bean="resourceServingValve" />
      
      <ref bean="esiPageInfoScanningValve" />
      <ref bean="componentRenderingValve" />
      

      Does the page model pipeline support action and resource urls? AFAICS, at least we can for now at least remove 'esiPageInfoScanningValve' : I don't see a use case for it. Apart from that, as long as we do not have use cases for actions, resource or component rendering valves, we can opt to leave them out now and if needed add them later. I think that is a safer approach. WDYT?

      2) Why is the class 'HstBeansExcludingObjectMapperDecorator' not called 'HstBeansObjectMapperDecorator'? Afaics you are not excluding the hst beans, but decorating them with mixins isn't?

      Why does 'HstBeansExcludingObjectMapperDecorator' contain #getDefaultMixins and #setDefaultMixins and #getExtraMixins ? Afaics, only the #setExtraMixins is needed.

      3) For what reason do we need the 'pageModelAnnotationIntrospector' below:

        <bean id="pageModelAnnotationIntrospector"
              class="com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector">
        </bean>
      
        <bean id="pageModelJacksonObjectMapper"
              class="org.hippoecm.hst.site.container.TypeDeterminedMethodInvokingFactoryBean">
          <constructor-arg value="com.fasterxml.jackson.databind.ObjectMapper" />
          <property name="targetObject" ref="org.hippoecm.hst.core.pagemodel.container.HstBeansExcludingObjectMapperDecorator" />
          <property name="targetMethod" value="decorate" />
          <property name="arguments">
            <list>
              <bean class="com.fasterxml.jackson.databind.ObjectMapper">
                <property name="annotationIntrospector" ref="pageModelAnnotationIntrospector" />
              </bean>
            </list>
          </property>
        </bean>
      

      what is the difference with:

        <bean id="pageModelJacksonObjectMapper"
              class="org.hippoecm.hst.site.container.TypeDeterminedMethodInvokingFactoryBean">
          <constructor-arg value="com.fasterxml.jackson.databind.ObjectMapper" />
          <property name="targetObject" ref="org.hippoecm.hst.core.pagemodel.container.HstBeansExcludingObjectMapperDecorator" />
          <property name="targetMethod" value="decorate" />
          <property name="arguments">
            <list>
              <bean class="com.fasterxml.jackson.databind.ObjectMapper"/>
            </list>
          </property>
        </bean>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: