KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > scriptmappersistence > DODSScriptMappingMgr


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 /**
11  * Implementation of ScriptMappingsManager interface
12  * @author Zoran Milakovic
13  */

14 public class DODSScriptMappingMgr implements ScriptMappingManager
15 {
16    public static boolean _debug_ = false;
17
18    private static final String JavaDoc 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 JavaDoc ex) {
32                throw new TransactionException(ex);
33              }
34    }
35 }
36
37
Popular Tags