On Fri, 2005-08-12 at 11:23 +0200, Robert Goene wrote:
> Thorsten Scherler wrote:
> > On Fri, 2005-08-12 at 10:38 +0200, Robert Goene wrote:
> > 
> >>Andreas Hartmann wrote:
> >>
> >>>Robert Goene wrote:
> >>>
> >>>
> >>>>J. Wolfgang Kaltz wrote:
> >>>>
> >>>>
> >>>>>Robert Goene schrieb:
> >>>>>
> >>>>>
> >>>>>>(...)
> >>>>>>To index the files when they are published and to remove them from 
> >>>>>>the index when deactivated, i need to extend the Publish and 
> >>>>>>Deactivate usecases. I have found the java classes that take care of 
> >>>>>>this (for instance, 
> >>>>>>http://lenya.apache.org/apidocs/1.4/org/apache/lenya/defaultpub/cms/usecases/Publish.html)
> >>>>>> 
> >>>>>>and i am wondering how these classes are used. Are they part of some 
> >>>>>>pipline? 
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>Hi Robert,
> >>>>>I suggest you take a look at the usecase framework docu:
> >>>>>http://lenya.apache.org/1_4/reference/usecase-framework/index.html
> >>>>
> >>>>
> >>>>
> >>>>Thanks, but i am still not sure if it is possible to extend the 
> >>>>usecase before or after the calling of the usecase handler class. I do 
> >>>>not mean the view of the usecase, but the usecase itself. Is it 
> >>>>possible to embed it into some pipeline-like construction to make it 
> >>>>possible to process the document before or after the usecase class is 
> >>>>called?
> >>>>
> >>>>As an alternative, i could call a transformer from the usecase class. 
> >>>>Is this possible at all?
> >>>
> >>>
> >>>What exactly do you want to achieve?
> >>>
> >>>You can do anything in the usecase handler, but calling a transformer might
> >>>be overkill for applying an XSLT stylesheet. Why not simply use JAXP?
> >>
> >>I want to use the LuceneIndexTransformer to update the lucene index when 
> >>a page is published. This transformer does provide exactly the functions 
> >>i need for 'incremental' and 'configurable' indexing possible.
> >>
> >>Maybe it is possible to use this transformer from the usecase handler 
> >>itself, is it?
> > 
> > 
> > Just an idea:
> > 
> > Why don't you write an usecase for the lucene update and invoke that
> > from doExecute()?
> 
> Sounds reasonable to me. Can you point me to some docs on doExecute() or 
> possibly some examples?
> 

http://lenya.apache.org/1_4/reference/usecase-framework/index.html

package org.apache.lenya.defaultpub.cms.usecases;
public class Publish extends DocumentUsecase implements DocumentVisitor
{...}

The best way to know what is going on, is to start 
./lenya.sh servlet-debug

and debug the above class in e.g. Eclipse (Debug->Remote Java
Application->new). Note: you need lenya already started up in debug mode
otherwise you will get a "connection refused..." error.

Then you set some breakpoints in the class and you see what is going on.

> Thanks!

HTH

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to