AW: [opencms-dev] Creating Images

Thomas Weckert t.weckert at alkacon.com
Fri Oct 15 17:16:05 CEST 2004


Hello Daniel,
 
I think rendering an image each time a property has been changed takes too many
resources. I would render the images after a publish task. OpenCms keeps a
database log of all published resources per publish task identified by a publish
history ID. Check out cmsEvent() in the driver manager of the CVS head and you
will see in the case where the publish project event gets handled how to receive
the publish history ID of the last publish task. readPublishedResources on the
Cms object gives you a List of all resources being published in a publish task
for a given ID. It would be easy to iterate this list in a separate event
handler to read Nav properties of published files and eventually render images.



Regards,
Thomas Weckert
Alkacon Software - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com/>   


  _____  

Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im
Auftrag von Daniel Wiesner
Gesendet: Donnerstag, 14. Oktober 2004 22:23
An: opencms-dev at opencms.org
Betreff: Re: [opencms-dev] Creating Images



Thank you! 

 I have a class redistered in web.xml:

<listener>
       <listener-class>de.avstudio.PropertyChangedListener</listener-class>
</listener>

and if  I change any property of any file in the vfs this class does its work:
actually writing an image to c:\temp

but how can i get some information e.g. the title property of the resource that
wase causing the event? 

Daniel.

 

 

 

The OpenCms mailing list <opencms-dev at opencms.org> wrote: 
> Daniel Wiesner <daniel.wiesner at av-studio.de> writes:
> 
> > I think I have to load the image creating class as a servlet because
> > the constructor does the registration - right? Or is there an other
> > way to load classess in opencms?
> 
> I'd register a class for this event that will request your image
> creating servlet with the correct url. Then you can link in your
> template to the created image files.
> 
> Maybe also create two folders for offline and online images.
> 
> Regards,
> Thomas
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041015/b8a3d772/attachment.htm>


More information about the opencms-dev mailing list