<?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 [solved] How to get the value of a custom aspect ? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194258#M147388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my first question here but i worked on alfresco for about 6 month now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently creating a complete wizard for a custom content type and i need to get an aspect value of the current folder but i don't&amp;nbsp; know how i can do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For the moment, i can only get the aspect list :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;NodeRef containerNodeRef;&lt;BR /&gt;String nodeId = this.navigator.getCurrentNodeId();&lt;BR /&gt;if(nodeId != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerNodeRef = this.nodeService.getRootNode(Repository.getStoreRef());&lt;BR /&gt;} else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerNodeRef = new NodeRef(Repository.getStoreRef(), nodeId);&lt;BR /&gt;}&lt;BR /&gt;Set aspects = nodeService.getAspects(containerNodeRef);&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;I can see all the aspects applied to the current space but how to get the value of one of the specific aspect property ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for my english, been a long time without speaking or writing in that language, i hope you can understand me &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Nov 2008 15:56:45 GMT</pubDate>
    <dc:creator>jbcordina</dc:creator>
    <dc:date>2008-11-06T15:56:45Z</dc:date>
    <item>
      <title>[solved] How to get the value of a custom aspect ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194258#M147388</link>
      <description>Hi,This is my first question here but i worked on alfresco for about 6 month now.I'm currently creating a complete wizard for a custom content type and i need to get an aspect value of the current folder but i don't&amp;nbsp; know how i can do.For the moment, i can only get the aspect list :NodeRef container</description>
      <pubDate>Thu, 06 Nov 2008 15:56:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194258#M147388</guid>
      <dc:creator>jbcordina</dc:creator>
      <dc:date>2008-11-06T15:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: [solved] How to get the value of a custom aspect ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194259#M147389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Object value = nodeService.getProperty(myNodeRef, myQName);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously cast the return value to whatever value was set there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will set the property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;this.nodeService.setProperty(myNodeRef,myQName,myObjectValue);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;It is assumed the [myQName] is defined in the model as a property of the aspect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you look in org.alfresco.model.ContentModel, it will give examples of how to create the proper QNames required to reference the property.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 16:45:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194259#M147389</guid>
      <dc:creator>nyronian</dc:creator>
      <dc:date>2008-11-06T16:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: [solved] How to get the value of a custom aspect ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194260#M147390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, it [solved] my problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 08:58:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/solved-how-to-get-the-value-of-a-custom-aspect/m-p/194260#M147390</guid>
      <dc:creator>jbcordina</dc:creator>
      <dc:date>2008-11-13T08:58:57Z</dc:date>
    </item>
  </channel>
</rss>

