<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--p
        {white-space: pre-wrap;}
li
        {white-space: pre-wrap;}

 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"DejaVu Sans";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

<meta name=qrichtext content=1>
</head>

<body lang=FR link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>I’d like to do the
same thing, I have the same result…<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>I work on OpenCms 7.0.5.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De :</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <b><span
style='font-weight:bold'>De la part de</span></b> Yves Glodt<br>
<b><span style='font-weight:bold'>Envoyé :</span></b> lundi 8 décembre
2008 17:12<br>
<b><span style='font-weight:bold'>À :</span></b> The OpenCms mailing list<br>
<b><span style='font-weight:bold'>Objet :</span></b> Re: [opencms-dev]
Access a file by uuid</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt'><font size=1 face="DejaVu Sans"><span
style='font-size:9.0pt;font-family:"DejaVu Sans"'>On Monday 08 December 2008
16:56:02 Yves Glodt wrote:<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
Hello,<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
is it possible to find and access a file in the VFS by it's uuid?<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>Sorry
for selfreplying but I found a way to do it in the meantime:<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>CmsObject
cms = OpenCms.initCmsObject("FileReader");<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>cms.loginUser("user",
"pass");<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>CmsResource
res = cms.readResource(new CmsUUID("dd8e049e-c2d4-11dd-<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>a9f2-0015174f605e"));<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>But
unfortunately it produces an error:<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>"Error
reading resource with the ID dd8e049e-c2d4-11dd-a9f2-0015174f605e."<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>Any
idea why?<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>Best
regards,<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>Yves<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
Background: I have certains PDF documents in my vfs which are not<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
accessible for any user, logged in or not, and I want to serve them with<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
obfuscated urls à la /getFile.jsp?id=xxxxxx and it would be nice if I could<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
just use the uuid to identify them.<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
I use OpenCms 7.0.4. Maybe there is another way to achieve this...? :-)<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
Best regards,<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0'><font size=1
face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'>>
Yves<o:p></o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

<p style='margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0'><font
size=1 face="DejaVu Sans"><span style='font-size:9.0pt;font-family:"DejaVu Sans"'><o:p> </o:p></span></font></p>

</div>

</body>

</html>