1 16 package org.apache.cocoon.portal.util; 17 18 import java.util.Collections ; 19 import java.util.Map ; 20 21 28 public abstract class ReferenceFieldHandler extends AbstractFieldHandler { 29 32 private static ThreadLocal threadLocalMap = new ThreadLocal (); 33 34 37 public static Map getObjectMap() { 38 Map map = (Map ) threadLocalMap.get(); 39 if (map == null) { 40 map = Collections.EMPTY_MAP; 41 } 42 return map; 43 } 44 45 48 public static void setObjectMap(Map objectMap) { 49 threadLocalMap.set(objectMap); 50 } 51 52 public static void clearObjectMap() { 53 threadLocalMap.set(null); 54 } 55 } 56 | Popular Tags |