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