X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fjcr%2Futils%2FSingleSessionFileProvider.java;fp=org.argeo.eclipse.ui%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fjcr%2Futils%2FSingleSessionFileProvider.java;h=caa43481e11f8d5b56038e30efa1ae2515a17b8c;hb=3a0d866fbeea3f78c293212f4b4fbaeba7dfe2bd;hp=57bdf246ec6e244b212c92a2cf9f739a891a6184;hpb=b1dbb754c88b8609246b865a25bc946213370662;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/SingleSessionFileProvider.java b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/SingleSessionFileProvider.java index 57bdf246e..caa43481e 100644 --- a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/SingleSessionFileProvider.java +++ b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/SingleSessionFileProvider.java @@ -24,7 +24,7 @@ import javax.jcr.Session; import javax.jcr.nodetype.NodeType; import org.apache.commons.io.IOUtils; -import org.argeo.ArgeoException; +import org.argeo.eclipse.ui.EclipseUiException; import org.argeo.eclipse.ui.FileProvider; /** @@ -58,7 +58,7 @@ public class SingleSessionFileProvider implements FileProvider { ba = IOUtils.toByteArray(fis); } catch (Exception e) { - throw new ArgeoException("Stream error while opening file", e); + throw new EclipseUiException("Stream error while opening file", e); } finally { IOUtils.closeQuietly(fis); } @@ -74,7 +74,7 @@ public class SingleSessionFileProvider implements FileProvider { .getBinary().getStream(); return fis; } catch (RepositoryException re) { - throw new ArgeoException("Cannot get stream from file node for Id " + throw new EclipseUiException("Cannot get stream from file node for Id " + fileId, re); } } @@ -93,23 +93,23 @@ public class SingleSessionFileProvider implements FileProvider { // Sanity checks if (result == null) - throw new ArgeoException("File node not found for ID" + fileId); + throw new EclipseUiException("File node not found for ID" + fileId); // Ensure that the node have the correct type. if (!result.isNodeType(NodeType.NT_FILE)) - throw new ArgeoException( + throw new EclipseUiException( "Cannot open file children Node that are not of " + NodeType.NT_RESOURCE + " type."); Node child = result.getNodes().nextNode(); if (child == null || !child.isNodeType(NodeType.NT_RESOURCE)) - throw new ArgeoException( + throw new EclipseUiException( "ERROR: IN the current implemented model, " + NodeType.NT_FILE + " file node must have one and only one child of the nt:ressource, where actual data is stored"); return child; } catch (RepositoryException re) { - throw new ArgeoException("Erreur while getting file node of ID " + throw new EclipseUiException("Erreur while getting file node of ID " + fileId, re); } }