[opencms-dev] how add event listener at start time

Ernesto De Santis ernesto.desantis at colaborativa.net
Wed Nov 30 15:12:21 CET 2005


Hi Jonathan

Thanks, but I need it for OpenCms 5.
I found the solution:

add in module administration box "publish event class", a class that 
implement this static method:

public static void publishProject(CmsObject cmso, Boolean 
isHistoryEnabled, Integer id, Integer versionId, Long publishDate, 
Vector changedResources, Vector changedModuleMasters) {
....}

This method is called every times that a resource is published.

I don't need implement any interface, this method is called by reflection.

Regards,
Ernesto.



Jonathan Woods escribió:

>Ernesto -
>
>When you create a new module using the administration GUI, one of the
>entries you can set is "Module action class".   This is the name of a class
>written by you, and part of your module, which is called when the module is
>initialised or modified.  It is in this class that you can add an
>I_CmsEventListener.
>
>If you have a default OpenCms installation which includes all the
>documentation, you can find more details at
>
>	
>http://<your_host>/opencms/opencms/alkacon-documentation/documentation_modul
>es/create_modules.html
>
>On that page, it suggests looking at the javadoc for I_CmsModuleAction,
>which is the interface your module action class must implement.  I've found
>some javadoc out there at
>
>	
>http://www.jsourcery.com/output/opencms/opencms/6.0.0/index.html
>
>This is for version 6.0.0, but 6.0.3 (the latest release) shouldn't be too
>different.
>
>Jon
>
>-----Original Message-----
>From: opencms-dev-bounces at opencms.org
>[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Ernesto De Santis
>Sent: 29 November 2005 15:06
>To: The OpenCms mailing list
>Subject: Re: [opencms-dev] how add event listener at start time
>
>Thanks Joachim
>
>In the module administration I see:
>Maintenance event class.
>
>Here I put a I_CmsEventListener?
>or what?
>
>Regards
>Ernesto.
>
>Joachim Arrasz escribió:
>
>  
>
>>Ernesto De Santis wrote:
>>
>>    
>>
>>>Hi
>>>
>>>How I can add a I_CmsEventListener when OpenCms start?
>>>In OpenCms 5.
>>>      
>>>
>>build a module and do this in the modules start class ... have a look 
>>into module administration
>>
>>
>>_______________________________________________
>>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
>>
>>    
>>
>
>  
>

-- 
Ernesto De Santis - Colaborativa.net
La Plata, Argentina.
http://www.colaborativa.net/


	

	
		
___________________________________________________________ 
1GB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar 




More information about the opencms-dev mailing list