/** Create a secondary file entry. * By default, {@link FileEntry.Numb} is used for the class files * * @param secondaryFile secondary file to create entry for * @return the entry */ protected MultiDataObject.Entry createSecondaryEntry (MultiDataObject obj, FileObject secondaryFile) { //The JavaDataObject itself has no secondary entries, but its subclasses have. //So we have to keep it as MultiFileLoader Logger.getLogger("global").log(Level.INFO, "Subclass of JavaDataLoader (" + this.getClass().getName() + ") has secondary entries but does not override createSecondaryEntries (MultidataObject, FileObject) method."); // NOI18N return new FileEntry.Numb(obj, secondaryFile); }
/** Removes file. * @throws IOException in case of problem */ private void stdBehaving () throws IOException { if (getFile() == null) return; if (isLocked()) throw new IOException (NbBundle.getBundle (FileEntry.class).getString ("EXC_SharedAccess")); FileLock lock = takeLock(); try { getFile().delete(lock); } finally { if (lock != null) lock.releaseLock(); } }
/** Removes file. * @param name ignored * @return <code>null</code> * @throws IOException in case of problem */ public FileObject rename (String name) throws IOException { stdBehaving(); return null; }
protected org.openide.loaders.MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile) { return new FileEntry.Numb(obj, secondaryFile); } }
/** Removes file. * @param f ignored * @param suffix ignored * @return <code>null</code> * @throws IOException in case of problem */ public FileObject move (FileObject f, String suffix) throws IOException { stdBehaving(); return null; }
/** Removes file. * @throws IOException in case of problem */ public void delete () throws IOException { stdBehaving(); }