1 16 package org.springframework.webflow.execution.support; 17 18 import org.springframework.util.Assert; 19 import org.springframework.webflow.execution.ViewSelection; 20 21 28 public final class ExternalRedirect extends ViewSelection { 29 30 33 private final String url; 34 35 39 public ExternalRedirect(String url) { 40 Assert.notNull(url, "The external URL to redirect to is required"); 41 this.url = url; 42 } 43 44 47 public String getUrl() { 48 return url; 49 } 50 51 public boolean equals(Object o) { 52 if (!(o instanceof ExternalRedirect)) { 53 return false; 54 } 55 ExternalRedirect other = (ExternalRedirect)o; 56 return url.equals(other.url); 57 } 58 59 public int hashCode() { 60 return url.hashCode(); 61 } 62 63 public String toString() { 64 return "externalRedirect:'" + url + "'"; 65 } 66 } | Popular Tags |