@Test public void testRefreshesShares() throws Exception { ShareNotificationMessage message = new ShareNotificationMessage("http: sharingService.share = createShareWitzSize(FIRST_SHARE_SIZE); notifications.add(message); item = createItem(); assertShareSize(FIRST_SHARE_SIZE); sharingService.share = createShareWitzSize(SECOND_SHARE_SIZE); item.refresh(); assertShareSize(SECOND_SHARE_SIZE); }
public synchronized void refresh() { for (ShareNotificationMessage notification : notifications.getNotifications()) { try { sharingService.loadFileMetadata(notification, readBackend); initialized = false; reload(); return; } catch (IOException | InvalidKeyException | QblStorageException | UnmodifiedException ignored) { } } }
VirtualShareTreeItem extends TreeItem<BoxObject> { public synchronized void refresh() { for (ShareNotificationMessage notification : notifications.getNotifications()) { try { sharingService.loadFileMetadata(notification, readBackend); initialized = false; reload(); return; } catch (IOException | InvalidKeyException | QblStorageException | UnmodifiedException ignored) { } } } }
VirtualShareTreeItem extends TreeItem<BoxObject> { public synchronized void refresh() { for (ShareNotificationMessage notification : notifications.getNotifications()) { try { sharingService.loadFileMetadata(notification, readBackend); initialized = false; reload(); return; } catch (IOException | InvalidKeyException | QblStorageException | UnmodifiedException ignored) { } } } VirtualShareTreeItem(
            SharingService sharingService,
            AuthenticatedDownloader readBackend,
            ShareNotifications notifications,
            BoxObject value
    ); }
VirtualShareTreeItem extends TreeItem<BoxObject> { public synchronized void refresh() { for (ShareNotificationMessage notification : notifications.getNotifications()) { try { sharingService.loadFileMetadata(notification, readBackend); initialized = false; reload(); return; } catch (IOException | InvalidKeyException | QblStorageException | UnmodifiedException ignored) { } } } VirtualShareTreeItem(
            SharingService sharingService,
            AuthenticatedDownloader readBackend,
            ShareNotifications notifications,
            BoxObject value
    ); @Override boolean isLeaf(); @Override ObservableList<TreeItem<BoxObject>> getChildren(); synchronized void refresh(); }
VirtualShareTreeItem extends TreeItem<BoxObject> { public synchronized void refresh() { for (ShareNotificationMessage notification : notifications.getNotifications()) { try { sharingService.loadFileMetadata(notification, readBackend); initialized = false; reload(); return; } catch (IOException | InvalidKeyException | QblStorageException | UnmodifiedException ignored) { } } } VirtualShareTreeItem(
            SharingService sharingService,
            AuthenticatedDownloader readBackend,
            ShareNotifications notifications,
            BoxObject value
    ); @Override boolean isLeaf(); @Override ObservableList<TreeItem<BoxObject>> getChildren(); synchronized void refresh();  }