Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25402

Handle Duration deserialisation in descriptor

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Component/s: Runtime
    • Upgrade notes:
      Hide

      You can now use Duration type into your descriptors.
      Nuxeo handles the JDK Duration format (PT10M, PT200S, PT0.500S) or a specific format for days, hours, minutes, seconds and milliseconds (10m, 200s, 500ms).

      Show
      You can now use Duration type into your descriptors. Nuxeo handles the JDK Duration format (PT10M, PT200S, PT0.500S) or a specific format for days, hours, minutes, seconds and milliseconds (10m, 200s, 500ms).
    • Sprint:
      nxcore 10.3.4
    • Story Points:
      2

      Description

      Duration unit is often something hard to know when you read code. In java, we usually use long type and suppose this is milliseconds. But this is not always the case.

      What we start to do to fix this misunderstanding is to put the unit in the key but this is noise !

      An elegant solution would be to handle Duration deserialisation in descriptors. As it, we will be able to write elegant stuff like:

      <extension target="org.nuxeo.my.service.SuperService" point="extension">
        <property>3s</property>
      </extension>
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h