1 16 package org.springframework.webflow.execution.support; 17 18 import java.util.Collections ; 19 import java.util.Map ; 20 21 import org.springframework.util.Assert; 22 import org.springframework.webflow.execution.ViewSelection; 23 24 35 public final class FlowDefinitionRedirect extends ViewSelection { 36 37 40 private final String flowDefinitionId; 41 42 45 private final Map executionInput; 46 47 52 public FlowDefinitionRedirect(String flowDefinitionId, Map executionInput) { 53 Assert.hasText(flowDefinitionId, "The flow definition id is required"); 54 this.flowDefinitionId = flowDefinitionId; 55 if (executionInput == null) { 56 executionInput = Collections.EMPTY_MAP; 57 } 58 this.executionInput = executionInput; 59 } 60 61 64 public String getFlowDefinitionId() { 65 return flowDefinitionId; 66 } 67 68 72 public Map getExecutionInput() { 73 return Collections.unmodifiableMap(executionInput); 74 } 75 76 public boolean equals(Object o) { 77 if (!(o instanceof FlowDefinitionRedirect)) { 78 return false; 79 } 80 FlowDefinitionRedirect other = (FlowDefinitionRedirect)o; 81 return flowDefinitionId.equals(other.flowDefinitionId) && executionInput.equals(other.executionInput); 82 } 83 84 public int hashCode() { 85 return flowDefinitionId.hashCode() + executionInput.hashCode(); 86 } 87 88 public String toString() { 89 return "flowRedirect:'" + flowDefinitionId + "'"; 90 } 91 } | Popular Tags |