| 45 | protected final FileLocator fileLocator = new FileLocator(); |
| 46 | |
| 47 | public Map load(String configFileName) { |
| 48 | Map<String, TargetMetaDef> mps = new LinkedHashMap<String, TargetMetaDef>(); |
| 49 | try { |
| 50 | if (UtilValidate.isEmpty(configFileName)) |
| 51 | return mps; |
| 52 | |
| 53 | Document doc = buildDocument(configFileName); |
| 54 | if (doc == null) |
| 55 | return mps; |
| 56 | |
| 57 | Element root = doc.getRootElement(); |
| 58 | parse(root, mps); |
| 59 | |
| 60 | Debug.logVerbose("[JdonFramework]<!-- config load finished -->", module); |
| 61 | } catch (Exception ex) { |
| 62 | Debug.logError("[JdonFramework]configure FileName: " + configFileName + " parsed error: " + ex, module); |
| 63 | } |
| 64 | return mps; |
| 65 | } |
| 66 | |
| 67 | protected Document buildDocument(String configFileName) { |
| 68 | Debug.logVerbose("[JdonFramework] locate configure file :" + configFileName, module); |