Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [mylar-dev] CVS API changes yesterday

Hi Felix,

What we are continuing to do is move generic functionality out of
mylar.bugzilla.ui into mylar.tasklist in order to make it available to all
connectors instead of forcing each to re-implement it.  The bug 144998
refactorings moved the offline storage mechanism, and Rob has almost
completed the common task editor move (bug 138043).  

The offline storage and form-based editor are both optional for a connector,
so the best thing to do right now is use mylar.jira as an example of how to
skip implementing this functionality.  If anything is unclear there please
post.  Regarding the offline state, if you are storing all your data in
tasklist.xml you're probably best off skipping this for now since it is
coupled to the notion of offline storage.  Here's how we currently see the
architecture: 

* ITask: a virtual proxy / stub for a task, stored in tasklist.xml, always
in memory, contains only key fields (e.g. description, priority)

* RepositoryTaskData: the rest (e.g. comments, attachments), synchronization
and storage are managed automatically, can add any kind of fields to be
stored

This makes for a pretty big simplification, since we should be able to get
rid of the need to extend AbstractRepositoryTask with custom attributes and
serialization, making connectors much easier to implement and less prone to
internal changes.  The Jira connector will continue to server as an example
and should be updated to these changes in the next release cycle.

In the meantime we want to try hard to minimize the pain for you and others
throughout these changes.  I'll be more pro-active about notifying the list
as you suggest, and if migrating to changes is ever problematic please do
complain.  

Regarding the error handling, that's a good suggestion, could you please add
a bug report?

Mik

> -----Original Message-----
> From: mylar-dev-bounces@xxxxxxxxxxx [mailto:mylar-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Felix Schwarz
> Sent: Wednesday, June 07, 2006 2:11 AM
> To: mylar-dev@xxxxxxxxxxx
> Subject: [mylar-dev] CVS API changes yesterday
> 
> Hi all,
> 
> I noticed some API changes in AbstractRepositoryConnector related to
> bug 144998 ("create common offline report storage" - [1]).
> 
> Especially the commit at 06.06 07:13 by relves changed some things:
> The former abstract method updateOfflineState is now filled with
> functionality. A new abstract method named downloadTaskData was
> created.
> 
> Now I am unsure how to do synchronization. Until now, I used
> updateOfflineState in order to download the TaskData (I had my own
> class for that) of my task and all subtasks. Should that be done in
> downloadTaskData now instead? Where should the data for subtasks be
> fetched? Recursively in downloadTaskData?
> 
> 
> One thing I miss all the time is a unified error handling during
> synchronization. For example downloadTaskData may cause Exceptions.
> Why don't you allow a CoreException to be thrown?
> 
> There is a simple check for downloadedTaskData to be null but imho
> this is not sufficient as the error message is very generic. A core
> exception has an IStatus so one could give more information to the
> user which is a good thing(tm).
> > final RepositoryTaskData downloadedTaskData =
> downloadTaskData(repositoryTask);
> > if (downloadedTaskData == null) {
> >         MylarStatusHandler.log("Download of " +
> repositoryTask.getDescription() + " from "
> >                         + repositoryTask.getRepositoryUrl() + "
> failed.", this);
> >         return;
> > }
> 
> Mik, you planned to start sending mails to this list about major
> refactorings. Do you still plan to do that? To me it would be very
> helpful if you could point out how a connector implementor should
> adapt to the new structure and what new features will be enabled by
> that...
> 
> For example I am a bit unsure what the new offline storage means: My
> tasks have some data attached which I currently store in the (hacked)
> Mylar tasklist.xml (with a custom TaskListExternalizer). How will the
> new offline storage affect this?
> 
> 
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=144998
> 
> --
> Felix
> 
> _______________________________________________
> mylar-dev mailing list
> mylar-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylar-dev



Back to the top