View Javadoc

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