/** * Migrate the deprecated queue file to the new format. */ @Override public void load() throws AccessDeniedException { this.lock(); try { final FolderTransferCollection favorites = FolderTransferCollection.defaultCollection(); if(file.exists()) { if(log.isInfoEnabled()) { log.info(String.format("Found queue file %s", file)); } favorites.load(reader.readCollection(file)); this.trash(); } else { favorites.load(); } } finally { this.unlock(); } super.load(); }
@Override public void load() throws AccessDeniedException { if(log.isInfoEnabled()) { log.info(String.format("Reloading %s", folder)); } this.lock(); try { if(!folder.exists()) { new DefaultLocalDirectoryFeature().mkdir(folder); } final AttributedList<Local> groups = folder.list().filter( new NullFilter<Local>() { @Override public boolean accept(final Local file) { return file.isDirectory(); } } ); for(Local group : groups) { this.add(new FolderBookmarkCollection(group, group.getName())); } } finally { this.unlock(); } super.load(); }
this.unlock(); super.load();