1 17 package org.alfresco.web.config; 18 19 import java.util.Set ; 20 21 import org.alfresco.config.evaluator.Evaluator; 22 import org.alfresco.service.namespace.QName; 23 import org.alfresco.web.bean.repository.Node; 24 import org.alfresco.web.bean.repository.Repository; 25 26 31 public class AspectEvaluator implements Evaluator 32 { 33 38 public boolean applies(Object obj, String condition) 39 { 40 boolean result = false; 41 42 if (obj instanceof Node) 43 { 44 Set aspects = ((Node)obj).getAspects(); 45 if (aspects != null) 46 { 47 QName spaceQName = Repository.resolveToQName(condition); 48 result = aspects.contains(spaceQName); 49 } 50 } 51 52 return result; 53 } 54 55 } 56 | Popular Tags |