View Javadoc
1   package org.kuali.ole;
2   
3   import java.util.HashMap;
4   import java.util.Map;
5   
6   /**
7    *  DataCarrierService supports to add and get data though map.
8    */
9   public class DataCarrierService {
10      private Map<String, Object> dataValuesMap = new HashMap<String, Object>();
11  
12      /**
13       * This method adds key and Object in dataValuesMap.
14       * @param key
15       * @param value
16       */
17      public void addData(String key, Object value) {
18          this.dataValuesMap.put(key, value);
19      }
20  
21      /**
22       *   This method returns Object using key.
23       * @param key
24       * @return Object
25       */
26      public Object getData(String key) {
27          return dataValuesMap.get(key);
28      }
29  
30      /**
31       * This method removes key and Object in dataValuesMap.
32       * @param key
33       */
34      public void removeData(String key) {
35          this.dataValuesMap.remove(key);
36      }
37  }