Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-10078 Fix Automation limitations
  3. NXP-11787

Allow to use <String, Object> Properties parameter inside operations

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Automation

      Description

      The current Properties (org.nuxeo.ecm.automation.core.util.Properties) class in Automation only handles <String, String>.
      We need a "Properties" class that can handle the more generic <String, Object>.
      This is useful when executing a chain or operation directly from Java code (without using client - server).
      For instance, in the DAM bulk import process, I don't want to serialize all the filled metadata to JSON, to match <String, String>, and then to deserialize them to Object...

      What can be done:

      • introduce a new interface extending Map<String, Object>
      • add an implementation extending HashMap<String, Object>
      • update all Nuxeo operations using Properties to use this new interface/implementation
      • do the conversion Properties => TheNewPropertiesClass when binding a parameter of type TheNewPropertiesClass, if the given value is a Properties (=> backward compatibility)
      • deprecate Properties

      => Instead of dealing with String value from the Properties object, we will have to deal with Object in the operations, but at least we will be available to pass any Object we want and not just String...

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: