PDA

View Full Version : Extends Files bean to apply custon string resolver?



pmarrone
04-15-2003, 09:13 AM
Hi, we have many files to install that need to replace the same values.

At the moment we have an "ASCII File Update" for each file with lot of find and replace actions.

Is it possible to extends Files class to replace automatically all the TAG I want?

Similar behaviour to "Win32 Registry Update" behaviour.

Regards

waruwaru
04-23-2003, 07:26 PM
I have played with the idea of creating "looping" beans in ISMP. For example:
1. a bean to retrieve all files that fits a name filter (*.txt), and stores first filename in a bean property
2. use the normal text file processing bean to process the filename using the bean property
3. a goto bean, checking condition to make sure more filenames are available. Also increment the filename index to the next item

It kinda works, but it is reeeeally slow. Because of all the bean invocations. Someone filed a defect report because the installer didn't return after an hour... :)

I ended up writing my own custom bean that takes an array of filenames, and handled all the processing myself. This time the installer finished in a couple of minutes. :)