@Override public JComponent getView() { try { FileDirectoryHandler.open(getFile()); } catch (Exception e) { Log.Debug(e); } return null; }
/** * Fetches the physical file from db * * @return */ public synchronized File getFile() { if (file == null) { try { file = QueryHandler.instanceOf() .clone(Context.getFiles()) .retrieveFile(filename, new File(FileDirectoryHandler.getTempDir() + getCname())); } catch (Exception e) { Log.Debug(e); } } return file; }
protected boolean hasData() { File x = new File(FileDirectoryHandler.getTempDir() + saveFile); return x.exists() && x.canWrite() && x.canRead(); }