@Override public String getDescription() { return "FS BatchIndex [" + ((FileSystemId) fs).id() + "]"; }
@Override public String getClusterId() { return fsId.id(); }
@Override public String getDescription() { return "FS BatchIndex [" + ((FileSystemId) fs).id() + "]"; }
@Override public String getClusterId() { return fsId.id(); }
public FileSystemMetadata(FileSystem fs) { if (fs.getRootDirectories().iterator().hasNext()) { Path root = fs.getRootDirectories().iterator().next(); final FileSystem realFS = root.getFileSystem(); isAFileSystemID = fs instanceof FileSystemId; if (isAFileSystemID) { id = ((FileSystemId) realFS).id(); } else { id = fs.toString(); } this.scheme = root.toUri().getScheme(); } this.uri = fs.toString(); }
public FileSystemMetadata(FileSystem fs) { if (fs.getRootDirectories().iterator().hasNext()) { Path root = fs.getRootDirectories().iterator().next(); final FileSystem realFS = root.getFileSystem(); isAFileSystemID = fs instanceof FileSystemId; if (isAFileSystemID) { id = ((FileSystemId) realFS).id(); } else { id = fs.toString(); } this.scheme = root.toUri().getScheme(); } this.uri = fs.toString(); }
@Override public String getClusterId() { final String fsId = ((FileSystemId) path.getFileSystem()).id(); final String segmentId = ((SegmentedPath) path).getSegmentId(); return fsId + File.separator + segmentId; }
@Override public String getClusterId() { final String fsId = ((FileSystemId) path.getFileSystem()).id(); final String segmentId = ((SegmentedPath) path).getSegmentId(); return fsId + File.separator + segmentId; }
@Override public String getClusterId() { final String fsId = ((FileSystemId) path.getFileSystem()).id(); final String segmentId = ((SegmentedPath) path).getSegmentId(); return fsId + File.separator + segmentId; }
@Override public String getClusterId() { final String fsId = ((FileSystemId) path.getFileSystem()).id(); final String segmentId = ((SegmentedPath) path).getSegmentId(); return fsId + File.separator + segmentId; }
@Override public String getClusterId() { final String fsId = ((FileSystemId) path.getFileSystem()).id(); final String segmentId = ((SegmentedPath) path).getSegmentId(); return fsId + File.separator + segmentId; }
@Override public String getClusterId() { final String fsId = ((FileSystemId) path.getFileSystem()).id(); final String segmentId = ((SegmentedPath) path).getSegmentId(); return fsId + File.separator + segmentId; }
public static KCluster toKCluster(final Path fsPath) { final String fsId = ((FileSystemId) fsPath.getFileSystem()).id(); final String segmentId = ((SegmentedPath) fsPath).getSegmentId(); return new KClusterImpl(fsId + File.separator + segmentId); }
public static KCluster toKCluster(final Path fsPath) { final String fsId = ((FileSystemId) fsPath.getFileSystem()).id(); final String segmentId = ((SegmentedPath) fsPath).getSegmentId(); return new KClusterImpl(fsId + File.separator + segmentId); }
@Override public String getClusterId() { return ((FileSystemId) getBasePath(LuceneSearchIndexTest.this.getClass().getSimpleName() + "_1").getFileSystem()).id(); }
@Override public String getClusterId() { return ((FileSystemId) getBasePath(LuceneSearchIndexTest.this.getClass().getSimpleName() + "_2").getFileSystem()).id(); }
@Override public String getClusterId() { return ((FileSystemId) getBasePath(LuceneSearchIndexTest.this.getClass().getSimpleName() + "_1").getFileSystem()).id(); }
@Override public String getClusterId() { return ((FileSystemId) getBasePath(LuceneSearchIndexTest.this.getClass().getSimpleName() + "_2").getFileSystem()).id(); }
@Before public void setup() { ioService = mock( IOService.class ); systemFS = mock( FileSystem.class ); final InboxEntrySecurity security = new InboxEntrySecurity() { @Override public List<InboxEntry> secure( List<InboxEntry> inboxEntries ) { return inboxEntries; } }; securitySpy = spy( security ); userServicesBackend = mock( UserServicesBackendImpl.class ); mailboxService = mock( MailboxService.class ); sessionInfo = mock( SessionInfo.class ); final User user = mock( User.class ); when( sessionInfo.getIdentity() ).thenReturn( user ); when( user.getIdentifier() ).thenReturn( "user1" ); resourcePath = mock( Path.class ); mockedFSId = mock( FileSystem.class, withSettings().extraInterfaces( FileSystemId.class ) ); when( resourcePath.toURI() ).thenReturn( URI.create( "jgit://repo/my-file.txt" ).toString() ); when( resourcePath.getFileName() ).thenReturn( "my-file.txt" ); final org.uberfire.java.nio.file.Path rootPath = mock( org.uberfire.java.nio.file.Path.class ); when( systemFS.getRootDirectories() ).thenReturn( Arrays.asList( rootPath ) ); when( mockedFSId.getRootDirectories() ).thenReturn( Arrays.asList( rootPath ) ); when( rootPath.getFileSystem() ).thenReturn( mockedFSId ); when( ( ( FileSystemId ) mockedFSId ).id() ).thenReturn( "my-fsid" ); }
when( ( (FileSystemId) mockedFSId ).id() ).thenReturn( "my-fsid" );