You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by James M Snell <ja...@gmail.com> on 2008/05/12 17:41:03 UTC
Re: dynamic collections
The current design is used because a Provider may use multiple
collection adapters. The approach that I've taken in my implementation
is to override getServiceDocument and implement a EntityProvider to
serialize the ServiceDocument.
- James
Dan Diephouse wrote:
> I think I'm suggesting that it makes sense to do this by default and
> have a sensible default implementation in AbstractCollectionAdapter.
>
> James M Snell wrote:
>> There's no reason that the getServiceDocument method couldn't be
>> overridden so that it defers to a Collection Adapter.
>>
>> - James
>>
>> Dan Diephouse wrote:
>>> What about
>>> 1. Let the CollectionAdapter itself write to the services document
>>> whatever it wants.
>>> 2. Add a switch to AbstractProvider which turns the service writing
>>> on/off
>>> Would that solve your problem?
>>>
>>> Dan
>>>
>>> David Primmer wrote:
>>>> But what about the issue of practicality of service docs for huge sets
>>>> of dynamic collections?
>>>>
>>>> davep
>>>>
>>>> On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> In the Lotus Connections blogs implementation, I subclassed the
>>>>> Provider and
>>>>> re-implemented the code that provided the service document. I have a
>>>>> EntityProvider implementation that writes out the service document.
>>>>>
>>>>> - James
>>>>>
>>>>>
>>>>>
>>>>> David Primmer wrote:
>>>>>
>>>>>
>>>>>> I also had this same issue when the collections are dynamic and would
>>>>>> generate a practically unusable service doc.
>>>>>>
>>>>>> /blabla/:collection/:entry
>>>>>>
>>>>>> There's now way that I know of to create a service doc for this feed
>>>>>> if :collection is one of a large number records in a database. Why
>>>>>> would anyone use the service doc it if it was more than just a
>>>>>> handful? Service docs need to contain real working links, not uri
>>>>>> templates.
>>>>>>
>>>>>> Abdera's method of creating service docs is to call getHref for each
>>>>>> adapter that is added to the workspace. However, when an adapter
>>>>>> handles getHref, it is generating one url, not generating all the
>>>>>> entries in a feed. It can only return one url and that's going to be
>>>>>> some form of template. Does it make sense to offer another
>>>>>> implementation of AbstractProvider.getServiceDocument?
>>>>>>
>>>>>> davep
>>>>>>
>>>>>> On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>> How can one create dynamic collections with Abdera and create the
>>>>>>>
>>>>> service document? Perhaps, a hierarchy. Instead of having a single
>>>>> static
>>>>> collection defined, the user can create their own collections. How
>>>>> would
>>>>> one create a collection? Should they post a collection element or
>>>>> atom
>>>>> entry?
>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------
>>>>>>> Be a better friend, newshound, and know-it-all with Yahoo!
>>>>>>> Mobile. Try
>>>>>>>
>>>>> it now.
>>>>>
>>>>>>
>>>
>>>
>
>