1 package de.webman.sync.ldap; 2 3 import de.webman.sync.ACLAdaptor; 4 import de.webman.sync.ACLAdaptorFactory; 5 import de.webman.sync.SyncException; 6 import org.apache.log4j.Category; 7 import java.io.File ; 8 9 15 public class LDAPAdaptorFactory 16 implements ACLAdaptorFactory 17 { 18 19 22 private static Category cat = Category.getInstance(LDAPAdaptorFactory.class); 23 24 27 private String basedir = "/"; 28 29 34 public ACLAdaptor newACLAdaptor() 35 throws SyncException 36 { 37 try { 38 File cfgfile = new File (basedir, "WEB-INF/classes/ldap.xml"); 39 return new LDAPAdaptor(cfgfile); 40 } 41 catch (Exception ioe) { 42 throw new SyncException(ioe); 43 } 44 } 45 46 49 public void setProperty(String key, Object val) { 50 if ("basedir".equals(key)) 51 basedir = (String )val; 52 else 53 cat.error("unknown property key '" + key + "'"); 54 } 55 } 56 | Popular Tags |