| org.tp23.antinstaller.input.Validator
Validator | public interface Validator (Code) | | A no args constructor should be provided
author: Paul Hinds version: $Id: Validator.java,v 1.1.1.1 2005/10/18 18:20:54 teknopaul Exp $ |
getErrorMessage | public String getErrorMessage(Throwable ex, Locale l)(Code) | | This method should return a string for every exception that might be
thrown by the validate method. The top level Throwable should be
handled at least.
Parameters: ex - Parameters: l - Locale (ignored, but one day we should be internationalized) |
validate | public void validate(String text, InstallerContext ctx) throws Exception(Code) | | Validate the user entry. The InstallerContext is provided to allow
conditional failure based on user input. for example the implementation
of this class could call the following code after failing to open a socket
boolean usrOverride = ctx.getMessageRenderer().prompt("Prot not available are you sure?");
if(userOverride)return true;
else{
throw new SocketException();
}
Parameters: text - may be null it is up to the validator to decide if null or ""is acceptable throws: Exception - |
|
|