Permalink
Browse files

Split Beans into BeansLocal ala Faces/FacesLocal.

  • Loading branch information...
1 parent 5b38a5d commit 82547a72aa45c944c219a3553b5e08ff9beb5312 @BalusC BalusC committed Nov 1, 2014
@@ -15,8 +15,8 @@
*/
package org.omnifaces.cdi.converter;
-import static org.omnifaces.util.Beans.getReference;
-import static org.omnifaces.util.Beans.resolve;
+import static org.omnifaces.util.BeansLocal.getReference;
+import static org.omnifaces.util.BeansLocal.resolve;
import java.util.HashMap;
import java.util.Map;
@@ -18,8 +18,8 @@
import static java.lang.String.format;
import static java.util.Collections.unmodifiableList;
import static java.util.Collections.unmodifiableMap;
-import static org.omnifaces.util.Beans.getAnnotation;
-import static org.omnifaces.util.Beans.getReference;
+import static org.omnifaces.util.BeansLocal.getAnnotation;
+import static org.omnifaces.util.BeansLocal.getReference;
import static org.omnifaces.util.Utils.isEmpty;
import java.util.ArrayList;
@@ -14,7 +14,7 @@
import static java.util.Arrays.asList;
import static java.util.Collections.emptySet;
-import static org.omnifaces.util.Beans.getCurrentInjectionPoint;
+import static org.omnifaces.util.BeansLocal.getInstance;
import java.io.Serializable;
import java.lang.annotation.Annotation;
@@ -51,7 +51,7 @@
public class DynamicParamValueProducer implements Bean<Object>, Serializable, PassivationCapable {
private static final long serialVersionUID = 1L;
-
+
private BeanManager beanManager;
private Set<Type> types;
@@ -72,7 +72,7 @@ public DynamicParamValueProducer(BeanManager beanManager, Type type) {
@Override
public Object create(CreationalContext<Object> creationalContext) {
- ParamValue<?> paramValue = new RequestParameterProducer().produce(getCurrentInjectionPoint(beanManager));
+ ParamValue<?> paramValue = new RequestParameterProducer().produce(getInstance(beanManager, InjectionPoint.class));
return paramValue.getValue();
}
@@ -115,7 +115,7 @@ public String getName() {
public void destroy(Object instance, CreationalContext<Object> creationalContext) {
// NOOP
}
-
+
@Override
public String getId() {
return DynamicParamValueProducer.class.getName() + "_" + (types != null ? types.toString() : "");
@@ -15,8 +15,8 @@
*/
package org.omnifaces.cdi.validator;
-import static org.omnifaces.util.Beans.getReference;
-import static org.omnifaces.util.Beans.resolve;
+import static org.omnifaces.util.BeansLocal.getReference;
+import static org.omnifaces.util.BeansLocal.resolve;
import java.util.HashMap;
import java.util.Map;
@@ -15,7 +15,7 @@
*/
package org.omnifaces.cdi.viewscope;
-import static org.omnifaces.util.Beans.getReference;
+import static org.omnifaces.util.BeansLocal.getReference;
import java.lang.annotation.Annotation;
Oops, something went wrong.

0 comments on commit 82547a7

Please sign in to comment.