Map<Object, Object> map = null;
if (create)
{
ContextualStorage contextualStorage = getContextualStorage(
beanManager, flowClientWindowId);
ContextualInstanceInfo info = contextualStorage.getStorage().get(CURRENT_FLOW_SCOPE_MAP);
if (info == null)
{
info = new ContextualInstanceInfo<Object>();
contextualStorage.getStorage().put(CURRENT_FLOW_SCOPE_MAP, info);
}
map = (Map<Object, Object>) info.getContextualInstance();
if (map == null)
{
map = new HashMap<Object,Object>();
info.setContextualInstance(map);
}
}
else
{
ContextualStorage contextualStorage = getContextualStorageNoCreate(
beanManager, flowClientWindowId);
if (contextualStorage != null)
{
ContextualInstanceInfo info = contextualStorage.getStorage().get(CURRENT_FLOW_SCOPE_MAP);
if (info != null)
{
map = (Map<Object, Object>) info.getContextualInstance();
}
}
}
return map;
}