List of usage examples for org.apache.wicket.util.value ValueMap getLong
@Override public final long getLong(final String key, final long defaultValue)
From source file:net.kornr.swit.button.ButtonResource.java
License:Apache License
@Override public IResourceStream getResourceStream() { ValueMap map = this.getParameters(); long id = map.getLong("id", -1); if (id > -1) { File cachedfile = s_fileCache.get(id); if (cachedfile == null) cachedfile = s_tempFileCache.get(id); if (cachedfile != null && cachedfile.exists()) { return new FileResourceStream(cachedfile); }//from w w w . j a v a 2 s . c o m boolean temporary = false; ButtonResourceKey k = s_cache.get(id); if (k == null) { k = s_tempCache.get(id); temporary = true; } File f = createImageFile(k); if (temporary) s_tempFileCache.put(id, f); else s_fileCache.put(id, f); return new FileResourceStream(f); } // TODO Auto-generated method stub return null; }