diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/DefaultExpressionParserFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/DefaultExpressionParserFactory.java index 1e5c1a31..f13e47a4 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/DefaultExpressionParserFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/DefaultExpressionParserFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007 the original author or authors. + * Copyright 2004-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +26,15 @@ import org.springframework.util.ClassUtils; import org.springframework.webflow.expression.el.WebFlowELExpressionParser; /** - * Static factory that returns the default {@link ExpressionParser} for use by Spring Web Flow. Marked final with a - * private constructor to prevent subclassing. + * Static factory that returns the default {@link ExpressionParser} used by Spring Web Flow. Marked final with a private + * constructor to prevent subclassing. *
* This factory employs the following algorithm when the returned ExpressionParser instance is used for the first time: *
+ * requestParameters + * requestScope + * flashScope + * flowScope + * conversationScope + * messageContext + * flowExecutionContext + * flowExecutionUrl + *+ * + * @author Keith Donald + */ public class ImplicitFlowVariableELResolver extends ELResolver { private static final Log logger = LogFactory.getLog(ImplicitFlowVariableELResolver.class); diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/RequestContextELResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/RequestContextELResolver.java index a3279a94..5da61e67 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/RequestContextELResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/RequestContextELResolver.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2008 the original author or authors. + * + * Licensed 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.springframework.webflow.expression.el; import java.util.Iterator; @@ -12,8 +27,10 @@ import org.springframework.webflow.execution.RequestContext; import org.springframework.webflow.execution.RequestContextHolder; /** - * Custom EL resolver that resolves to a thread-bound RequestContext object for binding expressions prefixed with a - * {@link #REQUEST_CONTEXT_VARIABLE_NAME}. For instance "#{flowRequestContext.conversationScope.myProperty}". + * Custom EL resolver that resolves the current RequestContext under the variable {@link #REQUEST_CONTEXT_VARIABLE_NAME}. + * Allows for accessing any propert of the RequestContext instance. For example: + * "#{flowRequestContext.conversationScope.myProperty}". + * * @author Jeremy Grelle */ public class RequestContextELResolver extends ELResolver { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ScopeSearchingELResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ScopeSearchingELResolver.java index 065b39fb..a696e102 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ScopeSearchingELResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ScopeSearchingELResolver.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2008 the original author or authors. + * + * Licensed 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.springframework.webflow.expression.el; import java.util.Iterator; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringBeanWebFlowELResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringBeanWebFlowELResolver.java index 7fedd4ed..7406dd0a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringBeanWebFlowELResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringBeanWebFlowELResolver.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2008 the original author or authors. + * + * Licensed 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.springframework.webflow.expression.el; import javax.el.ELContext; @@ -9,7 +24,7 @@ import org.springframework.webflow.execution.RequestContext; import org.springframework.webflow.execution.RequestContextHolder; /** - * EL resolver for Spring Beans accessible to the flow's local bean factory. + * EL resolver for resolving Spring Beans accessible by a flow's bean factory. * @author Jeremy Grelle */ public class SpringBeanWebFlowELResolver extends SpringBeanELResolver { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringSecurityELResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringSecurityELResolver.java index 2b1c1f45..9909a3db 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringSecurityELResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/SpringSecurityELResolver.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2008 the original author or authors. + * + * Licensed 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.springframework.webflow.expression.el; import java.util.Iterator; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/WebFlowELExpressionParser.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/WebFlowELExpressionParser.java index 0428ea97..0c695a8a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/WebFlowELExpressionParser.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/WebFlowELExpressionParser.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2008 the original author or authors. + * + * Licensed 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.springframework.webflow.expression.el; import java.util.ArrayList; @@ -17,8 +32,7 @@ import org.springframework.webflow.core.collection.MutableAttributeMap; import org.springframework.webflow.execution.RequestContext; /** - * An ExpressionParser that allows Spring and Web Flow managed beans to be referenced in expressions in the - * FlowDefinition. + * Allows for Unified EL expressions in a FlowDefinition. * * @author Jeremy Grelle * @author Scott Andrews @@ -28,12 +42,20 @@ public class WebFlowELExpressionParser extends ELExpressionParser { private static boolean securityPresent = ClassUtils .isPresent("org.springframework.security.context.SecurityContextHolder"); + /** + * Creates a new Web Flow EL expression parser. + * @param expressionFactory the underlying EL expression factory (EL provider specific) + */ public WebFlowELExpressionParser(ExpressionFactory expressionFactory) { super(expressionFactory); putContextFactory(RequestContext.class, new RequestContextELContextFactory()); putContextFactory(MutableAttributeMap.class, new AttributeMapELContextFactory()); } + /** + * Configures EL context instances for evaluating against a Web Flow request context. + * @author Keith Donald + */ private static class RequestContextELContextFactory implements ELContextFactory { public ELContext getELContext(Object target) { RequestContext context = (RequestContext) target; @@ -51,6 +73,10 @@ public class WebFlowELExpressionParser extends ELExpressionParser { } } + /** + * Configures EL context instances for evaluating against an AttributeMap. + * @author Keith Donald + */ private static class AttributeMapELContextFactory implements ELContextFactory { public ELContext getELContext(Object target) { ELResolver resolver = new DefaultELResolver(target, null);