<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Automation : how to modify the position of a document in ordered folder ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319592#M6593</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to modify the position (to the top) of a document in an ordered folderish document via an automation chain...&lt;/P&gt;
&lt;P&gt;Any idea ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 28 Aug 2014 18:04:29 GMT</pubDate>
    <dc:creator>SylvainD_</dc:creator>
    <dc:date>2014-08-28T18:04:29Z</dc:date>
    <item>
      <title>Automation : how to modify the position of a document in ordered folder ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319592#M6593</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to modify the position (to the top) of a document in an ordered folderish document via an automation chain...&lt;/P&gt;
&lt;P&gt;Any idea ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2014 18:04:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319592#M6593</guid>
      <dc:creator>SylvainD_</dc:creator>
      <dc:date>2014-08-28T18:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automation : how to modify the position of a document in ordered folder ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319593#M6594</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Studio does not provide an operation to do so by default, but you may contribute your own. This will require some coding, but it can be achieved quite simply.&lt;/P&gt;
&lt;P&gt;The code called by the buttons in the user interface is the following :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://github.com/nuxeo/nuxeo-dm/blob/5.8/nuxeo-platform-webapp-core/src/main/java/org/nuxeo/ecm/webapp/contentbrowser/OrderableDocumentActions.java" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-dm/blob/5.8/nuxeo-platform-webapp-core/src/main/java/org/nuxeo/ecm/webapp/contentbrowser/OrderableDocumentActions.java&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If you look at it, you may see that there is a moveToTop() method, in which we use the documentManager (also called CoreSession). The CoreSession has a native function to reorder a document. Then we launch some specific events to update the other documents.&lt;/P&gt;
&lt;P&gt;The good thing is that the CoreSession can be called in many ways :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.nuxeo.com/development/2014/04/ways-nuxeo-platform-coresession/" target="test_blank"&gt;http://blogs.nuxeo.com/development/2014/04/ways-nuxeo-platform-coresession/&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Studio also provides an operation to launch some specific Seam events : User Interface &amp;gt; Raise Seam Events.&lt;/P&gt;
&lt;P&gt;This means that your operation only needs to move the document, then you can use the native operation in your chain to launch the events afterwards. So it can remain quite small and easy to maintain.&lt;/P&gt;
&lt;P&gt;If you wish to build this operation, here are a few links to get you started :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Getting started with Nuxeo IDE =&amp;gt; &lt;A href="http://doc.nuxeo.com/x/aoKE" target="test_blank"&gt;http://doc.nuxeo.com/x/aoKE&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Contributing an operation =&amp;gt; &lt;A href="http://doc.nuxeo.com/x/7QAz" target="test_blank"&gt;http://doc.nuxeo.com/x/7QAz&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Uploading a custom operation into Studio =&amp;gt; &lt;A href="http://doc.nuxeo.com/x/yIKE" target="test_blank"&gt;http://doc.nuxeo.com/x/yIKE&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope that helps !&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2014 11:40:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319593#M6594</guid>
      <dc:creator>Bertrand_Chauvi</dc:creator>
      <dc:date>2014-09-01T11:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automation : how to modify the position of a document in ordered folder ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319594#M6595</link>
      <description>&lt;P&gt;Thanks a lot to you for this explaination. I was afraid of this type of solution but it's just a step to pass... (and the beginning of a series of questions &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2014 20:21:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-how-to-modify-the-position-of-a-document-in-ordered/m-p/319594#M6595</guid>
      <dc:creator>SylvainD_</dc:creator>
      <dc:date>2014-09-01T20:21:45Z</dc:date>
    </item>
  </channel>
</rss>

