@Test public void testBookmark() throws Exception { FinderLocal l = new FinderLocal(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString(), new AliasFilesystemBookmarkResolver()); assertNull(l.getBookmark()); new DefaultLocalTouchFeature().touch(l); assertNotNull(l.getBookmark()); assertEquals(l.getBookmark(), l.getBookmark()); l.delete(); }
@Override public String getBookmark() { final String path = this.getAbbreviatedPath(); String bookmark = PreferencesFactory.get().getProperty(String.format("local.bookmark.%s", path)); if(StringUtils.isBlank(bookmark)) { try { bookmark = resolver.create(this); } catch(AccessDeniedException e) { log.warn(String.format("Failure resolving bookmark for %s. %s", this, e)); } } return bookmark; }
FinderLocal extends Local { @Override public String getBookmark() { final String path = this.getAbbreviatedPath(); String bookmark = PreferencesFactory.get().getProperty(String.format("local.bookmark.%s", path)); if(StringUtils.isBlank(bookmark)) { try { bookmark = resolver.create(this); } catch(AccessDeniedException e) { log.warn(String.format("Failure resolving bookmark for %s. %s", this, e)); } } return bookmark; } }
FinderLocal extends Local { @Override public String getBookmark() { final String path = this.getAbbreviatedPath(); String bookmark = PreferencesFactory.get().getProperty(String.format("local.bookmark.%s", path)); if(StringUtils.isBlank(bookmark)) { try { bookmark = resolver.create(this); } catch(AccessDeniedException e) { log.warn(String.format("Failure resolving bookmark for %s. %s", this, e)); } } return bookmark; } FinderLocal(final Local parent, final String name);  FinderLocal(final Local parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String parent, final String name);  FinderLocal(final String parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String path);  FinderLocal(final String name, final FilesystemBookmarkResolver<NSURL> resolver); }
FinderLocal extends Local { @Override public String getBookmark() { final String path = this.getAbbreviatedPath(); String bookmark = PreferencesFactory.get().getProperty(String.format("local.bookmark.%s", path)); if(StringUtils.isBlank(bookmark)) { try { bookmark = resolver.create(this); } catch(AccessDeniedException e) { log.warn(String.format("Failure resolving bookmark for %s. %s", this, e)); } } return bookmark; } FinderLocal(final Local parent, final String name);  FinderLocal(final Local parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String parent, final String name);  FinderLocal(final String parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String path);  FinderLocal(final String name, final FilesystemBookmarkResolver<NSURL> resolver); @Override T serialize(final Serializer dict); @Override String getDisplayName(); @Override String getAbbreviatedPath(); @Override Local getVolume(); @Override boolean exists(final LinkOption... options); @Override String getBookmark(); @Override void setBookmark(final String data); @Override AttributedList<Local> list(final Filter<String> filter); @Override OutputStream getOutputStream(boolean append); @Override NSURL lock(final boolean interactive); @Override void release(final Object lock); @Override InputStream getInputStream(); @Override FinderLocalAttributes attributes(); }
FinderLocal extends Local { @Override public String getBookmark() { final String path = this.getAbbreviatedPath(); String bookmark = PreferencesFactory.get().getProperty(String.format("local.bookmark.%s", path)); if(StringUtils.isBlank(bookmark)) { try { bookmark = resolver.create(this); } catch(AccessDeniedException e) { log.warn(String.format("Failure resolving bookmark for %s. %s", this, e)); } } return bookmark; } FinderLocal(final Local parent, final String name);  FinderLocal(final Local parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String parent, final String name);  FinderLocal(final String parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String path);  FinderLocal(final String name, final FilesystemBookmarkResolver<NSURL> resolver); @Override T serialize(final Serializer dict); @Override String getDisplayName(); @Override String getAbbreviatedPath(); @Override Local getVolume(); @Override boolean exists(final LinkOption... options); @Override String getBookmark(); @Override void setBookmark(final String data); @Override AttributedList<Local> list(final Filter<String> filter); @Override OutputStream getOutputStream(boolean append); @Override NSURL lock(final boolean interactive); @Override void release(final Object lock); @Override InputStream getInputStream(); @Override FinderLocalAttributes attributes();  }