<?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 Re: How do I create sub-folders? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-create-sub-folders/m-p/294184#M247314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With some outside help, I was shown the best way to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, inject FileFolderService bean into my e-mail handling bean via the following code added to my bean's entry in InboundSMTP-context.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;property name="fileFolderService"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;ref bean="FileFolderService" /&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the code side, add the setter for the incoming FileFolderService, and then the actual code to make the folder (and get the node ID of it) becomes a simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;final FileInfo newFolder = fileFolderService.create(firstNodeRef, messageSubject, ContentModel.TYPE_FOLDER);&lt;BR /&gt;final NodeRef storageRef=newFolder.getNodeRef();&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2015 19:19:56 GMT</pubDate>
    <dc:creator>sscbrian</dc:creator>
    <dc:date>2015-08-03T19:19:56Z</dc:date>
    <item>
      <title>How do I create sub-folders?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-create-sub-folders/m-p/294183#M247313</link>
      <description>I'm working on an InboundSMTP override and am hung up with what seems like it should be a simple part…&amp;nbsp; How to create a sub-folder given a particular nodeRef.&amp;nbsp; Here's what I've got so far:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplicationContext appContext = new ClassPathXmlApplicationContext("alfresco/application-context.xml");/</description>
      <pubDate>Thu, 30 Jul 2015 16:37:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-create-sub-folders/m-p/294183#M247313</guid>
      <dc:creator>sscbrian</dc:creator>
      <dc:date>2015-07-30T16:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create sub-folders?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-create-sub-folders/m-p/294184#M247314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With some outside help, I was shown the best way to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, inject FileFolderService bean into my e-mail handling bean via the following code added to my bean's entry in InboundSMTP-context.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;property name="fileFolderService"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;ref bean="FileFolderService" /&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the code side, add the setter for the incoming FileFolderService, and then the actual code to make the folder (and get the node ID of it) becomes a simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;final FileInfo newFolder = fileFolderService.create(firstNodeRef, messageSubject, ContentModel.TYPE_FOLDER);&lt;BR /&gt;final NodeRef storageRef=newFolder.getNodeRef();&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 19:19:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-create-sub-folders/m-p/294184#M247314</guid>
      <dc:creator>sscbrian</dc:creator>
      <dc:date>2015-08-03T19:19:56Z</dc:date>
    </item>
  </channel>
</rss>

