Package org.apache.commons.vfs.impl

Examples of org.apache.commons.vfs.impl.StandardFileSystemManager


    public void init(String[] args, String configFile) throws ContainerException {
    }

    public boolean start() throws ContainerException {
        try {
            StandardFileSystemManager sfsm = VFSUtil.createStandardFileSystemManager();
            FileObject currentDir = sfsm.resolveFile(new File(".").toURI().toURL().toString());
            sfsm.setBaseFile(currentDir);
            CommonsVfsContainer.sfsm = sfsm;
        } catch (FileSystemException e) {
            throw (ContainerException) new ContainerException("Initializing StandardFileSystemManager").initCause(e);
        } catch (MalformedURLException e) {
            throw (ContainerException) new ContainerException("Initializing StandardFileSystemManager").initCause(e);
View Full Code Here


        }
        return _manager;
    }

    private StandardFileSystemManager createVFSManager() throws IOException {
        StandardFileSystemManager result = null;
        try {
            /*
             * The DefaultFileSystemManager gets its configuration from the jakarta-vfs-common
             * implementation which includes the res and tmp schemes which are of no use to use
             * here. Using StandardFileSystemManager lets us specify which schemes to support as
             * well as providing a mechanism to change this support without recompilation.
             */
            result = new StandardFileSystemManager() {
                protected void configurePlugins() throws FileSystemException {
                    // disable automatic loading potential unsupported extensions
                }
            };
            result.setConfiguration(getClass().getResource(IVY_VFS_CONFIG));
            result.init();

            // Generate and print a list of available schemes
            Message.verbose("Available VFS schemes...");
            String[] schemes = result.getSchemes();
            Arrays.sort(schemes);
            for (int i = 0; i < schemes.length; i++) {
                Message.verbose("VFS Supported Scheme: " + schemes[i]);
            }
        } catch (FileSystemException e) {
View Full Code Here

  static final public String SCRATCH_DIR = "_vfsScratchArea";

 
  public VfsTestHelper() throws Exception {
    // setup and initialize VFS
    fsManager = new StandardFileSystemManager() {
      protected void configurePlugins() throws FileSystemException {
        // disable automatic loading potential unsupported extensions
      }
    };
    fsManager.setConfiguration(getClass().getResource(VFS_CONF).toString());
View Full Code Here

    }
    return _manager;
  }

  private StandardFileSystemManager createVFSManager() throws IOException {
    StandardFileSystemManager result = null;
    try {
      /*
       * The DefaultFileSystemManager gets its configuration from the jakarta-vfs-common
       * implementation which includes the res and tmp schemes which are of no use to use here.
       * Using StandardFileSystemManager lets us specify which schemes to support as well as
       * providing a mechanism to change this support without recompilation.
       */
      result = new StandardFileSystemManager() {
        protected void configurePlugins() throws FileSystemException {
          // disable automatic loading potential unsupported extensions
        }
      };
      result.setConfiguration(getClass().getResource(IVY_VFS_CONFIG));
      result.init();

      // Generate and print a list of available schemes
      Message.verbose("Available VFS schemes...");
      String[] schemes = result.getSchemes();
      Arrays.sort(schemes);
      for (int i = 0; i < schemes.length; i++) {
        Message.verbose("VFS Supported Scheme: " + schemes[i]);
      }
    } catch (FileSystemException e) {
View Full Code Here

        }
        else {
            _log = Logger.getLogger(LOGGER_DESIGNSYNC);
        }

        _fsManager = new StandardFileSystemManager();
        _fsManager.setCacheStrategy(CacheStrategy.MANUAL);
        _fsManager.setLogger(new Log4JLogger(Logger.getLogger(LOGGER_DESIGNSYNC_QUIET)));
        _fsManager.setClassLoader(WGACore.getLibraryLoader());
        _fsManager.setCacheStrategy(getVFSCacheStrategy());
        _fsManager.init();
View Full Code Here

    public void init(String[] args, String configFile) throws ContainerException {
    }

    public boolean start() throws ContainerException {
        try {
            StandardFileSystemManager sfsm = VFSUtil.createStandardFileSystemManager();
            FileObject currentDir = sfsm.resolveFile(new File(".").toURI().toURL().toString());
            sfsm.setBaseFile(currentDir);
            CommonsVfsContainer.sfsm = sfsm;
        } catch (FileSystemException e) {
            throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e);
        } catch (MalformedURLException e) {
            throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e);
View Full Code Here

    public void init(ConfigurationContext cfgCtx, TransportInDescription trpInDesc)
        throws AxisFault {
        setTransportName(TRANSPORT_NAME);
        super.init(cfgCtx, trpInDesc);
        try {
            StandardFileSystemManager fsm = new StandardFileSystemManager();
            fsm.setConfiguration(getClass().getClassLoader().getResource("providers.xml"));
            fsm.init();
            fsManager = fsm;
        } catch (FileSystemException e) {
            handleException("Error initializing the file transport : " + e.getMessage(), e);
        }
    }
View Full Code Here

     */
    public void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut) throws AxisFault {
        setTransportName(TRANSPORT_NAME);
        super.init(cfgCtx, transportOut);
        try {
            StandardFileSystemManager fsm = new StandardFileSystemManager();
            fsm.setConfiguration(getClass().getClassLoader().getResource("providers.xml"));
            fsm.init();
            fsManager = fsm;
        } catch (FileSystemException e) {
            handleException("Error initializing the file transport : " + e.getMessage(), e);
        }
    }
View Full Code Here

    aLock.readLock().lock();

    try {
      if (fileSystemManager == null) {
        try {
          StandardFileSystemManager fm = new StandardFileSystemManager();
          fm.setCacheStrategy(CacheStrategy.MANUAL);
          fm.init();
          fileSystemManager = fm;
        } catch (Exception exc) {
          throw new RuntimeException(exc);
        }
      }
View Full Code Here

    public static final String SCRATCH_DIR = "_vfsScratchArea";

    public VfsTestHelper() throws Exception {
        // setup and initialize VFS
        fsManager = new StandardFileSystemManager() {
            protected void configurePlugins() throws FileSystemException {
                // disable automatic loading potential unsupported extensions
            }
        };
        fsManager.setConfiguration(getClass().getResource(VFS_CONF).toString());
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.impl.StandardFileSystemManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.