AnsweredAssumed Answered

4.0 - Evaluators for associations

Question asked by bengrah on Apr 30, 2012
Latest reply on Oct 30, 2013 by deepak1987
Hi guys,

In Share 4.0 I've done some work with the new evaluators. So for example, in custom-slingshot-application-context.xml I added the following bean:

<bean id="evaluator.doclib.metadata.email" class="org.alfresco.web.evaluator.HasAspectEvaluator">
      <property name="aspects">
         <list>
            <value>imap:imapContent</value>
         </list>
      </property>
   </bean>

All this does is use the HasAspectEvaluator to check if the node in question has the out of the box imap aspect attached to it. Then in share-config-custom.xml I have the following:

<config evaluator="string-compare" condition="DocumentLibrary">

      <indicators>
         <indicator id="miller-email-icon" index="10" label="status.miller-notifications-set">
            <evaluator>
               evaluator.doclib.metadata.miller.email
            </evaluator>
         </indicator>
      </indicators>
</config>

Then I get a small mail icon appearing next to any .emls .

Next, I'd like to do something similar only with emails that have attachments. Alfresco IMAP automatically extracts an attachment and places it into a folder that sits alongside the email in the repo. As for the email itself, it then has 2 or more associations linking to the attachment folder and attachment(s).

What I'd like to do is use an evaluator to check if the node in question has any associations of type "imap:attachmentsFolder", but I'm not sure if there's an evaluator (like HasAspectEvaluator) available to do this.

Anyone any ideas?

Thanks,
ben.

Outcomes