1 package org.apache.turbine.services.intake.validator; 2 3 18 19 import java.util.Map ; 20 21 40 abstract class NumberValidator 41 extends DefaultValidator 42 { 43 44 String minValueMessage = null; 45 46 47 String maxValueMessage = null; 48 49 50 String invalidNumberMessage = null; 51 52 60 public void init(Map paramMap) 61 throws InvalidMaskException 62 { 63 super.init(paramMap); 64 65 Constraint constraint = 66 (Constraint) paramMap.get(INVALID_NUMBER_RULE_NAME); 67 68 if (constraint != null) 69 { 70 invalidNumberMessage = constraint.getMessage(); 71 } 72 } 73 74 78 83 public String getMinValueMessage() 84 { 85 return minValueMessage; 86 } 87 88 93 public void setMinValueMessage(String minValueMessage) 94 { 95 this.minValueMessage = minValueMessage; 96 } 97 98 103 public String getMaxValueMessage() 104 { 105 return maxValueMessage; 106 } 107 108 113 public void setMaxValueMessage(String maxValueMessage) 114 { 115 this.maxValueMessage = maxValueMessage; 116 } 117 118 123 public String getInvalidNumberMessage() 124 { 125 return invalidNumberMessage; 126 } 127 128 133 public void setInvalidNumberMessage(String invalidNumberMessage) 134 { 135 this.invalidNumberMessage = invalidNumberMessage; 136 } 137 138 } 139 | Popular Tags |