Vincent Massol wrote:
> On Jun 26, 2009, at 12:21 PM, Cristina Scheau wrote:
> 
>> Hi!
>>
>> I've managed to implement the bidirectional converter as you  
>> suggested .
>> Thank you very much for your help. Now I have another problem :( ..  
>> I tried
>> to use the OpenOffice cleaner XWiki Component from the OpenOffice  
>> Importer
>> module
>>
>> http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-officeimporter/src/main/java/org/xwiki/officeimporter/internal/cleaner/OpenOfficeHTMLCleaner.java
>>
>> My code is this one:
>>
>> HTMLCleaner openOfficeHTMLCleaner = (HTMLCleaner)
>> ecm.lookup(HTMLCleaner.class,"openoffice");
>>
>> ecm is an EmbeddableComponentManager instance.
>>
>> And I have at Runtime the follow exceptions: http://pastebin.com/m1920f9cf
>> I've added openoffice module as dependency. Sorry I'm not very  
>> familiar with
>> XWiki Components. Has anybody an idea what I am missing?
> 
> This means you're missing the xwiki-bridge module in your classpath.

The bridge component is special, since it has the implementation inside 
the xwiki-core module, and it's recommended not to include xwiki-core as 
a dependency. This means three things:

- at runtime, if your component runs inside the XWiki application it 
will have the right implementation, even if you don't declare it in your pom
- at test time, you need to provide a custom implementation for it. You 
can check the mock used in 
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-include/src/test/java/org/xwiki/rendering/internal/macro/IncludeMacroTest.java
 
as a good starting point
- however, since you will need to use it inside OpenOffice, this means 
that at runtime you won't have the default DocumentAccessBridge 
implementation provided by the XWiki core, so you need to look at how 
does the cleaner use it, and either provide a lightweight 
pseudo-implementation for it, or think of better ways to do the cleaning

> Beware though. If you start adding it then you'll also need xwiki-core  
> and other modules.


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to