01: /*
02: * To change this template, choose Tools | Templates
03: * and open the template in the editor.
04: */
05:
06: package org.netbeans.modules.reportgenerator.generator;
07:
08: import java.util.HashMap;
09: import java.util.Map;
10: import org.netbeans.modules.reportgenerator.api.ReportCustomizationOptions;
11: import org.openide.loaders.DataObject;
12:
13: /**
14: *
15: * @author radval
16: */
17: public class DataObjectSettings {
18:
19: private static Map<DataObject, ReportCustomizationOptions> mDataObjectToOptionsMap = new HashMap<DataObject, ReportCustomizationOptions>();
20:
21: public static ReportCustomizationOptions getOrStoreOptions(
22: DataObject dobj) {
23: ReportCustomizationOptions option = mDataObjectToOptionsMap
24: .get(dobj);
25: if (option == null) {
26: option = new ReportCustomizationOptions();
27: mDataObjectToOptionsMap.put(dobj, option);
28: }
29:
30: return option;
31: }
32:
33: }
|