<?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: Module Applying Aspects to Default Spaces at Bootstrap? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273082#M226212</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know what's special about sys:hidden that it can't be applied.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In terms of the XPath and leading "/": You only need the leading "/" since your bootstrap path (in the Spring *context.xml) is already set to "/app:company_home" and from there, the import can't find the relative path "app:company_home/st:sites". By specifying a leading "/" you force the search from the root using an absolute path. What I usually do is, have the path in the *context.xml as just "/" and then use relative paths from that on. I personally don't like import views where a base location is specified via *context.xml, but the view supersedes this with an absolute path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Aug 2012 13:27:52 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2012-08-04T13:27:52Z</dc:date>
    <item>
      <title>Module Applying Aspects to Default Spaces at Bootstrap?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273078#M226208</link>
      <description>I've got a use case where I need to apply an aspect to a couple default spaces. The built-in space definitions don't have node UUID's, so it appears that using the bootstrap spaces to UPDATE these won't work, correct? I've attempted to create my own versions of the "view" XML documents in the same p</description>
      <pubDate>Thu, 02 Aug 2012 14:34:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273078#M226208</guid>
      <dc:creator>pjaromin</dc:creator>
      <dc:date>2012-08-02T14:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Module Applying Aspects to Default Spaces at Bootstrap?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273079#M226209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;relying on node UUIDs for bootstrap should be considered bad practice in my opinion. The import mechanism allows for different types of references besides UUID. In the scope of a single self-contained bootstrap you can use a bootstrap-local, internal import ID to reference nodes imported in the same view. For all other instances you can use XPath references to select nodes with well known paths (such as default spaces) and then use that reference to update them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is slightly different than a UUID based update, which is the only type documented in the wiki. I usually use it when I need to add new nodes to different existing locations and don't want to split up my import view into hundreds of small XMLs. Please find an adapted example below:&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;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;BR /&gt;&amp;lt;view:view xmlns:view="&lt;A href="http://www.alfresco.org/view/repository/1.0" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/view/repository/1.0&lt;/A&gt;" xmlns:sys="&lt;A href="http://www.alfresco.org/model/system/1.0" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0&lt;/A&gt;" xmlns:cm="&lt;A href="http://www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;" xmlns:custom="&lt;A href="http://www.example.com/model/custom/0.1" rel="nofollow noopener noreferrer"&gt;http://www.example.com/model/custom/0.1&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;view:reference view:pathref="app:company_home/cm:yourExistingSpace"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;view:aspects&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;custom:myAspect /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/view:aspects&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/view:reference&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/view:view&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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 06:49:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273079#M226209</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-08-03T06:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Module Applying Aspects to Default Spaces at Bootstrap?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273080#M226210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for this. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried it but it doesn't appear to be working for me, so perhaps I've got something wrong here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the spaces we wish to hide (as it can't be removed without breaking Share) is the "Sites" folder. So my test view file looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;BR /&gt;&amp;lt;view:view xmlns:view="&lt;A href="http://www.alfresco.org/view/repository/1.0" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/view/repository/1.0&lt;/A&gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns:sys="&lt;A href="http://www.alfresco.org/model/system/1.0" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0&lt;/A&gt;" xmlns:cm="&lt;A href="http://www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns:custom="&lt;A href="http://www.example.com/model/custom/0.1" rel="nofollow noopener noreferrer"&gt;http://www.example.com/model/custom/0.1&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;view:reference view:pathref="/app:company_home/st:sites"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;view:aspects&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;sys:hidden /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/view:aspects&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/view:reference&amp;gt;&lt;BR /&gt;&amp;lt;/view:view&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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;(note - bootstrap fails if I don't include the leading '/' in the pathref above, complains it can't find the path)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I've added an entry into the bootstrapViews list that looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;props&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;prop key="uuidBinding"&amp;gt;UPDATE_EXISTING&amp;lt;/prop&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;prop key="path"&amp;gt;/${spaces.company_home.childname}&amp;lt;/prop&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;prop key="location"&amp;gt;alfresco/module/${artifactId}/bootstrap/hideSpaces.xml&amp;lt;/prop&amp;gt;&lt;BR /&gt;&amp;lt;/props&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried both with and without the uuidBinding, modifying the path in the view, etc. and the result is always the same - the aspect is not applied to the space.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you see what may be wrong here?&amp;nbsp; I'm running community 4.0.d.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 18:34:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273080#M226210</guid>
      <dc:creator>pjaromin</dc:creator>
      <dc:date>2012-08-03T18:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Module Applying Aspects to Default Spaces at Bootstrap?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273081#M226211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, so it looks like something else is going on. This method appears to work just fine for other aspects. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only aspect I &lt;/SPAN&gt;&lt;STRONG&gt;can't&lt;/STRONG&gt;&lt;SPAN&gt; seem to apply with this is "sys:hidden".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 20:09:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273081#M226211</guid>
      <dc:creator>pjaromin</dc:creator>
      <dc:date>2012-08-03T20:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Module Applying Aspects to Default Spaces at Bootstrap?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273082#M226212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know what's special about sys:hidden that it can't be applied.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In terms of the XPath and leading "/": You only need the leading "/" since your bootstrap path (in the Spring *context.xml) is already set to "/app:company_home" and from there, the import can't find the relative path "app:company_home/st:sites". By specifying a leading "/" you force the search from the root using an absolute path. What I usually do is, have the path in the *context.xml as just "/" and then use relative paths from that on. I personally don't like import views where a base location is specified via *context.xml, but the view supersedes this with an absolute path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 13:27:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273082#M226212</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-08-04T13:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Module Applying Aspects to Default Spaces at Bootstrap?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273083#M226213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, I was trying to sort this out and figure out the best approach here. Seemed rather arbitrary which portion of the path to specify in the context vs. the view. I had recently actually changed the context path to '/' just as you suggest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for 'sys:hidden' I've not debugged this, but it clearly is the case as I've subsequently applied numerous other aspects and always all but sys:hidden takes using your method. I wound up (for now) extending the module bootstrap importer and adding code to specifically apply the sys:hidden aspect. Doing it through the Java API does work, so it's clearly something about the view importer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I needed my own Java module bootstrap class to perform some post import steps anyway due to the multilingual documents not properly importing from ACP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 22:29:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/module-applying-aspects-to-default-spaces-at-bootstrap/m-p/273083#M226213</guid>
      <dc:creator>pjaromin</dc:creator>
      <dc:date>2012-08-04T22:29:30Z</dc:date>
    </item>
  </channel>
</rss>

