Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Query object in Mylyn 3.0

The attributes are persisited in the task list which is currently serialized 
to an XML file. Most connectors only store simple text attributes for queries 
or serialize all of the state to the query url (e.g. Trac). A simple 
key/value map was sufficient for these use cases (see also bug 199818).

What kind of object do you need to store in the query? Does it need to be 
persisted or is the query not part of the task list?

Steffen


On Wednesday 11 June 2008, Subhash Gopalakrishnan wrote:
> Thanks for the clarification,
>
> But why is it not setAttribute(String, Object) instead? I want to keep my
> domain object representing a query along with the RepositoryQuery object. A
> String attribute is not flexible enough.
>
> Subhash
>
> ----
>
> Hi,
>
> instead of extending queries you should set any custom state that you want
> to
> persist for queries using IRepositoryQuery.setAttribute(). If you need to
> create query objects you can use the factory method in IRepositoryModel,
> e.g.:
>
>  IRepositoryQuery query
>    = TasksUi.getRepositoryModel().createRepositoryQuery(taskRepository);
>  query.setUrl("http://repository/query";;);
>  query.setAttribute("my.custom.attribute", "value");
>
> Steffen
>
> On Tuesday 10 June 2008, Subhash Gopalakrishnan wrote:
> > I was trying to find AbstractRepositoryQuery to extend and it seems that
>
> it
>
> > has been replaced by RepositoryQuery. But this class is in an internals
> > package, so I am not sure if extending from it is intended. I need my
>
> query
>
> > object to contain specific repository objects and cannot use
> > RepositoryQuery without extending it. I cannot simply implement
> > IRepositoryElement because RepositoryQueryWizard expects RepositoryQuery
> > and so do the TaskList APIs.
> >
> > So, should I go ahead and extend from RepositoryQuery or is there a way
> > to sneak in user objects with each RepositoryQuery? Please let me know.
> >
> > Subhash



-- 
Steffen Pingel - steffenp@xxxxxx - http://steffenpingel.de


Back to the top