[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-c-dev
Subject:    Re: [Dev] GSoC2016-Contact Development Team Feature
From:       Nathiesha Maddage <nathieshamaddage () gmail ! com>
Date:       2016-07-29 11:50:32
Message-ID: CAN3G77ifzKcQv5H5=6YOfJr8sV8Bi5sq-wzDiWMw20KVLoU-FQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Jasintha and Kavith,

Here is the project plan for the upcoming 3/4 weeks.

          *July 30th-1st Aug*


   -  Add and configure pom.xml
   -  Use Maven tycho plugin
   -  Build project using Maven



          *2nd Aug-6th Aug*


   - Write a REST web service to publish errors, deploy in tomcat and
   testing.
   -  Add options for the current plugin project to use above web service
   -  Add current project classes and methods to be comply with above
   changes


          *7th Aug-11th Aug*


   - Define an extension point of the plugin
   -  Add methods to get the registered plugins and their Project keys, to
   maintain a map
   - Add methods to group errors under their required plugins
   -  Change the publisher methods to create multiple issues in Jira


          *12th Aug -15th Aug*


   - Improve ErrorPublisher interfaces
   -  Write OSGI services for ErrorPublisher interfaces



          *16th Aug – 17th Aug*


   - Create Feature Project using the plugin


        * 18th Aug – 20th Aug*


   -  Refine the code
   -  Fix bugs
   - Testing


         *21st Aug – 22nd Aug*


   -  Documentation


Thanks and regards

Nathiesha


On Fri, Jul 29, 2016 at 9:48 AM, Nathiesha Maddage <
nathieshamaddage@gmail.com> wrote:

> Hi all,
>
> Here are the minutes of the meeting I had yesterday (28/07/16) with
> Jasintha and Kavith.
>
> During the meeting the current project progress was discussed and
> suggestions were made to improve and finalize the development of the
> project. Listed below are the key points discussed during the meeting.
>
> 1.       Instructions were given on how to add pom.xml, to change its
> fields to match with the project , to use Maven tycho plugin and to build
> the project using maven.
>
> 2.       Suggestions were made on creating and improving interfaces like
> ErrorPublisher and ReportGenerator, and how to call the publish method of
> all the registered publishers using an iterator in the main controller
> class.
>
> 3.       We planned to add another option for the user, where he does not
> have any gmail and jira credentials, but a remote server would take care of
> publishing the error using a common general account. For that I was asked
> to write a REST web service that would handle this procedure, and to deploy
> it in tomcat for testing. Possibility of using micro services for this was
> also discussed.
>
> 4.       We planned to add multiple project keys for the jira create
> issue option where required, and to assign the project key based on the
> plugin that is responsible for the error. For that purpose, it was
> suggested to create an extension point of the project, so other plugins can
> extend it and define their own project key. Using this all the plugins that
> have extended the error reporter plugin and their respective project keys
> can be fetched, and a map can be maintained, to be used during the error
> reporting process.
>
> 5.       To expose the Publisher classes, OSGI services will be
> introduced to the project.
>
> 6.       It was suggested to create a feature by adding this plugin.
>
>
> Furthermore instructions were given on the documentation required for the
> project, and time frame for documentation was suggested. And I was asked to
> send a project plan for the upcoming 3 weeks.
>
>
> Thanks and regards
>
> Nathiesha
>
>
> On Tue, Jul 26, 2016 at 7:39 AM, Nathiesha Maddage <
> nathieshamaddage@gmail.com> wrote:
>
>> Hi Kavith,
>>
>> I accepted the invitation.
>>
>> Thanks and regards
>> Nathiesha
>>
>> On Mon, Jul 25, 2016 at 8:42 PM, Kavith Lokuhewage <kavith@wso2.com>
>> wrote:
>>
>>> Hi Nathiesha,
>>>
>>> I have sent the invitation for the meeting at 2pm-3pm on 28/07/2016 [1].
>>>
>>> Thanks,
>>>
>>> [1] https://goo.gl/PLEWQd
>>>
>>>
>>> *Kavith Lokuhewage*
>>> Senior Software Engineer
>>> WSO2 Inc. - http://wso2.com
>>> lean . enterprise . middleware
>>> Mobile - +94779145123
>>> Linkedin <http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419>
>>> Twitter <https://twitter.com/KavithThiranga>
>>>
>>> On Mon, Jul 25, 2016 at 8:13 PM, Nathiesha Maddage <
>>> nathieshamaddage@gmail.com> wrote:
>>>
>>>> Hi Kavith,
>>>>
>>>> How about Thursday evening, for the meeting? I am free after 1 pm.
>>>>
>>>> Thank you for the examples. I was going to refactor the code by
>>>> introducing the interfaces as you suggested during the mid evaluation. But
>>>> I was not sure how to do that. I will try to change the code as given in
>>>> the examples before the next meeting.
>>>>
>>>> I think it is good to start converting the project to a maven project
>>>> as only a few weeks remaining to finalize the project. We can discuss about
>>>> that during the meeting.
>>>>
>>>> Thanks and regards
>>>>
>>>> Nathiesha
>>>>
>>>> On Mon, Jul 25, 2016 at 3:10 PM, Kavith Lokuhewage <kavith@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Nathiesha,
>>>>>
>>>>> I noticed that there are some more pending tasks to restructure the
>>>>> code base as per the discussion we had during last code review. Just
>>>>> putting them down here again, so that you are able to go through again and
>>>>> complete any missing parts.
>>>>>
>>>>> *Introduce interfaces for the each sub component  to decouple main
>>>>> controller logic from implementation specific things*
>>>>>
>>>>> For example, right now, the controller class (ErrorReporter) is hardly
>>>>> coupled with EmailSender and RemoteJiraConnector. We can think latter two
>>>>> as error report publishers and introduce an interface called ErrorPublisher
>>>>> as below.
>>>>>
>>>>> public interface ErrorPublisher{
>>>>>     void publish(ReportGenerator reportGen) throws IOException;
>>>>> }
>>>>>
>>>>> And then EmailSender and RemoreJiraConnector classes can be refactored
>>>>> like below.
>>>>>
>>>>> public class EmailPublisher implements ErrorPublisher{
>>>>>
>>>>>      void init () throws IOException{
>>>>>        //init : read preferences for SMTP connection params
>>>>>      }
>>>>>
>>>>>     // implement publish method
>>>>>     void publish(ReportGenerator reportGen) throws IOException{
>>>>>         init();
>>>>>        //send mail
>>>>>     }
>>>>> }
>>>>>
>>>>> public class JiraPublisher implements ErrorPublisher{
>>>>>
>>>>>      void init () throws IOException{
>>>>>           //init : read preferences for JIRA resp API connection
>>>>> params
>>>>>      }
>>>>>
>>>>>    // implement publish method
>>>>>    void publish(ReportGenerator reportGen) throws IOException{
>>>>>        init();
>>>>>       //post to JIRA api and create issue
>>>>>    }
>>>>> }
>>>>>
>>>>> Finally refactor ErrorReporter class to use only ErrorPublisher
>>>>> interface. Further more, introduce methods to bind/unbind error publishers.
>>>>>
>>>>> public class ErrorReporter {
>>>>>     Map<String, ErrorPublisher> registeredPublishers;
>>>>>
>>>>>     public void addPublisher (String id, ErrorPublisher publisher){
>>>>>        registeredPublishers.put(id,publisher);
>>>>>    }
>>>>>
>>>>>   public void reportError(){
>>>>>          //iterate over all publishers
>>>>>          // and call  publish() method
>>>>>   }
>>>>> }
>>>>>
>>>>> (We can further ErrorReporter class by using OSGI services to let
>>>>> other devstudio plugins to contribute publishers as needed - we can do that
>>>>> later as time permits)
>>>>>
>>>>> For another example, currently you have used a class
>>>>> called ReportGenerator to generate the report in plain text and directly
>>>>> used that generator inside main controller. Instead, you can introduce an
>>>>> interface called ReportGenerator and create a class called
>>>>> TextReportGenerator and move the code there - and decouple main controller
>>>>> and let other people add report generators later (say an HTML report
>>>>> generator) as needed. It can be done in same manner as above example I have
>>>>> provided .
>>>>>
>>>>> Once you do above restructuring, we can further improve the code to
>>>>> use OSGI services to decouple these components even further.
>>>>>
>>>>> Finally, I think it is time for us to convert the project to a maven
>>>>> project and use tycho maven plugins for building it. I can assist you with
>>>>> this task - let's discuss this furthermore during the call. The main
>>>>> requirement here is to make this project directly mergable to developer
>>>>> studio repository. Since we are now reaching to the final weeks of GSOC
>>>>> coding period, I think we should concentrate a little more on this task.
>>>>>
>>>>> Please a suggest a time for the meeting so we are able to discuss
>>>>> these in-detail.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> *Kavith Lokuhewage*
>>>>> Senior Software Engineer
>>>>> WSO2 Inc. - http://wso2.com
>>>>> lean . enterprise . middleware
>>>>> Mobile - +94779145123
>>>>> Linkedin <http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419>
>>>>> Twitter <https://twitter.com/KavithThiranga>
>>>>>
>>>>> On Mon, Jul 25, 2016 at 2:11 PM, Kavith Lokuhewage <kavith@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Nathiesha,
>>>>>>
>>>>>> There were some changes done to preference API since Eclipse Mars. I
>>>>>> suspect that the root cause for the issue should be it. I will go through
>>>>>> the changes we did in Developer Studio to fix issues with new pref API and
>>>>>> confirm you whether it is the root cause or not.
>>>>>>
>>>>>> Meanwhile, please suggest a time for another meeting this week -
>>>>>> probably on Thursday or Friday. We will go through the complete
>>>>>> implementation to verify that everything is in order.
>>>>>> I went through the code and have some comments too. I will put them
>>>>>> in github it self.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> *Kavith Lokuhewage*
>>>>>> Senior Software Engineer
>>>>>> WSO2 Inc. - http://wso2.com
>>>>>> lean . enterprise . middleware
>>>>>> Mobile - +94779145123
>>>>>> Linkedin <http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419>
>>>>>> Twitter <https://twitter.com/KavithThiranga>
>>>>>>
>>>>>> On Wed, Jul 20, 2016 at 10:20 AM, Nathiesha Maddage <
>>>>>> nathieshamaddage@gmail.com> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I started unit testing with InfoCollector and Startup Classes, and
>>>>>>> created a few unit tests using JUnit.
>>>>>>>
>>>>>>> Regarding the progress of the project, I am currently working on the
>>>>>>> ReportArchive module. The ReportArchive module currently displays all the
>>>>>>> sent error reports to the user in a window, and I am  working on adding a
>>>>>>> context menu option for each error report to inquire the current status of
>>>>>>> the issue.
>>>>>>>
>>>>>>> Regarding the Preference page, I tried creating a Input Dialog, that
>>>>>>> would open up for the very first time the plugin  reports an error to the
>>>>>>> user. This dialog would ask the user to fill  values to compulsory fields
>>>>>>> like Jira Username and Password, and it would store these values in the
>>>>>>> preference page as well, for future use.
>>>>>>>
>>>>>>> I tried to save the user entered values in Input dialog, to the
>>>>>>> preference page
>>>>>>> using Activator.getDefault().getPreferenceStore().setValue() method. This
>>>>>>> method would set the user entered values in respective fields of the
>>>>>>> preference page, but that is just temporary. These values disappear from
>>>>>>> the preference page the next time I run it. Only the default set values by
>>>>>>> the code and the values that I enter in the preference page there itself
>>>>>>> would retain permanently. I tried to fix this for a couple of days and
>>>>>>> tried almost every solution I could find in the internet regarding this.
>>>>>>>
>>>>>>> Have you encountered a situation like this where you have to set the
>>>>>>> values in preference page through code? Any idea whether this is possible
>>>>>>> and if so how to do it would be of big help!
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> Nathiesha
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 7, 2016 at 6:31 AM, Nathiesha Maddage <
>>>>>>> nathieshamaddage@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> Regarding the current status of the project, I am working on the
>>>>>>>> development of the report Archive module, where the user can view the
>>>>>>>> previously sent error reports and also the current status of those issues.
>>>>>>>> Meanwhile I thought to look into the testing part of the project as well.
>>>>>>>> Is their any special testing framework used in Developer Studio testing,
>>>>>>>> that I need to adopt? I though to use JUnit. Is it OK?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Nathiesha
>>>>>>>>
>>>>>>>> On Tue, Jun 28, 2016 at 9:34 AM, Nathiesha Maddage <
>>>>>>>> nathieshamaddage@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> I downloaded and tried running the Data Analytics Server .
>>>>>>>>> Currently I am going through the DAS documentation and the REST API. Is it
>>>>>>>>> possible to post data using the REST API? As I noticed, it only allows to
>>>>>>>>> retrieve data from the DAS.
>>>>>>>>>
>>>>>>>>> Thanks and regards
>>>>>>>>>
>>>>>>>>> Nathiesha
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

[Attachment #5 (text/html)]

<div dir="ltr">Hi Jasintha and Kavith,<div><br></div><div>Here is the project plan \
for the upcoming 3/4 weeks.</div><div><br></div><div><p class="gmail-MsoNormal">      \
<b>July 30<sup>th</sup>-1<sup>st</sup>  Aug</b></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpFirst" style="margin-left:1in"></p><ul><li><span \
style="font-family:&quot;courier new&quot;"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Add and configure pom.xml<br></li><li><span \
style="font-family:&quot;courier new&quot;"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Use Maven tycho plugin<br></li><li><span \
style="font-family:&quot;courier new&quot;"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Build project using \
Maven<br></li></ul><p></p><div></div><p></p><div></div><p></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpLast" style="margin-left:1in"></p><div>  \
</div><p></p><p class="gmail-MsoNormal">                    <b>2<sup>nd</sup>  \
Aug-6<sup>th</sup>  Aug</b></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpFirst" style="margin-left:1in"></p><ul><li>Write a \
REST web service to publish errors, deploy in tomcat and testing.<br></li><li><span \
style="font-family:&quot;courier new&quot;"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Add options for the current plugin project to use above web \
service<br></li><li><span style="font-family:&quot;courier new&quot;"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Add current project classes and methods to be comply with above \
changes<br></li></ul><p></p><div></div><p></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpLast" \
style="margin-left:1in"><br></p><div></div><p></p><p class="gmail-MsoNormal">         \
<b>7<sup>th</sup>  Aug-11<sup>th</sup>  Aug</b></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpFirst" style="margin-left:1in"></p><ul><li>Define an \
extension point of the plugin<br></li><li><span style="font-family:&quot;courier \
new&quot;"><span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">  </span></span>Add methods to get the registered plugins and their \
Project keys, to maintain a map<br></li><li>Add methods to group errors under their \
required plugins<br></li><li><span style="font-family:&quot;courier new&quot;"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Change the publisher methods to create multiple issues in \
Jira<br></li></ul><p></p><div></div><p></p><div></div><p></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpLast" \
style="margin-left:1in"><br></p><div></div><p></p><p class="gmail-MsoNormal">         \
<b>12<sup>th</sup>  Aug -15<sup>th</sup>  Aug</b></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpFirst" style="margin-left:1in"></p><ul><li>Improve \
ErrorPublisher interfaces<br></li><li><span style="font-family:&quot;courier \
new&quot;"><span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">  </span></span>Write OSGI services for ErrorPublisher \
interfaces<br></li></ul><p></p><div></div><p></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpLast" style="margin-left:1in">  <br></p><p></p><p \
class="gmail-MsoNormal">                    <b>16<sup>th</sup>  Aug – \
17<sup>th</sup>  Aug</b></p><p class="gmail-MsoNormal"></p><ul><li>Create Feature \
Project using the plugin<br></li></ul><p></p><p class="gmail-MsoListParagraph" \
style="margin-left:87pt"><br></p><div></div><p></p><p class="gmail-MsoNormal">        \
<b>  18<sup>th</sup>  Aug – 20<sup>th</sup>  Aug</b></p><div></div><p></p><p \
class="gmail-MsoListParagraphCxSpFirst" style="margin-left:87pt"></p><ul><li><span \
style="font-family:symbol"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Refine the code<br></li><li><span style="font-family:symbol"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Fix bugs<br></li><li>Testing</li></ul><div><br></div><p></p><div></div><p></p><div></div><p></p><div></div><p></p><p \
class="gmail-MsoNormal">                  <b>21<sup>st</sup>  Aug – 22<sup>nd</sup> \
Aug</b></p><p class="gmail-MsoNormal"></p><ul><li><span \
style="font-family:symbol"><span \
style="font-stretch:normal;font-size:7pt;font-family:&quot;times new roman&quot;">  \
</span></span>Documentation<br></li></ul><div><br></div><div>Thanks and \
regards</div><div><br></div><div>Nathiesha</div><p></p></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 29, 2016 at 9:48 AM, \
Nathiesha Maddage <span dir="ltr">&lt;<a href="mailto:nathieshamaddage@gmail.com" \
target="_blank">nathieshamaddage@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div><p>Here are the \
minutes of the meeting I had yesterday (28/07/16) with Jasintha and Kavith. \
</p><div></div><p></p>

<p>During the meeting the current project progress was
discussed and suggestions were made to improve and finalize the development of
the project. Listed below are the key points discussed during the \
meeting.</p><div></div><p></p>

<p>1.<span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">             </span>Instructions were given on how to add pom.xml,
to change its fields to match with the project , to use Maven tycho plugin and
to build the project using maven.</p><p></p>

<p>2.<span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">             </span>Suggestions were made on creating and improving
interfaces like ErrorPublisher and ReportGenerator, and how to call the publish
method of all the registered publishers using an iterator in the main controller
class.</p><p></p>

<p>3.<span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">             </span>We planned to add another option for the user,
where he does not have any gmail and jira credentials, but a remote server
would take care of publishing the error using a common general account. For
that I was asked to write a REST web service that would handle this procedure,
and to deploy it in tomcat for testing. Possibility of using micro services for
this was also discussed.</p><p></p>

<p>4.<span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">             </span>We planned to add multiple project keys for the
jira create issue option where required, and to assign the project key based on
the plugin that is responsible for the error. For that purpose, it was
suggested to create an extension point of the project, so other plugins can
extend it and define their own project key. Using this all the plugins that
have extended the error reporter plugin and their respective project keys can be
fetched, and a map can be maintained, to be used during the error reporting
process.</p><p></p>

<p>5.<span style="font-stretch:normal;font-size:7pt;font-family:&quot;times new \
roman&quot;">             </span>To expose the Publisher classes, OSGI services
will be introduced to the project.</p><div></div><p></p>

<p></p><div>6.<span style="font-stretch:normal;font-size:7pt;font-family:&quot;times \
new roman&quot;">             </span>It was suggested to create a feature by adding
this plugin.</div><div></div><p></p>

<p></p><div>  </div><div>Furthermore
instructions were given on the documentation required for the project, and time
frame for documentation was suggested. And I was asked to send a project plan
for the upcoming 3 weeks.</div><p style="margin-left:0.25in"><br></p><p \
style="margin-left:0.25in">Thanks and regards</p><span class="HOEnZb"><font \
color="#888888"><p style="margin-left:0.25in">Nathiesha</p><div></div><p></p></font></span></div></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">On Tue, Jul 26, 2016 at 7:39 AM, Nathiesha Maddage <span \
dir="ltr">&lt;<a href="mailto:nathieshamaddage@gmail.com" \
target="_blank">nathieshamaddage@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi<span style="font-size:12.8px">  \
Kavith,</span><div><span style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">I</span><span style="font-size:12.8px">  \
accepted</span><span style="font-size:12.8px">  the</span><span \
style="font-size:12.8px">  invitation.</span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">Thanks</span><span style="font-size:12.8px">  \
and</span><span style="font-size:12.8px">  regards</span></div><span><font \
color="#888888"><div><span \
style="font-size:12.8px">Nathiesha</span></div></font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 25, 2016 at 8:42 PM, \
Kavith Lokuhewage <span dir="ltr">&lt;<a href="mailto:kavith@wso2.com" \
target="_blank">kavith@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi Nathiesha,<br><br>I have sent the \
invitation for the meeting at 2pm-3pm on 28/07/2016 [1].<br><br>Thanks,<br><br>[1]  \
<a href="https://goo.gl/PLEWQd" \
target="_blank">https://goo.gl/PLEWQd</a><br><br></div><div \
class="gmail_extra"><span><br clear="all"><div><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div \
style="text-align:left"><div><span style="font-family:tahoma,sans-serif"><font \
size="2"><span style="background-color:rgb(255,255,255)"><span \
style="color:rgb(102,102,102)"><b>Kavith \
Lokuhewage</b></span><br></span></font></span></div><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(255,255,255)"><span style="color:rgb(153,153,153)">Senior \
Software<span></span> Engineer</span></span><br><span><font \
color="#888888"><span><font color="#888888"><span><font color="#888888"><span \
style="color:rgb(136,136,136)">WSO2 Inc. - </span><a href="http://wso2.com/" \
style="color:rgb(17,85,204)" target="_blank">http://wso2.com</a><br \
style="color:rgb(136,136,136)">




<span style="color:rgb(136,136,136)">lean . enterprise . middleware</span><br \
style="color:rgb(136,136,136)">

</font></span></font></span></font></span></font></span></div><div \
style="text-align:left"><div style="text-align:left"><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(243,243,243)"><span \
style="background-color:rgb(255,255,255)"><span style="color:rgb(153,153,153)">Mobile \
- <a href="tel:%2B94779145123" value="+94779145123" \
target="_blank">+94779145123</a></span></span><span \
style="color:rgb(102,102,102)"></span></span></font></span></div><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(243,243,243)"><span \
style="color:rgb(102,102,102)"></span></span></font></span></div><div><div><font \
size="2" color="#cccccc"><span style="font-family:tahoma,sans-serif"><a \
href="http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419" \
target="_blank">Linkedin</a>   <a href="https://twitter.com/KavithThiranga" \
target="_blank">Twitter</a></span><br></font></div></div></div></div></div></div></div>
 <br></span><div><div><div class="gmail_quote">On Mon, Jul 25, 2016 at 8:13 PM, \
Nathiesha Maddage <span dir="ltr">&lt;<a href="mailto:nathieshamaddage@gmail.com" \
target="_blank">nathieshamaddage@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi Kavith,<div><br></div><div>How about \
Thursday evening, for the meeting? I am free after 1 \
pm.</div><div><br></div><div>Thank you for the examples. I was going to refactor the \
code by introducing the interfaces as you suggested during the mid evaluation. But I \
was not sure how to do that. I will try to change the code as given in the examples \
before the next meeting.</div><div><br></div><div>I think it is good to start \
converting the project to a maven project as only a few weeks remaining to finalize \
the project. We can discuss about that during the \
meeting.</div><div><br></div><div>Thanks and regards</div><span><font \
color="#888888"><div><br></div><div>Nathiesha</div></font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 25, 2016 at 3:10 PM, \
Kavith Lokuhewage <span dir="ltr">&lt;<a href="mailto:kavith@wso2.com" \
target="_blank">kavith@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Hi \
Nathiesha,</span><br><div><span style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">I noticed that there are some more pending tasks to \
restructure the code base as per the discussion we had during last code review. Just \
putting them down here again, so that you are able to go through again and complete \
any missing parts.</span><br><b><br><span style="font-size:12.8px">Introduce \
interfaces for the each sub component    to decouple main controller logic from \
implementation specific things</span></b><br><br><span style="font-size:12.8px">For \
example, right now, the controller class (ErrorReporter) is hardly coupled with  \
EmailSender and  RemoteJiraConnector. We can think latter two as error report \
publishers and introduce an interface called ErrorPublisher as \
below.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">public interface ErrorPublisher{</span></div><div><span \
style="font-size:12.8px">      void publish(</span>ReportGenerator<span \
style="font-size:12.8px">  reportGen</span><span style="font-size:12.8px">) throws \
IOException;</span></div><div><span style="font-size:12.8px">}</span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">And \
then EmailSender and RemoreJiraConnector classes can be refactored like \
below.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">public class EmailPublisher implements  </span><span \
style="font-size:12.8px">ErrorPublisher{</span></div><div><br></div><div><span \
style="font-size:12.8px">        void init () throws \
IOException{</span></div><div><span style="font-size:12.8px">           /</span><span \
style="font-size:12.8px">/init :  read preferences for SMTP connection \
params</span></div><div><span style="font-size:12.8px">        \
}</span></div><div><span style="font-size:12.8px">     </span></div><div><span \
style="font-size:12.8px">      // implement publish method  </span></div><div><span \
style="font-size:12.8px">       </span><span style="font-size:12.8px">void \
publish(</span>ReportGenerator<span style="font-size:12.8px">  reportGen</span><span \
style="font-size:12.8px">) throws IOException{</span></div><div><span \
style="font-size:12.8px">            init();</span></div><div><span \
style="font-size:12.8px">           //send mail</span></div><div><span \
style="font-size:12.8px">      }</span></div><div><span \
style="font-size:12.8px">}</span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">public \
class JiraPublisher implements</span><span style="font-size:12.8px">  </span><span \
style="font-size:12.8px">ErrorPublisher{</span><div><br></div><div><span \
style="font-size:12.8px">        void init () throws \
IOException{</span></div><div><span style="font-size:12.8px">               \
/</span><span style="font-size:12.8px">/init :  read preferences for JIRA resp API \
connection params</span></div><div><span style="font-size:12.8px">        \
}</span></div><div><span style="font-size:12.8px">     </span></div><div><span \
style="font-size:12.8px">     </span><span style="font-size:12.8px">// implement \
publish method  </span></div><div><span style="font-size:12.8px">     </span><span \
style="font-size:12.8px">void publish(</span>ReportGenerator<span \
style="font-size:12.8px">  reportGen) throws IOException{</span></div><div><span \
style="font-size:12.8px">           init();</span></div><div><span \
style="font-size:12.8px">         //post to JIRA api and create \
issue</span></div><div><span style="font-size:12.8px">     }</span></div><div><span \
style="font-size:12.8px">}</span><br></div><div><span \
style="font-size:12.8px"><br>Finally refactor ErrorReporter class to use only  \
ErrorPublisher interface. Further more, introduce methods to bind/unbind error \
publishers.  </span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">public \
class ErrorReporter {</span></div><div><span style="font-size:12.8px">      \
Map&lt;String, ErrorPublisher&gt; registeredPublishers;<br>     <br>      public void \
addPublisher (String id, ErrorPublisher publisher){</span></div><div><span \
style="font-size:12.8px">           </span><span \
style="font-size:12.8px">registeredPublishers.put(id,</span><span \
style="font-size:12.8px">publisher);</span></div><div><span style="font-size:12.8px"> \
}</span></div><div><span style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">    public void reportError(){</span></div><div><span \
style="font-size:12.8px">              //iterate over all \
publishers</span></div><div><span style="font-size:12.8px">              // and call  \
publish() method</span></div><div><span style="font-size:12.8px">   \
}</span><br></div><div><span \
style="font-size:12.8px">}</span></div><div><br></div><div><span \
style="font-size:12.8px">(We can further  </span><span \
style="font-size:12.8px">ErrorReporter</span><span style="font-size:12.8px">  class \
by using OSGI services to let other devstudio plugins to contribute  publishers as \
needed - we can do that later as time permits)  </span></div><br>For another example, \
currently you have used a class called  ReportGenerator to generate the report in \
plain text and directly used that generator inside main controller. Instead, you can \
introduce an interface called ReportGenerator and create a class called \
TextReportGenerator and move the code there - and decouple main controller and let \
other people add report generators later (say an HTML report generator) as needed. It \
can be done in same manner as above example I have provided .  </div><div><br>Once \
you do above restructuring, we can further improve the code to use OSGI services to \
decouple these components even further.<br><br><span \
style="font-size:12.8px">Finally, I think it is time for us to convert the project to \
a maven project and use tycho maven plugins for building it. I can assist you with \
this task - let&#39;s discuss this furthermore during the call. The main requirement \
here is to make this project directly mergable to developer studio repository. Since \
we are now reaching to the final weeks of GSOC coding period, I think we should \
concentrate a little more on this task.</span></div><div><br><span \
style="font-size:12.8px">Please a suggest a time for the meeting so we are able to \
discuss these  in-detail.</span></div><div><span \
style="font-size:12.8px"><br></span></div><div><span \
style="font-size:12.8px">Thanks,</span></div><div class="gmail_extra"><span><br \
clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div \
style="text-align:left"><div><span style="font-family:tahoma,sans-serif"><font \
size="2"><span style="background-color:rgb(255,255,255)"><span \
style="color:rgb(102,102,102)"><b>Kavith \
Lokuhewage</b></span><br></span></font></span></div><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(255,255,255)"><span style="color:rgb(153,153,153)">Senior \
Software<span></span> Engineer</span></span><br><span><font \
color="#888888"><span><font color="#888888"><span><font color="#888888"><span \
style="color:rgb(136,136,136)">WSO2 Inc. - </span><a href="http://wso2.com/" \
style="color:rgb(17,85,204)" target="_blank">http://wso2.com</a><br \
style="color:rgb(136,136,136)">




<span style="color:rgb(136,136,136)">lean . enterprise . middleware</span><br \
style="color:rgb(136,136,136)">

</font></span></font></span></font></span></font></span></div><div \
style="text-align:left"><div style="text-align:left"><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(243,243,243)"><span \
style="background-color:rgb(255,255,255)"><span style="color:rgb(153,153,153)">Mobile \
- <a href="tel:%2B94779145123" value="+94779145123" \
target="_blank">+94779145123</a></span></span><span \
style="color:rgb(102,102,102)"></span></span></font></span></div><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(243,243,243)"><span \
style="color:rgb(102,102,102)"></span></span></font></span></div><div><div><font \
size="2" color="#cccccc"><span style="font-family:tahoma,sans-serif"><a \
href="http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419" \
target="_blank">Linkedin</a>   <a href="https://twitter.com/KavithThiranga" \
target="_blank">Twitter</a></span><br></font></div></div></div></div></div></div></div>
 <br></span><div><div><div class="gmail_quote">On Mon, Jul 25, 2016 at 2:11 PM, \
Kavith Lokuhewage <span dir="ltr">&lt;<a href="mailto:kavith@wso2.com" \
target="_blank">kavith@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Hi Nathiesha,<br><br>There were some changes done to preference API since \
Eclipse Mars. I suspect that the root cause for the issue should be it. I will go \
through the changes we did in Developer Studio to fix issues with new pref API and \
confirm you whether it is the root cause or not.<br><br>Meanwhile, please suggest a \
time for another meeting this week - probably on Thursday or Friday. We will go \
through the complete implementation to verify that everything is in order.<div>I went \
through the code and have some comments too. I will put them in github it self.  \
<br><br>Thanks,</div></div><div class="gmail_extra"><span><br \
clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div \
style="text-align:left"><div><span style="font-family:tahoma,sans-serif"><font \
size="2"><span style="background-color:rgb(255,255,255)"><span \
style="color:rgb(102,102,102)"><b>Kavith \
Lokuhewage</b></span><br></span></font></span></div><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(255,255,255)"><span style="color:rgb(153,153,153)">Senior \
Software<span></span> Engineer</span></span><br><span><font \
color="#888888"><span><font color="#888888"><span><font color="#888888"><span \
style="color:rgb(136,136,136)">WSO2 Inc. - </span><a href="http://wso2.com/" \
style="color:rgb(17,85,204)" target="_blank">http://wso2.com</a><br \
style="color:rgb(136,136,136)">




<span style="color:rgb(136,136,136)">lean . enterprise . middleware</span><br \
style="color:rgb(136,136,136)">

</font></span></font></span></font></span></font></span></div><div \
style="text-align:left"><div style="text-align:left"><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(243,243,243)"><span \
style="background-color:rgb(255,255,255)"><span style="color:rgb(153,153,153)">Mobile \
- <a href="tel:%2B94779145123" value="+94779145123" \
target="_blank">+94779145123</a></span></span><span \
style="color:rgb(102,102,102)"></span></span></font></span></div><span \
style="font-family:tahoma,sans-serif"><font size="2"><span \
style="background-color:rgb(243,243,243)"><span \
style="color:rgb(102,102,102)"></span></span></font></span></div><div><div><font \
size="2" color="#cccccc"><span style="font-family:tahoma,sans-serif"><a \
href="http://www.linkedin.com/pub/kavith-lokuhewage/49/473/419" \
target="_blank">Linkedin</a>   <a href="https://twitter.com/KavithThiranga" \
target="_blank">Twitter</a></span><br></font></div></div></div></div></div></div></div>
 <br></span><span><div class="gmail_quote">On Wed, Jul 20, 2016 at 10:20 AM, \
Nathiesha Maddage <span dir="ltr">&lt;<a href="mailto:nathieshamaddage@gmail.com" \
target="_blank">nathieshamaddage@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Hi all,<div><br></div><div>I started unit testing with InfoCollector and \
Startup Classes, and created a few unit tests using \
JUnit.</div><div><br></div><div>Regarding the progress of the project, I am currently \
working on the ReportArchive module. The ReportArchive module currently displays all \
the sent error reports to the user in a window, and I am   working on adding a \
context menu option for each error report to inquire the current status of the \
issue.</div><div><br></div><div>Regarding the Preference page, I tried creating a \
Input Dialog, that would open up for the very first time the plugin   reports an \
error to the user. This dialog would ask the user to fill   values to compulsory \
fields like Jira Username and Password, and it would store these values in the \
preference page as well, for future use.  </div><div><br></div><div>I tried to save \
the user entered values in Input dialog, to the preference page using  \
Activator.getDefault().getPreferenceStore().setValue() method. This method would set \
the user entered values in respective fields of the preference page, but that is just \
temporary. These values disappear from the preference page the next time I run it. \
Only the default set values by the code and the values that I enter in the preference \
page there itself would retain permanently. I tried to fix this for a couple of days \
and tried almost every solution I could find in the internet regarding this.  \
</div><div><br></div><div>Have you encountered a situation like this where you have \
to set the values in preference page through code? Any idea whether this is possible \
and if so how to do it would be of big help!</div><div><br></div><div>Best \
regards</div><span><font \
color="#888888"><div><br></div><div>Nathiesha</div><div><br></div></font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 6:31 AM, \
Nathiesha Maddage <span dir="ltr">&lt;<a href="mailto:nathieshamaddage@gmail.com" \
target="_blank">nathieshamaddage@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Hi all,<div><br></div><div>Regarding the current status of the project, I \
am working on the development of the report Archive module, where the user can view \
the previously sent error reports and also the current status of those issues. \
Meanwhile I thought to look into the testing part of the project as well. Is their \
any special testing framework used in Developer Studio testing, that I need to adopt? \
I though to use JUnit. Is it OK?</div><div><br></div><div>Regards</div><span><font \
color="#888888"><div><br></div><div>Nathiesha</div></font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 9:34 AM, \
Nathiesha Maddage <span dir="ltr">&lt;<a href="mailto:nathieshamaddage@gmail.com" \
target="_blank">nathieshamaddage@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><div class="gmail_extra">Hi all,</div><div \
class="gmail_extra"><br></div><div class="gmail_extra">I downloaded and tried running \
the Data Analytics Server . Currently I am going through the DAS documentation and \
the REST API. Is it possible to post data using the REST API? As I noticed, it only \
allows to retrieve data from the DAS.</div><div class="gmail_extra"><br></div><div \
class="gmail_extra">Thanks and regards</div><span><font color="#888888"><div \
class="gmail_extra"><br></div><div \
class="gmail_extra">Nathiesha</div></font></span></div> </blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></span></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>



_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic