private void parse(final ProtocolFactory protocols, NSDictionary serialized) { List<NSDictionary> items = new PlistDeserializer(serialized).listForKey("BookmarkItems"); for(NSDictionary item : items) { final PlistDeserializer bookmark = new PlistDeserializer(item); String classname = bookmark.stringForKey("ClassName"); if(null == classname) { continue; } if("Bookmark".equals(classname)) { this.read(protocols, bookmark); } if("BookmarkFolder".equals(classname)) { this.parse(protocols, item); } } }
@Override protected void parse(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { NSDictionary serialized = NSDictionary.dictionaryWithContentsOfFile(file.getAbsolute()); if(null == serialized) { throw new LocalAccessDeniedException(String.format("Invalid bookmark file %s", file)); } this.parse(protocols, serialized); }
public ImporterBackgroundAction(final AbstractHostCollection bookmarks, final CountDownLatch lock) { this(bookmarks, lock, Arrays.asList( new Transmit4BookmarkCollection(), new FilezillaBookmarkCollection(), new FetchBookmarkCollection(), new FlowBookmarkCollection(), new InterarchyBookmarkCollection(), new CrossFtpBookmarkCollection(), new FireFtpBookmarkCollection(), new Expandrive3BookmarkCollection(), new Expandrive4BookmarkCollection(), new Expandrive5BookmarkCollection(), new Expandrive6BookmarkCollection())); }
this.add(host); return true;