diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutionResult.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutionResult.java index d0afa471..53b60b8a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutionResult.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutionResult.java @@ -1,12 +1,36 @@ +/* + * 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.executor; import org.springframework.webflow.core.collection.AttributeMap; import org.springframework.webflow.execution.Event; +/** + * A value object providing information about the result of a flow execution request. + * + * @author Keith Donald + */ public class FlowExecutionResult { + private String flowId; + private String flowExecutionKey; + private String outcome; + private AttributeMap output; private FlowExecutionResult(String flowId, String flowExecutionKey, String outcome, AttributeMap output) { @@ -16,34 +40,74 @@ public class FlowExecutionResult { this.output = output; } + /** + * Factory method that creates a paused result, indicating the flow is now in a wait state after handling the + * request. + * @param flowId the flow id + * @param flowExecutionKey the flow execution key + * @return the result + */ public static FlowExecutionResult createPausedResult(String flowId, String flowExecutionKey) { return new FlowExecutionResult(flowId, flowExecutionKey, null, null); } + /** + * Factory method that creates a ended result, indicating the flow terminated after handling the request. + * @param flowId the flow id + * @param outcome the ending execution outcome + * @return the result + */ public static FlowExecutionResult createEndedResult(String flowId, Event outcome) { return new FlowExecutionResult(flowId, null, outcome.getId(), outcome.getAttributes()); } + /** + * Returns the flow definition that completed execution. + * @return the flow id + */ public String getFlowId() { return flowId; } + /** + * Returns true if the flow execution paused and is now in a wait state. + * @return true if paused, false if not + */ public boolean paused() { return flowExecutionKey != null; } + /** + * Returns the key needed to resume the flow execution when a paused result. + * @see #paused() + * @return the key of the paused flow execution + */ public String getPausedKey() { return flowExecutionKey; } + /** + * Returns true if the flow execution ended. + * @return true if ended, false if not + */ public boolean ended() { return flowExecutionKey == null; } + /** + * Returns the flow execution outcome when ab ended result. + * @see #ended() + * @return the ended outcome + */ public String getEndedOutcome() { return outcome; } + /** + * Returns the output returned from the flow execution when an ended result. + * @see #ended() + * @return the ended output + */ public AttributeMap getEndedOutput() { return output; } diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java index 21b0e0a3..68a1b1f5 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutor.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. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java index baa24eab..5b3bae9b 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/executor/FlowExecutorImpl.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. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/AbstractFlowHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/AbstractFlowHandler.java index c59dffbe..8c6e1e05 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/AbstractFlowHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/AbstractFlowHandler.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.mvc.portlet; import javax.portlet.PortletRequest; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java index 435f9e95..c9e39929 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.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.mvc.portlet; import java.io.IOException; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/PortletMvcView.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/PortletMvcView.java index d538afce..81b8f724 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/PortletMvcView.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/PortletMvcView.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. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/AbstractFlowHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/AbstractFlowHandler.java index 5ab1bf82..de84d312 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/AbstractFlowHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/AbstractFlowHandler.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.mvc.servlet; import javax.servlet.http.HttpServletRequest; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/ServletMvcView.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/ServletMvcView.java index 8334067a..ba3cd1d2 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/ServletMvcView.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/servlet/ServletMvcView.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. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java index 4c1899ec..cee167e8 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/BindingModel.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.mvc.view; import java.util.ArrayList; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/InternalFlowResourceMvcViewFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/InternalFlowResourceMvcViewFactory.java index 01c2c0c0..4596d610 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/InternalFlowResourceMvcViewFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/InternalFlowResourceMvcViewFactory.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.mvc.view; import org.springframework.binding.expression.Expression; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MessageContextErrors.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MessageContextErrors.java index bb3f070a..7690fd4d 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MessageContextErrors.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MessageContextErrors.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.mvc.view; import java.util.List; @@ -34,23 +49,23 @@ public class MessageContextErrors extends AbstractErrors { } public void addAllErrors(Errors errors) { - throw new UnsupportedOperationException("Auto-generated method stub"); + throw new UnsupportedOperationException("Not expected to be called by a validator"); } public List getFieldErrors() { - throw new UnsupportedOperationException("Auto-generated method stub"); + throw new UnsupportedOperationException("Not expected to be called by a validator"); } public Object getFieldValue(String field) { - throw new UnsupportedOperationException("Auto-generated method stub"); + throw new UnsupportedOperationException("Not expected to be called by a validator"); } public List getGlobalErrors() { - throw new UnsupportedOperationException("Auto-generated method stub"); + throw new UnsupportedOperationException("Not expected to be called by a validator"); } public String getObjectName() { - throw new UnsupportedOperationException("Auto-generated method stub"); + throw new UnsupportedOperationException("Not expected to be called by a validator"); } } diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java index 56183382..c72cb7f6 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/MvcView.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. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewRenderingErrors.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewRenderingErrors.java deleted file mode 100644 index 57a8a6ba..00000000 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewRenderingErrors.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.springframework.webflow.mvc.view; - -import java.util.List; - -import org.springframework.validation.Errors; -import org.springframework.validation.FieldError; -import org.springframework.validation.ObjectError; - -public abstract class ViewRenderingErrors implements Errors { - - public void addAllErrors(Errors errors) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public int getErrorCount() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public FieldError getFieldError() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public FieldError getFieldError(String field) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public int getFieldErrorCount() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public int getFieldErrorCount(String field) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public List getFieldErrors() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public ObjectError getGlobalError() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public int getGlobalErrorCount() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public String getNestedPath() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public String getObjectName() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public boolean hasErrors() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public boolean hasFieldErrors() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public boolean hasFieldErrors(String field) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public boolean hasGlobalErrors() { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void popNestedPath() throws IllegalStateException { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void pushNestedPath(String path) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void reject(String errorCode, Object[] errorArgs, String defaultMessage) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void reject(String errorCode, String defaultMessage) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void reject(String errorCode) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void rejectValue(String field, String errorCode, Object[] args, String defaultMessage) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void rejectValue(String field, String errorCode, String defaultMessage) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void rejectValue(String field, String errorCode) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - - public void setNestedPath(String path) { - throw new UnsupportedOperationException("Not needed during view rendering"); - } - -} diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewResolvingMvcViewFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewResolvingMvcViewFactory.java index be3c7e20..938cebf1 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewResolvingMvcViewFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/view/ViewResolvingMvcViewFactory.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.mvc.view; import java.util.Iterator; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityFlowExecutionListener.java b/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityFlowExecutionListener.java index 59e2c93d..05416202 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityFlowExecutionListener.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityFlowExecutionListener.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.security; import java.util.ArrayList; diff --git a/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityRule.java b/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityRule.java index cc1f9bb2..4717198d 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityRule.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/security/SecurityRule.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.security; import java.util.Arrays;