1 16 17 package org.springframework.web.servlet.view; 18 19 import org.springframework.beans.factory.InitializingBean; 20 21 28 public abstract class AbstractUrlBasedView extends AbstractView implements InitializingBean { 29 30 private String url; 31 32 33 36 protected AbstractUrlBasedView() { 37 } 38 39 43 protected AbstractUrlBasedView(String url) { 44 this.url = url; 45 } 46 47 48 52 public void setUrl(String url) { 53 this.url = url; 54 } 55 56 59 public String getUrl() { 60 return this.url; 61 } 62 63 public void afterPropertiesSet() throws Exception { 64 if (getUrl() == null) { 65 throw new IllegalArgumentException ("Property 'url' is required"); 66 } 67 } 68 69 70 public String toString() { 71 StringBuffer sb = new StringBuffer (super.toString()); 72 sb.append("; URL [").append(getUrl()).append("]"); 73 return sb.toString(); 74 } 75 76 } 77 | Popular Tags |