Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [mylyn-integrators] AbstractTask vs. RepositoryTaskData in aconnector

Dennis Rietmann wrote on Tuesday, May 13, 2008 4:52 AM:

> just a small comment: Whether to use a completely custom class to
> store a task received from a repository (e.g. TrackTicket) or use a
> class that extends the AbsractTask depends on your modeling of tasks.
> If the AbstractTask is compatible with your tasks' model you might as
> well use it and end up with 2 representations:
> * MyTrackerTask extends AbstractTask
> * TaskData
> 
> This might make things easier since you only have to deal with 1
> mapping (I did this with the origo connector and it worked quite
> well). 

Thanks, Dennis.  That's what I was trying to do, following the Origo
example.  I do have an additional representation since I'm using JAXB to
suck XML documents into Java, but the JAXB representation does not get
out of the service client class.  

The thing that I was wondering was whether to put all of my attributes
in the MyTrackerTask that extends AbstractTask.  For example, in my
repository, I may have over 100 attributes for a task.  All of those
attributes must be stored in the RepositoryTaskData instance for the
task, but it looked like some other connectors only put a few core
fields in their AbstractTask subclass.  I suppose that would make the
Task List take less memory, and then the rest of the attributes could be
fetched when the task is opened in the editor.  Of course, I'm still not
sure whether it really works that way.  :)  

For now, I decided to stuff all of the attributes in MyTrackerTask
(extends AbstractTask) because I'm also using that class to shuttle data
from my service client to the RepositoryTaskData instance.  After I have
all of that actually working, I figured that I could go back and make
the Task List representation for my class smaller/lighter.  

I started this thread to try to figure out whether MyTrackerTask should
hold all of the task attributes or should be a more lightweight version
of the task.  

-- 
Tom Bryan <tombry@xxxxxxxxx>
Cisco Systems


Back to the top