<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:46 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[MDSAL-151] Add &quot;add&quot;/&quot;del&quot; utility methods to builders.</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-151</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;It will make it much easier to work with List properties if in addition to setter &amp;amp; getter we can add &quot;adder&quot; &amp;amp; &quot;remover&quot; of elements, e.g. if the property type is List&amp;lt;Node&amp;gt; and today we have &quot;void setNode(List&amp;lt;Node&amp;gt; node)&quot; &amp;amp; &quot;List&amp;lt;Node&amp;gt; getNodes()&quot;, we should add also &quot;void addNode(Node node)&quot; and &quot;delNode(Node node)&quot; to make it easy to use.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26973">MDSAL-151</key>
            <summary>Add &quot;add&quot;/&quot;del&quot; utility methods to builders.</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="JieHan2017">Jie Han</assignee>
                                    <reporter username="saichler@cisco.com">Sharon Aicler</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Apr 2016 20:33:19 +0000</created>
                <updated>Thu, 13 Sep 2018 02:48:12 +0000</updated>
                            <resolved>Thu, 13 Sep 2018 02:48:12 +0000</resolved>
                                                                    <component>Binding V2 codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="54284" author="dhevendran.k@tcs.com" created="Tue, 17 May 2016 04:23:02 +0000"  >&lt;p&gt;(In reply to Sharon Aicler from comment #0)&lt;br/&gt;
&amp;gt; It will make it much easier to work with List properties if in addition to&lt;br/&gt;
&amp;gt; setter &amp;amp; getter we can add &quot;adder&quot; &amp;amp; &quot;remover&quot; of elements, e.g. if the&lt;br/&gt;
&amp;gt; property type is List&amp;lt;Node&amp;gt; and today we have &quot;void setNode(List&amp;lt;Node&amp;gt;&lt;br/&gt;
&amp;gt; node)&quot; &amp;amp; &quot;List&amp;lt;Node&amp;gt; getNodes()&quot;, we should add also &quot;void addNode(Node&lt;br/&gt;
&amp;gt; node)&quot; and &quot;delNode(Node node)&quot; to make it easy to use.&lt;/p&gt;

&lt;p&gt;Hi Sharon Aicler&lt;/p&gt;

&lt;p&gt;I can take up this . Can you provide us more details on this requirement &lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; Regards,&lt;br/&gt;
Dhevendran K&lt;/p&gt;</comment>
                            <comment id="54285" author="saichler@cisco.com" created="Wed, 18 May 2016 18:05:06 +0000"  >&lt;p&gt;Hi Dhevendran,&lt;br/&gt;
This is pretty simple.... say today you have a yang def as follows:&lt;br/&gt;
container my-container{&lt;br/&gt;
    list my-list {&lt;br/&gt;
    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Today the generated method inside MyContainer builder will be:&lt;br/&gt;
     public void setMyList(List&amp;lt;MyList&amp;gt; lst)&lt;/p&gt;
{
              impl.myList = lst;
     }&lt;br/&gt;
     public List&amp;lt;MyList&amp;gt; getMyKList(){
              return impl.myList;
     }&lt;br/&gt;
&lt;br/&gt;
I am suggesting add helper methods of &quot;add&quot; and &quot;del&quot;&lt;br/&gt;
     public void setMyList(List&amp;lt;MyList&amp;gt; lst){              impl.myList = lst;     }
&lt;p&gt;     public List&amp;lt;MyList&amp;gt; getMyKList()&lt;/p&gt;
{
              return impl.myList;
     }
&lt;p&gt;     public void addMyList(MyList element){&lt;br/&gt;
            if(this.impl.myList==null)&lt;/p&gt;
{
                 this.impl.myList = new ArrayList();
            }
&lt;p&gt;            this.impl.myList.add(element);&lt;br/&gt;
     }&lt;br/&gt;
     public void delMyList(MyList element)&lt;/p&gt;
{
           this.impl.myList.remove(element);
     }

&lt;p&gt;So bottom line a developer should not instantiate a list every time and allow the builder to do it.&lt;/p&gt;</comment>
                            <comment id="54286" author="dhevendran.k@tcs.com" created="Wed, 25 May 2016 03:34:54 +0000"  >&lt;p&gt;H Sharon Aicler&lt;/p&gt;

&lt;p&gt;Thanks for your input. I will get back to you on this&lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; Regards,&lt;br/&gt;
Dhevendran K&lt;/p&gt;</comment>
                            <comment id="54287" author="alay1431@gmail.com" created="Wed, 28 Dec 2016 20:35:49 +0000"  >&lt;p&gt;Hey Sharon,&lt;/p&gt;

&lt;p&gt;I think one can add the method signatures to ChildOf node in listToGenType method, and then in the BaseTemplate.xtend define methods to generate adder and remover methods by getting the method signatures through type.getMethodSignatures() in BaseTemplate.&lt;/p&gt;

&lt;p&gt;Is this a natural way of achieving it?&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Alay&lt;/p&gt;</comment>
                            <comment id="60962" author="jiehan2017" created="Wed, 7 Feb 2018 06:58:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/67999/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/67999/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5673</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=5673]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10305"><![CDATA[Improvement]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02wmn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>