Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.vfs.util
Class DelegatingFileSystemOptionsBuilder

    java.lang.Object
      org.apache.commons.vfs.util.DelegatingFileSystemOptionsBuilder

public class DelegatingFileSystemOptionsBuilder
extends Object

This class use reflection to set a configuration value using the fileSystemConfigBuilder associated the a scheme.
Example:

     FileSystemOptions fso = new FileSystemOptions();
     DelegatingFileSystemOptionsBuilder delegate = new DelegatingFileSystemOptionsBuilder(VFS.getManager());
     delegate.setConfigString(fso, "sftp", "identities", "c:/tmp/test.ident");
     delegate.setConfigString(fso, "http", "proxyPort", "8080");
     delegate.setConfigClass(fso, "sftp", "userinfo", TrustEveryoneUserInfo.class);

Version:
  $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
  Mario Ivankovits

Constructor Summary
`DelegatingFileSystemOptionsBuilder(FileSystemManager manager)` Constructor.

Method Summary
`protected FileSystemManager` | `getManager()`
`void` | `setConfigClass(FileSystemOptions fso, String scheme, String name, Class className)` Set a single class value.
`void` | `setConfigClasses(FileSystemOptions fso, String scheme, String name, Class[] classNames)` Set an array of class values.
`void` | `setConfigString(FileSystemOptions fso, String scheme, String name, String value)` Set a single string value.
`void` | `setConfigStrings(FileSystemOptions fso, String scheme, String name, String[] values)` Set an array of string value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DelegatingFileSystemOptionsBuilder

    public DelegatingFileSystemOptionsBuilder(FileSystemManager manager)

  Constructor.
  Pass in your fileSystemManager instance.

Parameters:
  `manager` - the manager to use to get the fileSystemConfigBuilder assocated to a scheme

Method Detail

### getManager

    protected FileSystemManager getManager()

### setConfigString

    public void setConfigString(FileSystemOptions fso,
                                String scheme,
                                String name,
                                String value)
                         throws FileSystemException

  Set a single string value.

  Parameters:
    `fso` - FileSystemOptions
    `scheme` - scheme
    `name` - name
    `value` - value
  Throws:
    `FileSystemException`

### setConfigStrings

    public void setConfigStrings(FileSystemOptions fso,
                                 String scheme,
                                 String name,
                                 String[] values)
                          throws FileSystemException

  Set an array of string value.

  Parameters:
    `fso` - FileSystemOptions
    `scheme` - scheme
    `name` - name
    `values` - values
  Throws:
    `FileSystemException`

### setConfigClass

    public void setConfigClass(FileSystemOptions fso,
                               String scheme,
                               String name,
                               Class className)
                        throws FileSystemException,
                               IllegalAccessException,
                               InstantiationException

  Set a single class value.
  The class has to implement a no-args constructor, else the instantiation might fail.

  Parameters:
    `fso` - FileSystemOptions
    `scheme` - scheme
    `name` - name
    `className` - className
  Throws:
    `FileSystemException`
    `IllegalAccessException`
    `InstantiationException`

### setConfigClasses

    public void setConfigClasses(FileSystemOptions fso,
                                 String scheme,
                                 String name,
                                 Class[] classNames)
                          throws FileSystemException,
                                 IllegalAccessException,
                                 InstantiationException

  Set an array of class values.
  The class has to implement a no-args constructor, else the instantiation might fail.

  Parameters:
    `fso` - FileSystemOptions
    `scheme` - scheme
    `name` - name
    `classNames` - classNames
  Throws:
    `FileSystemException`
    `IllegalAccessException`
    `InstantiationException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.