- Timestamp:
- 05/16/08 13:07:40 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/branches/complex-obs/src/api/org/openmrs/obs/handler/ImageHandler.java
r4232 r4239 39 39 public Log log = LogFactory.getLog(this.getClass()); 40 40 41 private Map<String, ComplexObsHandler> handlers; 42 43 public ImageHandler( ) { 44 handlers = new HashMap<String, ComplexObsHandler>(); 45 } 41 public ImageHandler( ) { } 46 42 47 43 /** … … 53 49 } 54 50 55 public Obs saveObs(Obs obs, String context) {56 if (this.handlers.containsKey(context)) {57 return this.handlers.get(context).saveObs(obs);58 }59 return this.saveObs(obs);60 }61 62 51 public Obs getObs(Obs obs, String context) { 63 if (this.handlers.containsKey(context)) {64 return this.handlers.get(context).getObs(obs);65 }66 52 return this.getObs(obs); 67 53 } … … 134 120 return obs; 135 121 } 136 137 public void putHandler(String context, ComplexObsHandler handler) {138 this.handlers.put(context, handler);139 }140 122 141 public ComplexObsHandler getHandler(String context) { 142 return this.handlers.get(context); 143 } 144 145 public void putAllHandlers(Map<String, ComplexObsHandler> handlers) { 146 this.handlers.putAll(handlers); 147 } 148 149 public Map<String, ComplexObsHandler> getAllHandlers( ) { 150 return this.handlers; 151 } 152 153 public void removeHandler(String context) { 154 this.handlers.remove(context); 155 } 156 157 public boolean containsContext(String context) { 158 return this.handlers.containsKey(context); 159 } 160 161 public boolean containsHandler(ComplexObsHandler handler) { 162 return this.handlers.containsKey(handler); 123 public ComplexData getComplexData(Obs obs, String view) { 124 return this.getObs(obs).getComplexData(); 163 125 } 164 126