Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/16/08 13:07:40 (4 months ago)
Author:
bmckown
Message:

complex_obs branch: Attempting to register ComplexObsHandlers with Map<String, ComplexObsHandler>. Only partially working. Ripped out rest of ConceptComplexHandler junk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/complex-obs/src/api/org/openmrs/obs/handler/ImageHandler.java

    r4232 r4239  
    3939        public Log log = LogFactory.getLog(this.getClass()); 
    4040         
    41         private Map<String, ComplexObsHandler> handlers; 
    42          
    43         public ImageHandler( ) { 
    44                 handlers = new HashMap<String, ComplexObsHandler>(); 
    45         } 
     41        public ImageHandler( ) { } 
    4642         
    4743        /** 
     
    5349        } 
    5450         
    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          
    6251        public Obs getObs(Obs obs, String context) { 
    63                 if (this.handlers.containsKey(context)) { 
    64                         return this.handlers.get(context).getObs(obs); 
    65                 } 
    6652                return this.getObs(obs); 
    6753        } 
     
    134120                return obs; 
    135121        } 
    136  
    137         public void putHandler(String context, ComplexObsHandler handler) { 
    138                 this.handlers.put(context, handler); 
    139         } 
    140122         
    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(); 
    163125        } 
    164126