ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport(); IPersistentItem persistentItem = sp.getIPersistentItem(); IItem item = (IItem) persistentItem.readByOID(Item.class, itemId); IFileSuport fileSuport = FileSuport.getInstance(); try { fileSuport.beginTransaction(); } catch (Exception e1) { throw new FenixServiceException(e1); } fileSuport.deleteFile(item.getSlideName() + "/" + fileName); try { fileSuport.commitTransaction(); } catch (Exception e2) { try { fileSuport.abortTransaction(); throw new FenixServiceException(e2); } catch (Exception e3) { throw new FenixServiceException(e3); } }
final ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport(); final IPersistentItem persistentItem = sp.getIPersistentItem(); final IItem item = (IItem) persistentItem.readByOID(Item.class, itemId); final String slidename = item.getSlideName(); JdbcMysqlFileSupport.deleteFile(slidename, fileName);
	public void run(Integer itemId, String fileName) throws FenixServiceException, ExcepcaoPersistencia,			SlideException {		ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();		IPersistentItem persistentItem = sp.getIPersistentItem();		IItem item = (IItem) persistentItem.readByOID(Item.class, itemId);		IFileSuport fileSuport = FileSuport.getInstance();		try {			fileSuport.beginTransaction();		} catch (Exception e1) {			throw new FenixServiceException(e1);		}		fileSuport.deleteFile(item.getSlideName() + "/" + fileName);		try {			fileSuport.commitTransaction();		} catch (Exception e2) {			try {				fileSuport.abortTransaction();				throw new FenixServiceException(e2);			} catch (Exception e3) {				throw new FenixServiceException(e3);			}		}	}