[opencms-dev] Module Action class updateModule method

Claus Priisholm cpr at codedroids.com
Tue Nov 8 12:35:33 CET 2005

The project publish event does include the relevant information - I've 
done something like this:
CmsUUID publishHistoryId = new 

CmsDbContext dbContext = 

CmsObject cms = 

List publishedResources = cms.readPublishedResources(publishHistoryId);

Iterator it = publishedResources.iterator();
while(it.hasNext()) {
	CmsPublishedResource pr = (CmsPublishedResource)it.next();
Note that the list does not hold CmsResource objects but rather some 
other variant:


which does hold the resource path, so you're good to read the resource 
by the usual means.

Pere Torrodellas wrote:
> Thanks to all for your hints.
> Unfortunatelly, what I need is to do something when specific files are
> published, and it doesn't seem to exist an event for this, does it?
> EVENT_RESOURCE_MODIFIED is fired when the file is edited or unlocked, but
> not when it's published.
> EVENT_PUBLISH_PROJECT is fired when a resource is published, but the event
> data doesn't include information to find out what was published, just a
> project id and some control data, so I would have to act for all and every
> resource publication.
> Am I overlooking something?
> Thanks,
> Pere
> _______________________________________________
> 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

Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
Javadocs and other OpenCms stuff: 

More information about the opencms-dev mailing list