Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      The class org.apache.velocity.runtime.resource.ResourceFactory provides
      no mechanism for allowing sub-classes of Template or ContentResources
      to be returned.

      Since ResourceManagerImpl makes a call to ResourceFactory.getResource(),
      the only way to override the behavior is to subclass ResourceManagerImpl
      and cut-paste-then-modify the code for loadResource().

      At the very least, moving the ResourceFactory.getResource() call into
      a separate, protected method in ResourceManagerImpl would greatly simplify
      sub-classing Templates and/or ContentResources.

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551564 ] jira [ 12552449 ]
        Mark Thomas made changes -
        Workflow jira [ 12325102 ] Default workflow, editable Closed status [ 12551564 ]
        Nathan Bubna made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.6 [ 12310290 ]
        Henning Schmiedehausen made changes -
        Affects Version/s 1.5 [ 12310253 ]
        Affects Version/s 1.6 [ 12310290 ]
        Component/s Source [ 12310214 ]
        Bugzilla Id 24758
        Component/s Engine [ 12311337 ]
        Will Glass-Husain made changes -
        Bugzilla Id 24758
        Affects Version/s 1.6 [ 12310290 ]
        Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
        Environment Operating System: All
        Platform: All
        Operating System: All
        Platform: All
        Affects Version/s 1.5 [ 12310253 ]
        Description The class org.apache.velocity.runtime.resource.ResourceFactory provides
        no mechanism for allowing sub-classes of Template or ContentResources
        to be returned.

        Since ResourceManagerImpl makes a call to ResourceFactory.getResource(),
        the only way to override the behavior is to subclass ResourceManagerImpl
        and cut-paste-then-modify the code for loadResource().

        At the very least, moving the ResourceFactory.getResource() call into
        a separate, protected method in ResourceManagerImpl would greatly simplify
        sub-classing Templates and/or ContentResources.
        The class org.apache.velocity.runtime.resource.ResourceFactory provides
        no mechanism for allowing sub-classes of Template or ContentResources
        to be returned.

        Since ResourceManagerImpl makes a call to ResourceFactory.getResource(),
        the only way to override the behavior is to subclass ResourceManagerImpl
        and cut-paste-then-modify the code for loadResource().

        At the very least, moving the ResourceFactory.getResource() call into
        a separate, protected method in ResourceManagerImpl would greatly simplify
        sub-classing Templates and/or ContentResources.
        Jeff Turner made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 24758 12315097
        Charles Morehead created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Charles Morehead
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development