On May 28, 2009, at 11:54 AM, Benoit Maisonny wrote:
> Hi,
>
> I'd like to configure FileSystemOptions dynamically, without knowing
> at
> compile time which parameters to set. I'd have some config file
> containing a list of parameters (builder class name, option name and
> its
> value).
>
> My problem is that the method
> org.apache.commons.vfs.FileSystemConfigBuilder.setParam() is
> protected,
> and FileSystemOptions can't be configured directly.
>
> Is there another way to set parameters in a generic way?
>
> Is there a reason for preventing direct configuration of
> FileSystemOptions? I guess I could write my own sub-class of
> FileSystemConfigBuilder which would offer a public setter, but this
> sounds like building my own backdoor to rob the VFS house :-)
>
> Thanks for any insight.
> Benoit
This is one of my least favorite parts of VFS. To configure
FileSystemOptions you have to use the appropriate
FileSystemConfigBuilder. I can't tell you why it was done this way as
it precedes my involvement, but I've considered reinventing this more
than once. It isn't pretty.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
|