jsr-333
  1. jsr-333
  2. JSR_333-63

Provide the [property|node]Type information in Event objets

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: api
    • Labels:
      None

      Description

      When using Observation, it is useful to filter out events based on the [node|property]Type of the resource at Event#getPath().

      The mechanism to add Event listener allow filtering on nodeTypes but only on parent nodes. Thus, it quickly becomes necessary to load the the referenced node from the repository in order to filter it.
      In cases where most of the events are filtered out ultimately, we would have wasted quite some time to load nodes for nothing.

      In order to avoid loading unneeded nodes, It may make sense to add the nodeType and propertyType information right into the Event.

      Two possibilities to enable that:

      1. Adding the method: "String Event#getItemType()" to the Event API.
      2. Pass the type information by default as a field in the info Map, retrieved through Event#getInfo() and document it

        Activity

        Hide
        Peeter Piegaze added a comment -

        @reschke, do you have an opinion on this.

        Anyone?

        Show
        Peeter Piegaze added a comment - @reschke, do you have an opinion on this. Anyone?
        Hide
        Peeter Piegaze added a comment -

        I have added the following methods in spec and src:

        Event.getPrimaryNodeType()
        Event.getMixinTypes()
        Event.getPropertyType()

        The details are explained in the Event interface javadoc and the Observation section of the spec.

        Show
        Peeter Piegaze added a comment - I have added the following methods in spec and src: Event.getPrimaryNodeType() Event.getMixinTypes() Event.getPropertyType() The details are explained in the Event interface javadoc and the Observation section of the spec.

          People

          • Assignee:
            Unassigned
            Reporter:
            Timothee Maret
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: