public class JGitFileSystemProvider extends Object implements SecuredFileSystemProvider, org.uberfire.commons.lifecycle.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(org.uberfire.commons.config.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(org.uberfire.commons.config.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 SecuredFileSystemProviderpublic void setJAASAuthenticator(org.jboss.errai.security.shared.service.AuthenticationService authenticator)
setJAASAuthenticator in interface SecuredFileSystemProviderpublic void setHTTPAuthenticator(org.jboss.errai.security.shared.service.AuthenticationService httpAuthenticator)
setHTTPAuthenticator in interface SecuredFileSystemProviderpublic void setSSHAuthenticator(SSHAuthenticator authenticator)
setSSHAuthenticator in interface SecuredFileSystemProviderpublic void dispose()
dispose in interface org.uberfire.commons.lifecycle.Disposablepublic <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 FileSystemProviderpublic boolean isDefault()
isDefault in interface FileSystemProviderpublic String getScheme()
getScheme in interface FileSystemProviderpublic FileSystem newFileSystem(Path path, Map<String,?> env) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newFileSystem in interface FileSystemProviderIllegalArgumentExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic FileSystem newFileSystem(URI uri, Map<String,?> env) throws IllegalArgumentException, IOException, SecurityException, FileSystemAlreadyExistsException
newFileSystem in interface FileSystemProviderIllegalArgumentExceptionIOExceptionSecurityExceptionFileSystemAlreadyExistsExceptionpublic FileSystem getFileSystem(URI uri) throws IllegalArgumentException, FileSystemNotFoundException, SecurityException
getFileSystem in interface FileSystemProviderIllegalArgumentExceptionFileSystemNotFoundExceptionSecurityExceptionpublic Path getPath(URI uri) throws IllegalArgumentException, FileSystemNotFoundException, SecurityException
getPath in interface FileSystemProviderIllegalArgumentExceptionFileSystemNotFoundExceptionSecurityExceptionpublic InputStream newInputStream(Path path, OpenOption... options) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newInputStream in interface FileSystemProviderIllegalArgumentExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic OutputStream newOutputStream(Path path, OpenOption... options) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newOutputStream in interface FileSystemProviderIllegalArgumentExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newFileChannel in interface FileSystemProviderIllegalArgumentExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newAsynchronousFileChannel in interface FileSystemProviderIllegalArgumentExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException
newByteChannel in interface FileSystemProviderIllegalArgumentExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionprotected boolean exists(Path path)
public DirectoryStream<Path> newDirectoryStream(Path path, DirectoryStream.Filter<Path> pfilter) throws IOException, SecurityException
newDirectoryStream in interface FileSystemProviderIOExceptionSecurityExceptionpublic void createDirectory(Path path, FileAttribute<?>... attrs) throws UnsupportedOperationException, IOException, SecurityException
createDirectory in interface FileSystemProviderUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws UnsupportedOperationException, IOException, SecurityException
createSymbolicLink in interface FileSystemProviderUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic void createLink(Path link, Path existing) throws UnsupportedOperationException, IOException, SecurityException
createLink in interface FileSystemProviderUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic void delete(Path path, DeleteOption... options) throws IOException, SecurityException
delete in interface FileSystemProviderIOExceptionSecurityExceptionpublic void deleteAsset(JGitPathImpl path, DeleteOption... options)
public void deleteBranch(JGitPathImpl path)
public boolean deleteIfExists(Path path, DeleteOption... options) throws IOException, SecurityException
deleteIfExists in interface FileSystemProviderIOExceptionSecurityExceptionpublic boolean deleteBranchIfExists(JGitPathImpl path)
public boolean deleteAssetIfExists(JGitPathImpl path, DeleteOption... options)
public Path readSymbolicLink(Path link) throws UnsupportedOperationException, IOException, SecurityException
readSymbolicLink in interface FileSystemProviderUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic void copy(Path source, Path target, CopyOption... options) throws UnsupportedOperationException, IOException, SecurityException
copy in interface FileSystemProviderUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic void move(Path source, Path target, CopyOption... options) throws DirectoryNotEmptyException, AtomicMoveNotSupportedException, IOException, SecurityException
move in interface FileSystemProviderDirectoryNotEmptyExceptionAtomicMoveNotSupportedExceptionIOExceptionSecurityExceptionpublic boolean isSameFile(Path pathA, Path pathB) throws IOException, SecurityException
isSameFile in interface FileSystemProviderIOExceptionSecurityExceptionpublic boolean isHidden(Path path) throws IllegalArgumentException, IOException, SecurityException
isHidden in interface FileSystemProviderIllegalArgumentExceptionIOExceptionSecurityExceptionpublic FileStore getFileStore(Path path) throws IOException, SecurityException
getFileStore in interface FileSystemProviderIOExceptionSecurityExceptionpublic void checkAccess(Path path, AccessMode... modes) throws UnsupportedOperationException, NoSuchFileException, AccessDeniedException, IOException, SecurityException
checkAccess in interface FileSystemProviderUnsupportedOperationExceptionNoSuchFileExceptionAccessDeniedExceptionIOExceptionSecurityExceptionpublic <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options) throws NoSuchFileException
getFileAttributeView in interface FileSystemProviderNoSuchFileExceptionpublic <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws NoSuchFileException, UnsupportedOperationException, IOException, SecurityException
readAttributes in interface FileSystemProviderNoSuchFileExceptionUnsupportedOperationExceptionIOExceptionSecurityExceptionpublic Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws UnsupportedOperationException, IllegalArgumentException, IOException, SecurityException
readAttributes in interface FileSystemProviderUnsupportedOperationExceptionIllegalArgumentExceptionIOExceptionSecurityExceptionpublic void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws UnsupportedOperationException, IllegalArgumentException, ClassCastException, IOException, SecurityException
setAttribute in interface FileSystemProviderUnsupportedOperationExceptionIllegalArgumentExceptionClassCastExceptionIOExceptionSecurityExceptionpublic JGitFileSystemProviderConfiguration getConfig()
public void setDetectedFS(org.eclipse.jgit.util.FS detectedFS)
public JGitFileSystemsManager getFsManager()
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.