AnsweredAssumed Answered

[SOLVED] Evaluator and service access

Question asked by maxenced on Aug 14, 2008
Latest reply on Aug 14, 2008 by maxenced
Hello all !

I have a little problem.
I want to acces in my evaluator to the personService, has anyone know how to do it ?

Extract form web-client-config.xml:

         <!– Launch Add Aspect Dialog –>
         <action id="addValidableTechniqueAction">
               <!– each permission can be an Allow or Deny check –>
               <permission allow="true">MYAPP_Approbateur_technique</permission>
               <param name="id">#{}</param>

Extract from my java Evaluator class:

   public boolean evaluate(Node arg0) {
      // TODO Auto-generated method stub
      logger.debug("INSIDE EVALUATOR");
      logger.debug("CurrentUserName:" + AuthenticationUtil.getCurrentUserName());
      logger.debug("SystemUserName:" + AuthenticationUtil.getSystemUserName());

      logger.debug("Infos service person:" + personService); //personService is null, and isn't be initialized becaus my action ins not yet called!!!!
      NodeRef nodeUser = personService.getPerson(AuthenticationUtil.getCurrentUserName());
      logger.debug("Mail:" + (String)nodeService.getProperty(nodeUser, ContentModel.PROP_EMAIL));
      return true;

Thanks in advance,