1 2 package org.enhydra.shark.scriptmappersistence; 3 4 import org.enhydra.shark.api.*; 5 import org.enhydra.shark.api.internal.scriptmappersistence.*; 6 import org.enhydra.shark.api.internal.working.CallbackUtilities; 7 import org.enhydra.dods.DODS; 8 9 10 14 public class DODSScriptMappingMgr implements ScriptMappingManager 15 { 16 public static boolean _debug_ = false; 17 18 private static final String DBG_PARAM_NAME = "DODSScriptMappingMgr.debug"; 19 20 public void configure (CallbackUtilities cus) throws RootException { 21 if (null == cus) 22 throw new RootException("Cannot configure without call back impl."); 23 _debug_ = Boolean 24 .valueOf(cus.getProperty(DBG_PARAM_NAME, "false")) 25 .booleanValue(); 26 } 27 28 public ScriptMappingTransaction getScriptMappingTransaction() throws TransactionException { 29 try { 30 return new DODSScriptMappingTransaction(DODS.getDatabaseManager().createTransaction()); 31 } catch (Exception ex) { 32 throw new TransactionException(ex); 33 } 34 } 35 } 36 37 | Popular Tags |