X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fjcr%2Futils%2FJcrFileProvider.java;h=6967af4615fef58b440ef3552da14cbb3cff65f3;hb=3a0d866fbeea3f78c293212f4b4fbaeba7dfe2bd;hp=3ca745dc4eb3b9dac4d2a48282cfd5287f51a07e;hpb=261af6b864de167e10eed1916f83035cca71d32f;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/JcrFileProvider.java b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/JcrFileProvider.java index 3ca745dc4..6967af461 100644 --- a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/JcrFileProvider.java +++ b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/utils/JcrFileProvider.java @@ -23,7 +23,7 @@ import javax.jcr.RepositoryException; 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; /** @@ -92,7 +92,7 @@ public class JcrFileProvider 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); } @@ -108,7 +108,7 @@ public class JcrFileProvider 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); } } @@ -147,7 +147,7 @@ public class JcrFileProvider 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); Node child = null; @@ -164,7 +164,7 @@ public class JcrFileProvider implements FileProvider { } if (!isValid) - throw new ArgeoException( + throw new EclipseUiException( "ERROR: In the current implemented model, '" + NodeType.NT_FILE + "' file node must have a child node named jcr:content " @@ -173,7 +173,7 @@ public class JcrFileProvider implements FileProvider { 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); } }