Author: mbenson
Date: Mon May 23 15:32:06 2011
New Revision: 1126537
URL: http://svn.apache.org/viewvc?rev=1126537&view=rev
Log:
add work-in-progress SPI defs and per-JSF version implementations
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidation.java
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/FacesContextAttributesFactory.java
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/ValidatorContextProvider.java
- copied, changed from r1125096,
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/ValidatorContextProvider.java
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/ (with
props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/pom.xml
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper12.java
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory12.java
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/test/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/test/java/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/test/java/org/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/test/java/org/apache/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/test/java/org/apache/bval/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/ (with
props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/pom.xml
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper20.java
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory20.java
(with props)
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/test/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/test/java/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/test/java/org/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/test/java/org/apache/
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/test/java/org/apache/bval/
Removed:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/ValidatorContextProvider.java
Modified:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper.java
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationStartupListener.java
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicValidatorFactoryProxy.java
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/pom.xml
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidation.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidation.java?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidation.java
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidation.java
Mon May 23 15:32:06 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bval.jsr303.dynamic.extval;
+
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+/**
+ * Utility methods.
+ *
+ * @version $Rev$ $Date$
+ */
+class DynamicBeanValidation {
+
+ /**
+ * Locate a unique instance of the specified service.
+ *
+ * @param <T>
+ * @param serviceType
+ * @return T
+ * @throws NullPointerException
+ * if 0 found
+ * @throws IllegalStateException
+ * if > 1 found
+ */
+ public static <T> T uniqueService(Class<T> serviceType) {
+ Iterator<T> iter = ServiceLoader.load(serviceType).iterator();
+ try {
+ return iter.next();
+ } finally {
+ if (iter.hasNext()) {
+ throw new IllegalStateException(String.format("Found multiple
providers for %s", serviceType));
+ }
+ }
+ }
+}
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidation.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper.java?rev=1126537&r1=1126536&r2=1126537&view=diff
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper.java
(original)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper.java
Mon May 23 15:32:06 2011
@@ -19,20 +19,18 @@ package org.apache.bval.jsr303.dynamic.e
import java.util.HashMap;
import java.util.Map;
-import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-//import javax.faces.el.CompositeComponentExpressionHolder;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
+import org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.myfaces.extensions.validator.core.el.AbstractELHelperFactory;
import org.apache.myfaces.extensions.validator.core.el.DefaultELHelper;
import org.apache.myfaces.extensions.validator.core.el.ELHelper;
-import org.apache.myfaces.extensions.validator.core.el.ExtValELResolver;
import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
/**
@@ -40,54 +38,29 @@ import org.apache.myfaces.extensions.val
*
* @version $Rev$ $Date$
*/
-public class DynamicBeanValidationELHelper extends DefaultELHelper {
+public abstract class DynamicBeanValidationELHelper extends DefaultELHelper {
private static final String PROPERTY_DETAILS_CACHE_KEY =
"org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper.Factory.propertyDetailsCache";
/**
- * {@link FacesContextAttributesAccessor} instance used.
+ * {@link FacesContextAttributesFactory} instance used.
*/
- static FacesContextAttributesAccessor facesContextAttributesAccessor;
-
- /**
- * Describes a mechanism for getting an attributes map from a {@code
FacesContext} instance.
- */
- public interface FacesContextAttributesAccessor {
- /**
- * Get the map of attributes associated with the specified
FacesContext.
- *
- * @param facesContext
- * the context whose attributes to retrieve.
- * @return default, pre JSF 2.0: {@code
facesContext.externalContext.requestMap}.
- */
- Map<? super String, Object> getAttributesMap(FacesContext
facesContext);
- }
-
- private static final FacesContextAttributesAccessor
FACES_CONTEXT_ATTRIBUTES_ACCESSOR =
- new FacesContextAttributesAccessor() {
-
- public Map<? super String, Object> getAttributesMap(FacesContext
facesContext) {
- if (facesContextAttributesAccessor != null) {
- return
facesContextAttributesAccessor.getAttributesMap(facesContext);
- }
- return facesContext.getExternalContext().getRequestMap();
- }
- };
+ private static final FacesContextAttributesFactory
FACES_CONTEXT_ATTRIBUTES_ACCESSOR = DynamicBeanValidation
+ .uniqueService(FacesContextAttributesFactory.class);
/**
* {@code DynamicBeanValidationELHelper} Factory.
*/
- public static class Factory extends AbstractELHelperFactory implements
PhaseListener {
+ public static abstract class Factory<H extends
DynamicBeanValidationELHelper> extends AbstractELHelperFactory
+ implements PhaseListener {
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
- protected ELHelper createELHelper() {
- return new DynamicBeanValidationELHelper();
- }
+ protected abstract H createELHelper();
/**
* {@inheritDoc}
@@ -142,29 +115,26 @@ public class DynamicBeanValidationELHelp
if (cache.containsKey(expr)) {
return cache.get(expr);
}
- PathBasedPropertyDetails result = resolve(valueExpression,
facesContext.getELContext());
+ PathRecordingELResolver elResolver =
+ new
PathRecordingELResolver(facesContext.getELContext().getELResolver());
+ resolve(valueExpression, elResolver, facesContext);
+ String key =
StringUtils.join(StringUtils.split(elResolver.getPath().toString(), "[]."),
'.');
+ PathBasedPropertyDetails result =
+ new PathBasedPropertyDetails(key, elResolver.getBaseObject(),
elResolver.getLeafProperty(),
+ elResolver.getPath());
cache.put(expr, result);
return result;
}
return null;
}
- private static PathBasedPropertyDetails resolve(ValueExpression
valueExpression, ELContext elContext) {
- PathRecordingELResolver elResolver = new
PathRecordingELResolver(elContext.getELResolver());
- ELContext contextWrapper =
ExtValELResolver.createContextWrapper(elContext, elResolver);
- ValueExpression expr = valueExpression;
- // while (true) {
- expr.setValue(contextWrapper, null);
- // Object baseObject = elResolver.getBaseObject();
- // if (baseObject instanceof CompositeComponentExpressionHolder) {
- // expr = ((CompositeComponentExpressionHolder)
baseObject).getExpression(elResolver.getLeafProperty());
- // continue;
- // }
- // break;
- // }
- String key =
StringUtils.join(StringUtils.split(elResolver.getPath().toString(), "[]."),
'.');
- return new PathBasedPropertyDetails(key, elResolver.getBaseObject(),
elResolver.getLeafProperty(),
- elResolver.getPath());
- }
-
+ /**
+ * Use a {@code PathRecordingELResolver} to record a {@code
ValueExpression}.
+ *
+ * @param valueExpression
+ * @param elResolver
+ * @param facesContext
+ */
+ protected abstract void resolve(ValueExpression valueExpression,
PathRecordingELResolver elResolver,
+ FacesContext facesContext);
}
Modified:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationStartupListener.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationStartupListener.java?rev=1126537&r1=1126536&r2=1126537&view=diff
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationStartupListener.java
(original)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationStartupListener.java
Mon May 23 15:32:06 2011
@@ -23,6 +23,7 @@ import org.apache.myfaces.extensions.val
import org.apache.myfaces.extensions.validator.core.el.AbstractELHelperFactory;
import org.apache.myfaces.extensions.validator.core.factory.FactoryNames;
import
org.apache.myfaces.extensions.validator.core.startup.AbstractStartupListener;
+import org.apache.myfaces.extensions.validator.util.JsfUtils;
/**
* Startup listener for dynamic bean validation support.
@@ -41,8 +42,11 @@ public class DynamicBeanValidationStartu
final ExtValContext extValContext = ExtValContext.getContext();
extValContext.addGlobalProperty(ValidatorFactory.class.getName(),
DynamicValidatorFactoryProxy.INSTANCE, true);
+ DynamicBeanValidationELHelper.Factory<?> elHelperFactory =
+
DynamicBeanValidation.uniqueService(DynamicBeanValidationELHelper.Factory.class);
extValContext.getFactoryFinder().getFactory(FactoryNames.EL_HELPER_FACTORY,
AbstractELHelperFactory.class)
- .setCustomELHelperFactory(new
DynamicBeanValidationELHelper.Factory());
+ .setCustomELHelperFactory(elHelperFactory);
+ JsfUtils.registerPhaseListener(elHelperFactory);
extValContext.denyRendererInterceptor(BeanValidationModuleValidationInterceptor.class);
extValContext.registerRendererInterceptor(new
DynamicBeanValidationModuleValidationInterceptor());
Modified:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicValidatorFactoryProxy.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicValidatorFactoryProxy.java?rev=1126537&r1=1126536&r2=1126537&view=diff
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicValidatorFactoryProxy.java
(original)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicValidatorFactoryProxy.java
Mon May 23 15:32:06 2011
@@ -16,6 +16,8 @@
*/
package org.apache.bval.jsr303.dynamic.extval;
+import java.util.ServiceLoader;
+
import javax.validation.Validator;
import javax.validation.ValidatorContext;
import javax.validation.ValidatorFactory;
@@ -23,6 +25,7 @@ import javax.validation.ValidatorFactory
import org.apache.bval.jsr303.ApacheFactoryContext;
import org.apache.bval.jsr303.dynamic.DynamicValidatorContext;
import org.apache.bval.jsr303.dynamic.NestedValidator;
+import org.apache.bval.jsr303.dynamic.extval.spi.ValidatorContextProvider;
import org.apache.myfaces.extensions.validator.beanval.ValidatorFactoryProxy;
/**
@@ -41,10 +44,13 @@ public class DynamicValidatorFactoryProx
*/
private static ThreadLocal<Validator> VALIDATOR = new
ThreadLocal<Validator>();
+ private final ValidatorContextProvider validatorContextProvider;
+
/**
* Create a new DynamicValidatorFactoryProxy instance.
*/
private DynamicValidatorFactoryProxy() {
+ validatorContextProvider =
ServiceLoader.load(ValidatorContextProvider.class).iterator().next();
}
/**
@@ -64,7 +70,7 @@ public class DynamicValidatorFactoryProx
*/
@Override
public ValidatorContext usingContext() {
- return ValidatorContextProvider.MANAGER.getRequired().get();
+ return validatorContextProvider.get();
}
/**
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/FacesContextAttributesFactory.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/FacesContextAttributesFactory.java?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/FacesContextAttributesFactory.java
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/FacesContextAttributesFactory.java
Mon May 23 15:32:06 2011
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bval.jsr303.dynamic.extval.spi;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Describes a mechanism for getting an attributes map from a {@code
FacesContext} instance.
+ */
+public interface FacesContextAttributesFactory {
+ /**
+ * Get the map of attributes associated with the specified FacesContext.
+ *
+ * @param facesContext
+ * the context whose attributes to retrieve.
+ * @return a Map that can hold String keys and Object values
+ */
+ Map<? super String, Object> getAttributesMap(FacesContext facesContext);
+}
\ No newline at end of file
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/FacesContextAttributesFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/ValidatorContextProvider.java
(from r1125096,
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/ValidatorContextProvider.java)
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/ValidatorContextProvider.java?p2=incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/ValidatorContextProvider.java&p1=incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/ValidatorContextProvider.java&r1=1125096&r2=1126537&rev=1126537&view=diff
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/ValidatorContextProvider.java
(original)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval-shared/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/ValidatorContextProvider.java
Mon May 23 15:32:06 2011
@@ -16,12 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.bval.jsr303.dynamic.extval;
+package org.apache.bval.jsr303.dynamic.extval.spi;
import javax.validation.ValidatorContext;
-import org.apache.myfaces.extensions.validator.core.ExtValContext;
-
/**
* Specifies the interface to retrieve the correct {@link ValidatorContext}.
*/
@@ -32,53 +30,4 @@ public interface ValidatorContextProvide
* @return ValidatorContext
*/
ValidatorContext get();
-
- /**
- * Manages the {@code ValidatorContextProvider} associated with the {@code
ExtValContext}.
- */
- public static class Manager {
- private Manager() {
- }
-
- /**
- * Set the provider.
- *
- * @param provider
- * to install
- */
- public void set(ValidatorContextProvider provider) {
-
ExtValContext.getContext().addGlobalProperty(ValidatorContextProvider.class.getName(),
provider);
- }
-
- /**
- * Get the installed provider.
- *
- * @return {@code ValidatorContextProvider}
- */
- public ValidatorContextProvider get() {
- return (ValidatorContextProvider)
ExtValContext.getContext().getGlobalProperty(
- ValidatorContextProvider.class.getName());
- }
-
- /**
- * Get the installed provider...
- *
- * @return {@code ValidatorContextProvider}
- * @throws IllegalStateException
- * if no instance has been configured
- */
- public ValidatorContextProvider getRequired() {
- ValidatorContextProvider result = get();
- if (result == null) {
- throw new IllegalStateException(String.format("No %s
configured",
- ValidatorContextProvider.class.getName()));
- }
- return result;
- }
- }
-
- /**
- * Permits e.g. {@code ValidatorContextProvider.MANAGER.set(...)} fluent
syntax.
- */
- public static final Manager MANAGER = new Manager();
}
Propchange: incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon May 23 15:32:06 2011
@@ -0,0 +1,3 @@
+*.log
+.*
+target
Added: incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/pom.xml?rev=1126537&view=auto
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/pom.xml
(added)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/pom.xml Mon
May 23 15:32:06 2011
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--><!--
+ Maven release plugin requires the project tag to be on a single line.
+-->
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>bval-jsr303-dynamic</artifactId>
+ <groupId>org.apache.bval</groupId>
+ <version>0.4-incubating-SNAPSHOT</version>
+ </parent>
+ <artifactId>bval-jsr303-dynamic-extval12</artifactId>
+ <name>Apache Bean Validation :: bval-jsr303-dynamic-extval12</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.bval</groupId>
+ <artifactId>bval-jsr303-dynamic-extval-shared</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>de.odysseus.juel</groupId>
+ <artifactId>juel-api</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>unpack-shared-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <includeGroupIds>org.apache.bval</includeGroupIds>
+
<includeArtifactIds>bval-jsr303-dynamic-extval-shared</includeArtifactIds>
+ <includes>**/*.java</includes>
+
<outputDirectory>${project.build.directory}/extval-shared_sources</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>unpack-shared-resources</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <includeGroupIds>org.apache.bval</includeGroupIds>
+
<includeArtifactIds>bval-jsr303-dynamic-extval-shared</includeArtifactIds>
+ <includes>META-INF/faces-config.xml</includes>
+
<outputDirectory>${project.build.directory}/extval-shared_resources</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+
<source>${project.build.directory}/extval-shared_sources</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-resources</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+
<directory>${project.build.directory}/extval-shared_resources</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+</project>
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper12.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper12.java?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper12.java
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper12.java
Mon May 23 15:32:06 2011
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bval.jsr303.dynamic.extval;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.extensions.validator.core.el.ExtValELResolver;
+
+/**
+ * JSF-1.2 {@link DynamicBeanValidationELHelper}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DynamicBeanValidationELHelper12 extends
DynamicBeanValidationELHelper {
+
+ /**
+ * {@link DynamicBeanValidationELHelper12} Factory
+ */
+ public static class Factory extends
DynamicBeanValidationELHelper.Factory<DynamicBeanValidationELHelper12> {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected DynamicBeanValidationELHelper12 createELHelper() {
+ return new DynamicBeanValidationELHelper12();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void resolve(ValueExpression valueExpression, ELContext
contextWrapper) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void resolve(ValueExpression valueExpression,
PathRecordingELResolver elResolver,
+ FacesContext facesContext) {
+ ELContext contextWrapper =
ExtValELResolver.createContextWrapper(facesContext.getELContext(), elResolver);
+ valueExpression.setValue(contextWrapper, null);
+ }
+
+}
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper12.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory12.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory12.java?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory12.java
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory12.java
Mon May 23 15:32:06 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bval.jsr303.dynamic.extval.spi.impl;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory;
+
+/**
+ * JSF 1.2 {@code FacesContextAttributesFactory} implementation.
+ */
+public class FacesContextAttributesFactory12 implements
FacesContextAttributesFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Map<? super String, Object> getAttributesMap(FacesContext
facesContext) {
+ return facesContext.getExternalContext().getRequestMap();
+ }
+
+}
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory12.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper%24Factory?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
Mon May 23 15:32:06 2011
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper12$Factory
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval12/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
Mon May 23 15:32:06 2011
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+org.apache.bval.jsr303.dynamic.extval.spi.impl.FacesContextAttributesFactory12
Propchange: incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon May 23 15:32:06 2011
@@ -0,0 +1,3 @@
+*.log
+.*
+target
Added: incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/pom.xml?rev=1126537&view=auto
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/pom.xml
(added)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/pom.xml Mon
May 23 15:32:06 2011
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--><!--
+ Maven release plugin requires the project tag to be on a single line.
+-->
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>bval-jsr303-dynamic</artifactId>
+ <groupId>org.apache.bval</groupId>
+ <version>0.4-incubating-SNAPSHOT</version>
+ </parent>
+ <artifactId>bval-jsr303-dynamic-extval20</artifactId>
+ <name>Apache Bean Validation :: bval-jsr303-dynamic-extval20</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.bval</groupId>
+ <artifactId>bval-jsr303-dynamic-extval-shared</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>de.odysseus.juel</groupId>
+ <artifactId>juel-api</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>unpack-shared-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <includeGroupIds>org.apache.bval</includeGroupIds>
+
<includeArtifactIds>bval-jsr303-dynamic-extval-shared</includeArtifactIds>
+ <includes>**/*.java</includes>
+
<outputDirectory>${project.build.directory}/extval-shared_sources</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>unpack-shared-resources</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <includeGroupIds>org.apache.bval</includeGroupIds>
+
<includeArtifactIds>bval-jsr303-dynamic-extval-shared</includeArtifactIds>
+ <includes>META-INF/faces-config.xml</includes>
+
<outputDirectory>${project.build.directory}/extval-shared_resources</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+
<source>${project.build.directory}/extval-shared_sources</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-resources</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+
<directory>${project.build.directory}/extval-shared_resources</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jsf.version>2.0.5</jsf.version>
+ <extval.version>2.0.5-SNAPSHOT</extval.version>
+ </properties>
+</project>
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper20.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper20.java?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper20.java
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper20.java
Mon May 23 15:32:06 2011
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bval.jsr303.dynamic.extval;
+
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+
+/**
+ * JSF-2.0 {@link DynamicBeanValidationELHelper}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DynamicBeanValidationELHelper20 extends
DynamicBeanValidationELHelper {
+
+ /**
+ * {@link DynamicBeanValidationELHelper20} Factory
+ */
+ public static class Factory extends
DynamicBeanValidationELHelper.Factory<DynamicBeanValidationELHelper20> {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected DynamicBeanValidationELHelper20 createELHelper() {
+ return new DynamicBeanValidationELHelper20();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void resolve(ValueExpression valueExpression,
PathRecordingELResolver elResolver,
+ FacesContext facesContext) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/DynamicBeanValidationELHelper20.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory20.java
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory20.java?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory20.java
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory20.java
Mon May 23 15:32:06 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bval.jsr303.dynamic.extval.spi.impl;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory;
+
+/**
+ * JSF 2.0 {@code FacesContextAttributesFactory} implementation.
+ */
+public class FacesContextAttributesFactory20 implements
FacesContextAttributesFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Map<? super String, Object> getAttributesMap(FacesContext
facesContext) {
+ return facesContext.getAttributes();
+ }
+
+}
Propchange:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/java/org/apache/bval/jsr303/dynamic/extval/spi/impl/FacesContextAttributesFactory20.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper%24Factory?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper$Factory
Mon May 23 15:32:06 2011
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+org.apache.bval.jsr303.dynamic.extval.DynamicBeanValidationELHelper20$Factory
Added:
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory?rev=1126537&view=auto
==============================================================================
---
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
(added)
+++
incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/extval20/src/main/resources/META-INF/services/org.apache.bval.jsr303.dynamic.extval.spi.FacesContextAttributesFactory
Mon May 23 15:32:06 2011
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+org.apache.bval.jsr303.dynamic.extval.spi.impl.FacesContextAttributesFactory20
Modified: incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/pom.xml?rev=1126537&r1=1126536&r2=1126537&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/pom.xml (original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/pom.xml Mon May 23
15:32:06 2011
@@ -143,5 +143,7 @@
<modules>
<module>provider</module>
<module>extval-shared</module>
+ <module>extval12</module>
+ <module>extval20</module>
</modules>
</project>