incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe <christophe.lomb...@sword-technologies.com>
Subject Re: 2 or more component services for the same interface
Date Thu, 20 Jan 2005 19:56:59 GMT
David Sean Taylor wrote:

> LOMBART Christophe wrote:
>
>> David Sean Taylor wrote:
>>
>>
>>> Christophe,
>>>
>>> Say I wanted to have 2 or more component services for the same 
>>> component interface. Can I configure that easily in Spring?
>>> Its not readily apparent to me...
>>
>>
>>
>>
>> Never tested but it should work : with 2 distinct component id:
>>
>> Eg :
>>   <!-- Content Model Service  1-->
>>   <bean id="Model1"  
>> class="org.apache.portals.graffito.impl.ContentModelServiceImpl"   
>> >                 <constructor-arg ><ref 
>> bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
       
>>        <constructor-arg ><ref 
>> bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl"/></constructor-arg>
       
>>   </bean>
>>
>>
>>   <!-- Content Model Service  2-->
>>   <bean id="Model2"  
>> class="org.apache.portals.graffito.impl.ContentModelServiceImpl"   
>> >                 <constructor-arg ><ref 
>> bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
       
>>        <constructor-arg ><ref 
>> bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl"/></constructor-arg>
       
>>   </bean>
>>
>>> For example, I want to have 3 ContentModelService implementations, 
>>> one going to WebDAV, one to default persistence store, and one to 
>>> the file system.
>>>
>>
>> ok Now I understand what you want.
>>
>> I don't advise you to change the implementation of 
>> ContentModelService,  ContentSearchService, ContentVersionService, ...
>> The default implementations of thoses services are using the 
>> Persistence service (see the architecture page in the Graffito Site). 
>> By this way, you can plug more than one content server into the 
>> Vitural Content Tree.
>> The Persistence service is a key component that can be used in a lot 
>> of use cases. Each time a request is made on a specific uri. The 
>> persistence store find the appropriate content store (depending on a 
>> uri mapping).
>>
>> Supporting another kind of content stores (WEBDAV, fs, ...)  is made 
>> via the ContentStore interface and Server interface.
>
> Specifically, right now I need a FS impl with minimal leveling, for 
> now read-only.

Do you need indexing & searching ? if yes, I want to make a proposal for 
an event handler which can be used to index, notify, .... I think AOP 
can help.

>
> So you decided to keep the ContentModelService ;)

Sure I like it but the ContentStore & Server are new.

>
> Will all the documents and folders in my FS store need to have 
> corresponding rows in the master store DB (CMS_OBJECT)?
>
No. There is no need to add one record in the master store for each 
document & folders found in your FS.
The main goal of the master store DB is to list all server references.
Eventually you can add some contents and folders in it but it not 
mandatory. So, CMS_OBJECT is used only if you want to add content in 
this Master store.
Just for the info : if you have only one content store, your fs can be 
the Graffito master store. It is up to you to choose which server will 
be the master store :-)  This is specify in the Spring assembly script.

>>
> OK, Im going to try to write a FS ContentStore implementation and 
> Server. Again I will need to ability to 'attach' FS store root at run 
> time, same old problem there :)
>
That's already supported with ContentServerService.addServer(Server). 
Check the unit tests you should fine a example. We need to build a admin 
portlet to manage thoses servers (DB, FS, WEBDAV,...).

>> Other comments :
>> * Can you review the architecture page in the Graffito site and let 
>> me know if it not clear. My english is really bad :-(
>
>
> Sure, I'll have a look
>
>> * I can help for the WEBDAV impl. I made one for JCMS 1 and I should 
>> be possible to migrate it for Graffito. Let me know when you need 
>> this impl.
>> * Should be nice to see the status on the subproject : VFS from 
>> Jakarta Commons.
>>
> Yes VFS is an interesting project. Do you want to create a VFS 
> persistence store?

why not ? Personnaly I don't need it but I can imagine that someone want 
to use it.

> Now Im wondering if I should write a VFS instead of plain old FS..
> Think I'll start with FS just to get me familiarized with Graffito again
>
Good decision :-)  We can build later a VFS plugin.

Mime
View raw message