public class JGitFileSystemProvider extends Object implements SecuredFileSystemProvider, Disposable
Modifier and Type | Class and Description |
---|---|
class |
JGitFileSystemProvider.RepositoryResolverImpl<T> |
Constructor and Description |
---|
JGitFileSystemProvider()
Creates a JGit filesystem provider which takes its configuration from system properties.
|
JGitFileSystemProvider(ConfigProperties gitPrefs,
ExecutorService executorService)
Creates a JGit filesystem provider which takes its configuration from the given ConfigProperties instance.
|
JGitFileSystemProvider(Map<String,String> gitPrefs)
Creates a JGit filesystem provider which takes its configuration from the given map.
|
public JGitFileSystemProvider()
public JGitFileSystemProvider(Map<String,String> gitPrefs)
public JGitFileSystemProvider(ConfigProperties gitPrefs, ExecutorService executorService)
protected void setupFileSystemsManager()
public void onCloseFileSystem(JGitFileSystem fileSystem)
protected void shutdownEventsManager()
public void onDisposeFileSystem(JGitFileSystem fileSystem)
public void setAuthorizer(FileSystemAuthorizer authorizer)
setAuthorizer
in interface SecuredFileSystemProvider
public void setJAASAuthenticator(org.jboss.errai.security.shared.service.AuthenticationService authenticator)
setJAASAuthenticator
in interface SecuredFileSystemProvider
public void setHTTPAuthenticator(org.jboss.errai.security.shared.service.AuthenticationService httpAuthenticator)
setHTTPAuthenticator
in interface SecuredFileSystemProvider
public void setSSHAuthenticator(SSHAuthenticator authenticator)
setSSHAuthenticator
in interface SecuredFileSystemProvider
public void dispose()
dispose
in interface Disposable
public <T> org.eclipse.jgit.transport.ReceivePack getReceivePack(String protocol, T req, org.eclipse.jgit.lib.Repository db)
public <T> JGitFileSystemProvider.RepositoryResolverImpl<T> getRepositoryResolver()
public void shutdown()
public File getGitRepoContainerDir()
public void forceAsDefault()
forceAsDefault
in interface FileSystemProvider
public boolean isDefault()
isDefault
in interface FileSystemProvider
public String getScheme()
getScheme
in interface FileSystemProvider
public FileSystem newFileSystem(Path path, Map<String,?> env) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newFileSystem
in interface FileSystemProvider
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
public FileSystem newFileSystem(URI uri, Map<String,?> env) throws IllegalArgumentException, IOException, SecurityException, FileSystemAlreadyExistsException
newFileSystem
in interface FileSystemProvider
IllegalArgumentException
IOException
SecurityException
FileSystemAlreadyExistsException
public FileSystem getFileSystem(URI uri) throws IllegalArgumentException, FileSystemNotFoundException, SecurityException
getFileSystem
in interface FileSystemProvider
IllegalArgumentException
FileSystemNotFoundException
SecurityException
public Path getPath(URI uri) throws IllegalArgumentException, FileSystemNotFoundException, SecurityException
getPath
in interface FileSystemProvider
IllegalArgumentException
FileSystemNotFoundException
SecurityException
public InputStream newInputStream(Path path, OpenOption... options) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newInputStream
in interface FileSystemProvider
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
public OutputStream newOutputStream(Path path, OpenOption... options) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newOutputStream
in interface FileSystemProvider
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newFileChannel
in interface FileSystemProvider
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newAsynchronousFileChannel
in interface FileSystemProvider
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newByteChannel
in interface FileSystemProvider
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
protected boolean exists(Path path)
public DirectoryStream<Path> newDirectoryStream(Path path, DirectoryStream.Filter<Path> pfilter) throws IOException, SecurityException
newDirectoryStream
in interface FileSystemProvider
IOException
SecurityException
public void createDirectory(Path path, FileAttribute<?>... attrs) throws UnsupportedOperationException, IOException, SecurityException
createDirectory
in interface FileSystemProvider
UnsupportedOperationException
IOException
SecurityException
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws UnsupportedOperationException, IOException, SecurityException
createSymbolicLink
in interface FileSystemProvider
UnsupportedOperationException
IOException
SecurityException
public void createLink(Path link, Path existing) throws UnsupportedOperationException, IOException, SecurityException
createLink
in interface FileSystemProvider
UnsupportedOperationException
IOException
SecurityException
public void delete(Path path, DeleteOption... options) throws IOException, SecurityException
delete
in interface FileSystemProvider
IOException
SecurityException
protected boolean deleteFS(FileSystem fileSystem)
public void deleteAsset(JGitPathImpl path, DeleteOption... options)
public void deleteBranch(JGitPathImpl path)
public boolean deleteIfExists(Path path, DeleteOption... options) throws IOException, SecurityException
deleteIfExists
in interface FileSystemProvider
IOException
SecurityException
public boolean deleteBranchIfExists(JGitPathImpl path)
public boolean deleteAssetIfExists(JGitPathImpl path, DeleteOption... options)
public Path readSymbolicLink(Path link) throws UnsupportedOperationException, IOException, SecurityException
readSymbolicLink
in interface FileSystemProvider
UnsupportedOperationException
IOException
SecurityException
public void copy(Path source, Path target, CopyOption... options) throws UnsupportedOperationException, IOException, SecurityException
copy
in interface FileSystemProvider
UnsupportedOperationException
IOException
SecurityException
public void move(Path source, Path target, CopyOption... options) throws DirectoryNotEmptyException, AtomicMoveNotSupportedException, IOException, SecurityException
move
in interface FileSystemProvider
DirectoryNotEmptyException
AtomicMoveNotSupportedException
IOException
SecurityException
public boolean isSameFile(Path pathA, Path pathB) throws IOException, SecurityException
isSameFile
in interface FileSystemProvider
IOException
SecurityException
public boolean isHidden(Path path) throws IllegalArgumentException, IOException, SecurityException
isHidden
in interface FileSystemProvider
IllegalArgumentException
IOException
SecurityException
public FileStore getFileStore(Path path) throws IOException, SecurityException
getFileStore
in interface FileSystemProvider
IOException
SecurityException
public void checkAccess(Path path, AccessMode... modes) throws UnsupportedOperationException, NoSuchFileException, AccessDeniedException, IOException, SecurityException
checkAccess
in interface FileSystemProvider
UnsupportedOperationException
NoSuchFileException
AccessDeniedException
IOException
SecurityException
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options) throws NoSuchFileException
getFileAttributeView
in interface FileSystemProvider
NoSuchFileException
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws NoSuchFileException, UnsupportedOperationException, IOException, SecurityException
readAttributes
in interface FileSystemProvider
NoSuchFileException
UnsupportedOperationException
IOException
SecurityException
public Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws UnsupportedOperationException, IllegalArgumentException, IOException, SecurityException
readAttributes
in interface FileSystemProvider
UnsupportedOperationException
IllegalArgumentException
IOException
SecurityException
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws UnsupportedOperationException, IllegalArgumentException, ClassCastException, IOException, SecurityException
setAttribute
in interface FileSystemProvider
UnsupportedOperationException
IllegalArgumentException
ClassCastException
IOException
SecurityException
public JGitFileSystemProviderConfiguration getConfig()
public void setDetectedFS(org.eclipse.jgit.util.FS detectedFS)
public JGitFileSystemsManager getFsManager()
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.