private synchronized FileObject processFile( FileName name, boolean useCache ) throws FileSystemException { if ( !super.getRootName().getRootURI().equals( name.getRootURI() ) ) { throw new FileSystemException( "vfs.provider/mismatched-fs-for-name.error", new Object[] { name, super.getRootName(), name.getRootURI() } ); } else { FileObject file; if ( useCache ) { file = super.getFileFromCache( name ); } else { file = null; } if ( file == null ) { try { file = this.createFile( (AbstractFileName) name ); } catch ( Exception var5 ) { return null; } file = super.decorateFileObject( file ); if ( useCache ) { super.putFileToCache( file ); } } if ( super.getFileSystemManager().getCacheStrategy().equals( CacheStrategy.ON_RESOLVE ) ) { file.refresh(); } return file; } }
/** * Creates the FileContentInfo factory. * * @return The FileContentInfoFactory. */ protected FileContentInfoFactory getFileContentInfoFactory() { return fs.getFileSystemManager().getFileContentInfoFactory(); }
/** * Creates the FileContentInfo factory. * * @return The FileContentInfoFactory. */ protected FileContentInfoFactory getFileContentInfoFactory() { return fs.getFileSystemManager().getFileContentInfoFactory(); }
/** * create the filecontentinfo implementation. * @return The FileContentInfoFactory. */ protected FileContentInfoFactory getFileContentInfoFactory() { return fs.getFileSystemManager().getFileContentInfoFactory(); }
/** * Creates the FileContentInfo factory. * * @return The FileContentInfoFactory. */ protected FileContentInfoFactory getFileContentInfoFactory() { return fileSystem.getFileSystemManager().getFileContentInfoFactory(); }
/** * Finds a file in this file system. * * @param nameStr The name of the file to resolve. * @return The located FileObject or null if none could be located. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String nameStr) throws FileSystemException { // Resolve the name, and create the file final FileName name = getFileSystemManager().resolveName(rootName, nameStr); return resolveFile(name); }
/** * Finds a file in this file system. * * @param nameStr The name of the file to resolve. * @return The located FileObject or null if none could be located. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String nameStr) throws FileSystemException { // Resolve the name, and create the file final FileName name = getFileSystemManager().resolveName(rootName, nameStr); return resolveFile(name); }
/** * Finds a file, relative to this file. * * @param path The path of the file to locate. Can either be a relative path, which is resolved relative to this * file, or an absolute path, which is resolved relative to the file system that contains this file. * @return The FileObject. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String path) throws FileSystemException { final FileName otherName = fs.getFileSystemManager().resolveName(fileName, path); return fs.resolveFile(otherName); }
/** * Returns a child by name. * * @param name The name of the child to locate. * @param scope the NameScope. * @return The FileObject for the file or null if the child does not exist. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String name, final NameScope scope) throws FileSystemException { // return fs.resolveFile(this.name.resolveName(name, scope)); return fs.resolveFile(fs.getFileSystemManager().resolveName(this.fileName, name, scope)); }
/** * Finds a file, relative to this file. * * @param path The path of the file to locate. Can either be a relative path, which is resolved relative to this * file, or an absolute path, which is resolved relative to the file system that contains this file. * @return The FileObject. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String path) throws FileSystemException { final FileName otherName = fs.getFileSystemManager().resolveName(fileName, path); return fs.resolveFile(otherName); }
/** * Returns a child by name. * * @param name The name of the child to locate. * @param scope the NameScope. * @return The FileObject for the file or null if the child does not exist. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String name, final NameScope scope) throws FileSystemException { // return fs.resolveFile(this.name.resolveName(name, scope)); return fs.resolveFile(fs.getFileSystemManager().resolveName(this.fileName, name, scope)); }
/** * Finds a file, relative to this file. * * @param path The path of the file to locate. Can either be a relative path, which is resolved relative to this * file, or an absolute path, which is resolved relative to the file system that contains this file. * @return The FileObject. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String path) throws FileSystemException { final FileName otherName = fileSystem.getFileSystemManager().resolveName(fileName, path); return fileSystem.resolveFile(otherName); }
/** * Returns a child by name. * * @param name The name of the child to locate. * @param scope the NameScope. * @return The FileObject for the file or null if the child does not exist. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String name, final NameScope scope) throws FileSystemException { // return fs.resolveFile(this.name.resolveName(name, scope)); return fileSystem.resolveFile(fileSystem.getFileSystemManager().resolveName(this.fileName, name, scope)); }
/** * Finds a file in this file system. * * @param nameStr The name of the file to resolve. * @return The located FileObject or null if none could be located. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String nameStr) throws FileSystemException { // Resolve the name, and create the file final FileName name = getFileSystemManager().resolveName(rootName, nameStr); return resolveFile(name); }
/** * Finds a file in this file system. * @param nameStr The name of the file to resolve. * @return The located FileObject or null if none could be located. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String nameStr) throws FileSystemException { // Resolve the name, and create the file final FileName name = getFileSystemManager().resolveName(rootName, nameStr); return resolveFile(name); }
protected FileObject decorateFileObject(FileObject file) throws FileSystemException { if (getFileSystemManager().getCacheStrategy().equals(CacheStrategy.ON_CALL)) { file = new OnCallRefreshFileObject(file); } if (getFileSystemManager().getFileObjectDecoratorConst() != null) { try { file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst() .newInstance(new Object[] { file }); } catch (final InstantiationException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (final IllegalAccessException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (final InvocationTargetException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } } return file; }
/** * Returns a child by name. * @param name The name of the child to locate. * @param scope the NameScope. * @return The FileObject for the file or null if the child does not exist. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String name, final NameScope scope) throws FileSystemException { // return fs.resolveFile(this.name.resolveName(name, scope)); return fs.resolveFile(fs.getFileSystemManager().resolveName(this.fileName, name, scope)); }
protected FileObject decorateFileObject(FileObject file) throws FileSystemException { if (getFileSystemManager().getCacheStrategy().equals(CacheStrategy.ON_CALL)) { file = new OnCallRefreshFileObject(file); } if (getFileSystemManager().getFileObjectDecoratorConst() != null) { try { file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst() .newInstance(new Object[] { file }); } catch (final InstantiationException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (final IllegalAccessException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (final InvocationTargetException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } } return file; }
protected FileObject decorateFileObject(FileObject file) throws FileSystemException { if (getFileSystemManager().getCacheStrategy().equals(CacheStrategy.ON_CALL)) { file = new OnCallRefreshFileObject(file); } if (getFileSystemManager().getFileObjectDecoratorConst() != null) { try { file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst() .newInstance(new Object[] { file }); } catch (final InstantiationException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (final IllegalAccessException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } catch (final InvocationTargetException e) { throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e); } } return file; }
/** * Finds a file, relative to this file. * * @param path The path of the file to locate. Can either be a relative * path, which is resolved relative to this file, or an * absolute path, which is resolved relative to the file system * that contains this file. * @return The FileObject. * @throws FileSystemException if an error occurs. */ @Override public FileObject resolveFile(final String path) throws FileSystemException { final FileName otherName = fs.getFileSystemManager().resolveName(fileName, path); return fs.resolveFile(otherName); }