use of jodd.petite.BeanData in project jodd by oblac.
the class RequestScope method remove.
public void remove(String name) {
HttpServletRequest servletRequest = getCurrentHttpRequest();
Map<String, BeanData> map = getRequestMap(servletRequest);
if (map != null) {
map.remove(name);
}
}
use of jodd.petite.BeanData in project jodd by oblac.
the class SessionScope method lookup.
public Object lookup(String name) {
HttpSession session = getCurrentHttpSession();
Map<String, BeanData> map = getSessionMap(session);
if (map == null) {
return null;
}
BeanData beanData = map.get(name);
if (beanData == null) {
return null;
}
return beanData.getBean();
}
use of jodd.petite.BeanData in project jodd by oblac.
the class SessionScope method register.
public void register(BeanDefinition beanDefinition, Object bean) {
HttpSession session = getCurrentHttpSession();
Map<String, BeanData> map = getSessionMap(session);
if (map == null) {
map = registerSessionBeans(session);
}
BeanData beanData = new BeanData(beanDefinition, bean);
map.put(beanDefinition.getName(), beanData);
registerDestroyableBeans(beanData);
}
use of jodd.petite.BeanData in project jodd by oblac.
the class ThreadLocalScope method lookup.
public Object lookup(String name) {
Map<String, BeanData> threadLocalMap = context.get();
BeanData beanData = threadLocalMap.get(name);
if (beanData == null) {
return null;
}
return beanData.getBean();
}
Aggregations