Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-103

Provide an automatic way to assign nested properties to a given properties.

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • 0.3.0
    • None
    • None
    • None
    • All
    • GreenHopper Ranking:
      0|i0t06z:
    • 9223372036854775807
    • Small

    Description

      Component Wizard may save multiple ComponentProperties types.
      1) We need a way to find out which components are compatible with a set of Properties.
      I propose to update the service api from

      org.talend.components.api.service.ComponentService
      List<ComponentDefinition> getPossibleComponents(ComponentProperties properties) throws Throwable;
      

      to

      org.talend.components.api.service.ComponentService
      List<ComponentDefinition> getPossibleComponents(ComponentProperties... properties) throws Throwable;
      

      Notice the 3 dots that change the method signature to accet an array but does not break the APIs

      2) we need to be able to assign those set of properties to a given component Properties.
      I propose to add the following method to Daikon

      org.talend.daikon.properties.Properties
          /**
           * This goes through all nested properties recusively and replace them with the newValueProperties given as
           * parameters as long as they are assignable to the Properties type. <br/>
           * Once the property is assigned it will not be recusively scanned. But if many nested Properties have the
           * appropriate type they will all be assigned to the new value.
           * 
           * @param properties list of Properties to be assigned to this instance nested Properties
           */
          public void assignNestedProperties(Properties... newValueProperties) 

      Attachments

        Activity

          People

            fupton Francis Upton
            sgandon sebastien gandon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: