1 40 41 42 package org.jahia.engines; 43 44 import java.util.HashMap ; 45 46 import org.jahia.exceptions.JahiaException; 47 import org.jahia.services.acl.ACLNotFoundException; 48 import org.jahia.services.acl.JahiaBaseACL; 49 50 51 54 55 public class JahiaEngineTools { 56 57 58 private static final org.apache.log4j.Logger logger = 59 org.apache.log4j.Logger.getLogger (JahiaEngineTools.class); 60 61 62 72 public static JahiaBaseACL getCtnListFieldACL (HashMap aclsMap, int fieldID) { 73 if (aclsMap == null) 74 return null; 75 Integer I = (Integer ) aclsMap.get (new Integer (fieldID)); 76 if (I != null) { 77 try { 78 int aclID = I.intValue (); 79 logger.debug ("Looking for acl [" + aclID + "]"); 80 JahiaBaseACL theACL = null; 81 try { 82 theACL = new JahiaBaseACL (aclID); 83 84 } catch (ACLNotFoundException ex) { 85 logger.warn (ex); 86 87 } catch (JahiaException ex) { 88 logger.warn (ex); 89 } 90 return theACL; 91 } catch (Throwable t) { 92 t.printStackTrace (); 93 } 94 } 95 return null; 96 } 97 98 } 99 100 | Popular Tags |