diff --git a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/DefaultFlowUrlHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/DefaultFlowUrlHandler.java index ccd1803a..b548b111 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/DefaultFlowUrlHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/DefaultFlowUrlHandler.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.context.servlet; import java.io.UnsupportedEncodingException; @@ -11,6 +26,36 @@ import org.springframework.web.util.UrlPathHelper; import org.springframework.web.util.WebUtils; import org.springframework.webflow.core.collection.AttributeMap; +/** + * The default flow url handler for Spring Web Flow. + *
+ * Expects URLs to launch flow to be of this pattern: + * + *
+ * http://<host>/[app context path]/[app servlet path]/[namespace]/<flow id> + *+ * + * For example: + * + *
+ * http://localhost/springtravel/app/booking + *+ * + * Expects URLs to resume flows to be of this pattern: + * + *
+ * http://<host>/[app context path]/[app servlet path]/[namespace]/<flow id>?execution=<flow execution key> + *+ * + * For example: + * + *
+ * http://localhost/springtravel/app/booking?execution=c1v1 + *+ * + * @author Keith Donald + * + */ public class DefaultFlowUrlHandler implements FlowUrlHandler { private static final String DEFAULT_URL_ENCODING_SCHEME = "UTF-8"; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/FlowUrlHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/FlowUrlHandler.java index 46c5f051..23fbf909 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/FlowUrlHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/FlowUrlHandler.java @@ -1,9 +1,29 @@ +/* + * 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.context.servlet; import javax.servlet.http.HttpServletRequest; import org.springframework.webflow.core.collection.AttributeMap; +/** + * A interface for parsing and generating flow URLs. Encapsulates a specific flow URL format. + * + * @author Keith Donald + */ public interface FlowUrlHandler { /** diff --git a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ParameterBasedFlowUrlHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ParameterBasedFlowUrlHandler.java index 5b38f130..bee3b6ba 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ParameterBasedFlowUrlHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/context/servlet/ParameterBasedFlowUrlHandler.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.context.servlet; import java.io.UnsupportedEncodingException; @@ -9,6 +24,11 @@ import javax.servlet.http.HttpServletRequest; import org.springframework.webflow.core.collection.AttributeMap; +/** + * Flow URL handler that implements the default Web Flow 1.x URL format. Here for backwards compatibility. + * + * @author Keith Donald + */ public class ParameterBasedFlowUrlHandler implements FlowUrlHandler { private static final String DEFAULT_URL_ENCODING_SCHEME = "UTF-8";