<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:x="urn:schemas-microsoft-com:office:excel" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<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]-->
<title>AW: [opencms-dev] set last modified of a file</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* 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:red;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>After
consulting the API documentation quickly it seems that code like below should
work: -<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>com.opencms.file.CmsObject
oFile = cmsa.getCmsObject(); // cms is the JspActionElement instance.<br>
oFile.touch( "/dir/dir/file.html", System.currentTimeMillis()
,false); <br>
oFile.unlockResource( "/dir/dir/file.html");<o:p></o:p></span></font></p>

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

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

<div>

<div style='margin-left:36.0pt'>

<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>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
opencms-dev-admin@opencms.org [mailto:opencms-dev-admin@opencms.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Arno Illmann, e-Commerce Team
SO<br>
<b><span style='font-weight:bold'>Sent:</span></b> 28 April 2004 07:07<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">'</st1:PersonName><st1:PersonName
w:st="on">opencms-dev@opencms.org</st1:PersonName><st1:PersonName w:st="on">'</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> AW: [opencms-dev] set
last modified of a file</span></font><o:p></o:p></p>

</div>

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

<p style='margin-left:36.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>Unlocking the resource?</span></font> <o:p></o:p></p>

</div>

</body>

</html>
<BR>

<P><FONT SIZE=2>---<BR>
Incoming mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (http://www.grisoft.com).<BR>
Version: 6.0.669 / Virus Database: 431 - Release Date: 26/04/2004<BR>
</FONT> </P><BR>

<P><FONT SIZE=2>---<BR>
Outgoing mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (http://www.grisoft.com).<BR>
Version: 6.0.669 / Virus Database: 431 - Release Date: 26/04/2004<BR>
</FONT> </P>