Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Final
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      Extract VariablePointerFactory interface from JXPathContextReferenceImpl, and pull up using of it to JXPathContext

      1. VariablePointerFactoryTest.java
        2 kB
        Sergey Vladimirov
      2. patch.txt
        9 kB
        Sergey Vladimirov

        Activity

        Sergey Vladimirov created issue -
        Hide
        Sergey Vladimirov added a comment -

        Implementation

        Show
        Sergey Vladimirov added a comment - Implementation
        Sergey Vladimirov made changes -
        Field Original Value New Value
        Attachment patch.txt [ 12361852 ]
        Sergey Vladimirov made changes -
        Attachment patch.txt [ 12361852 ]
        Hide
        Sergey Vladimirov added a comment -

        Fixed copyrights

        Show
        Sergey Vladimirov added a comment - Fixed copyrights
        Sergey Vladimirov made changes -
        Attachment patch.txt [ 12361853 ]
        Hide
        Sergey Vladimirov added a comment -

        Test case

        Show
        Sergey Vladimirov added a comment - Test case
        Sergey Vladimirov made changes -
        Attachment VariablePointerFactoryTest.java [ 12361854 ]
        Matt Benson made changes -
        Assignee Matt Benson [ mbenson ]
        Matt Benson made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Matt Benson added a comment -

        There are many reasons this could not be implemented as requested. You have placed dependencies in JXPathContext upon NodePointer, etc., from the reference implementation. What I have done is change the RI such that it delegates the creation of variable pointers to the registered NodePointerFactories as it does with the other various nodes in a given graph, wrapping the context itself in a type that the new VariablePointerFactory NodePointerFactory implementation recognizes. Now you will extend the RI in much the same way as you would any other time you needed to add a custom NodePointerFactory, except that you will trigger your VariablePointerFactory, or replacement thereof, on the VariablePointerFactory.VariableContextWrapper bean type. Since the default implementation is now being used for the creation of VariablePointers the existing testcases validate that this functionality is working properly.

        Best,
        Matt

        Show
        Matt Benson added a comment - There are many reasons this could not be implemented as requested. You have placed dependencies in JXPathContext upon NodePointer, etc., from the reference implementation. What I have done is change the RI such that it delegates the creation of variable pointers to the registered NodePointerFactories as it does with the other various nodes in a given graph, wrapping the context itself in a type that the new VariablePointerFactory NodePointerFactory implementation recognizes. Now you will extend the RI in much the same way as you would any other time you needed to add a custom NodePointerFactory, except that you will trigger your VariablePointerFactory, or replacement thereof, on the VariablePointerFactory.VariableContextWrapper bean type. Since the default implementation is now being used for the creation of VariablePointers the existing testcases validate that this functionality is working properly. Best, Matt
        Matt Benson made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        Sergey Vladimirov added a comment -

        It will be nice to add test case to SVN as well
        As an example for me

        Show
        Sergey Vladimirov added a comment - It will be nice to add test case to SVN as well As an example for me
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        3d 6h 9m 1 Matt Benson 18/Jul/07 20:23
        In Progress In Progress Resolved Resolved
        21m 12s 1 Matt Benson 18/Jul/07 20:44

          People

          • Assignee:
            Matt Benson
            Reporter:
            Sergey Vladimirov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development