1 23 24 package org.infoglue.cms.entities.management; 25 26 import java.util.regex.Pattern ; 27 28 import org.infoglue.cms.entities.kernel.BaseEntityVO; 29 import org.infoglue.cms.entities.management.impl.simple.RedirectImpl; 30 import org.infoglue.cms.util.ConstraintExceptionBuffer; 31 import org.infoglue.cms.util.validators.ValidatorFactory; 32 33 public class RedirectVO implements BaseEntityVO 34 { 35 private java.lang.Integer redirectId; 36 private java.lang.String url; 37 private java.lang.String redirectUrl; 38 private Pattern urlCompiledPattern; 39 40 43 44 public Integer getId() 45 { 46 return getRedirectId(); 47 } 48 49 public String toString() 50 { 51 return getUrl(); 52 } 53 54 public java.lang.Integer getRedirectId() 55 { 56 return this.redirectId; 57 } 58 59 public void setRedirectId(java.lang.Integer redirectId) 60 { 61 this.redirectId = redirectId; 62 } 63 64 public java.lang.String getRedirectUrl() 65 { 66 return redirectUrl; 67 } 68 69 public void setRedirectUrl(java.lang.String redirectUrl) 70 { 71 this.redirectUrl = redirectUrl; 72 } 73 74 public java.lang.String getUrl() 75 { 76 return url; 77 } 78 79 public void setUrl(java.lang.String url) 80 { 81 this.url = url; 82 } 83 84 87 public ConstraintExceptionBuffer validate() 88 { 89 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 90 91 ValidatorFactory.createStringValidator("Redirect.url", true, 1, 1024, true, RedirectImpl.class, this.getId(), null).validate(this.url, ceb); 92 ValidatorFactory.createStringValidator("Redirect.redirectUrl", true, 1, 1024).validate(redirectUrl, ceb); 93 94 return ceb; 95 } 96 97 } 98 99 | Popular Tags |