1 16 package org.apache.cocoon.acting; 17 18 19 26 public class ValidatorActionHelper 27 { 28 protected ValidatorActionResult result = ValidatorActionResult.OK; 29 protected Object object = null; 30 31 37 public ValidatorActionHelper ( Object validatedObject ) { 38 this.object = validatedObject; 39 this.result = ValidatorActionResult.OK; 40 } 41 42 49 public ValidatorActionHelper ( Object validatedObject, ValidatorActionResult validationResult ) { 50 this.object = validatedObject; 51 this.result = validationResult; 52 } 53 54 58 public boolean isOK() { 59 return (result.equals(ValidatorActionResult.OK)); 60 } 61 62 67 public boolean isNotPresent() { 68 return (result.equals(ValidatorActionResult.NOTPRESENT)); 69 } 70 71 76 public boolean isNull() { 77 return (result.equals(ValidatorActionResult.ISNULL)); 78 } 79 80 86 public boolean isTooLarge() { 87 return (result.equals(ValidatorActionResult.TOOLARGE)); 88 } 89 90 96 public boolean isTooSmall() { 97 return (result.equals(ValidatorActionResult.TOOSMALL)); 98 } 99 100 105 public boolean doesNotMatch() { 106 return (result.equals(ValidatorActionResult.NOMATCH)); 107 } 108 109 113 public Object getObject() { 114 return object; 115 } 116 117 121 public ValidatorActionResult getResult() { 122 return result; 123 } 124 } 125 | Popular Tags |