[opencms-dev] Recursive property search

Robert Spielmann spielmann at codecentric.de
Tue Aug 26 15:11:12 CEST 2008


Hi all,

I have a situation in which I need to migrate property values automatically in order to preserve existing content and in order to reduce or completely avoid manual work on several thousand resources.

Let's say the property is called "MyProperty" and it currently contains values like "a,b,c", "b,c,a" etc. I want to convert them to "x,y,z", "y,z,x" etc.

As there can potentially be a deliberate number of freely chosen combinations, I can obviously not use the workplace tools to replace the property values.

Hence, I would like to recursively iterate over all VFS resources in a given site, read the property "MyProperty", save the current property value and the resource name if a resource has that property set, and then go to step 2 and replace the properties on the collected resources.

If this is programatically possible, can anyone give me a hint on where to start?

I work with OpenCms 6.5.6 which contains custom patches directly from Alkacon.

Have a nice day,
Robert

Mit freundlichen Grüßen / Best regards

Robert Spielmann
IT Consultant

-- 

codecentric GmbH
Grünewalder Str. 29-31
42657 Solingen

Telefon +49 (212) 2494-322
Fax +49 (212) 2494-334
Mobil +49 (151) 14705709

E-Mail spielmann at codecentric.de

Internet www.codecentric.de <http://www.codecentric.de/> 

Geschäftsführer: Peter Gierse, Mirko Novakovic und Rainer Vehns
Sitz der Gesellschaft: Solingen

Registergericht: Amtsgericht Wuppertal, HRB 19214




More information about the opencms-dev mailing list