1 23 24 package org.infoglue.cms.entities.management; 25 26 import org.infoglue.cms.entities.kernel.BaseEntityVO; 27 import org.infoglue.cms.util.ConstraintExceptionBuffer; 28 import org.infoglue.cms.util.validators.ValidatorFactory; 29 30 public class InterceptionPointVO implements BaseEntityVO 31 { 32 33 private java.lang.Integer interceptionPointId; 34 private java.lang.String category; 35 private java.lang.String name; 36 private java.lang.String description; 37 private java.lang.Boolean usesExtraDataForAccessControl; 38 39 public InterceptionPointVO() 40 { 41 } 42 43 public InterceptionPointVO(String category, String name, String description, boolean usesExtraDataForAccessControl) 44 { 45 this.category = category; 46 this.name = name; 47 this.description = description; 48 this.usesExtraDataForAccessControl = new Boolean (usesExtraDataForAccessControl); 49 } 50 51 public java.lang.Integer getInterceptionPointId() 52 { 53 return this.interceptionPointId; 54 } 55 56 public void setInterceptionPointId(java.lang.Integer interceptionPointId) 57 { 58 this.interceptionPointId = interceptionPointId; 59 } 60 61 public java.lang.String getCategory() 62 { 63 return this.category; 64 } 65 66 public void setCategory(java.lang.String category) 67 { 68 this.category = category; 69 } 70 71 public java.lang.String getName() 72 { 73 return this.name; 74 } 75 76 public void setName(java.lang.String name) 77 { 78 this.name = name; 79 } 80 81 public java.lang.String getDescription() 82 { 83 return this.description; 84 } 85 86 public void setDescription(java.lang.String description) 87 { 88 this.description = description; 89 } 90 91 public java.lang.Boolean getUsesExtraDataForAccessControl() 92 { 93 return usesExtraDataForAccessControl; 94 } 95 96 public void setUsesExtraDataForAccessControl(java.lang.Boolean usesExtraDataForAccessControl) 97 { 98 this.usesExtraDataForAccessControl = usesExtraDataForAccessControl; 99 } 100 101 102 public String toString() 103 { 104 return getCategory() + ":" + getName(); 105 } 106 107 public Integer getId() 108 { 109 return this.getInterceptionPointId(); 110 } 111 112 115 public ConstraintExceptionBuffer validate() 116 { 117 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 118 119 ValidatorFactory.createStringValidator("InterceptionPoint.name", true, 2, 100).validate(name, ceb); 120 ValidatorFactory.createStringValidator("InterceptionPoint.category", true, 2, 30).validate(category, ceb); 121 ValidatorFactory.createStringValidator("InterceptionPoint.description", true, 2, 100).validate(description, ceb); 122 123 return ceb; 124 } 125 126 127 } 128 129 | Popular Tags |