@Override public AttributedList<TransferItem> put(final TransferItem item, final AttributedList<TransferItem> children) { return AttributedList.emptyList(); } };
@Override public AttributedList<Path> put(final Path directory, final AttributedList<Path> children) { return AttributedList.emptyList(); } };
@Override public AttributedList<Path> initialize() { return AttributedList.emptyList(); }
@Override public AttributedList<Path> initialize() { return AttributedList.emptyList(); }
/** * Remove the cached directory listing for this path * * @param reference Reference to the path in cache. * @return The previously cached directory listing */ public AttributedList<T> remove(final T reference) { final AttributedList<T> removed = impl.remove(reference); if(null == removed) { // Not previously in cache return AttributedList.emptyList(); } return removed; }
/** * @param reference Absolute path * @return An empty list if no cached file listing is available * @throws java.util.ConcurrentModificationException If the caller is iterating of the cache himself * and requests a new filter here. */ public AttributedList<T> get(final T reference) { AttributedList<T> children = impl.get(reference); if(null == children) { if(log.isDebugEnabled()) { log.debug(String.format("No cache for %s", reference)); } return AttributedList.emptyList(); } return children; }
@Override public void cleanup(final AttributedList<Path> list) { // Update the working directory if listing is successful if(!(AttributedList.<Path>emptyList() == list)) { // Cache directory listing cache.put(directory, list); } }
@Override public void cleanup(final AttributedList<Path> list) { // Put into cache super.cleanup(list); // Update the working directory if listing is successful if(!(AttributedList.<Path>emptyList() == list)) { // Reload browser reload(browser, model, workdir, selected, folder); } } }
@Override public AttributedList<Path> search(final Path workdir, final Filter<Path> regex, final ListProgressListener listener) throws BackgroundException { try { return new DriveSearchListService(session, fileid, regex.toPattern().pattern()).list(workdir, listener); } catch(NotfoundException e) { return AttributedList.emptyList(); } }