com.sas.prompts
Class InvalidPromptValueException

com.sas.prompts.InvalidPromptValueException
All Implemented Interfaces:
java.io.Serializable

public class InvalidPromptValueException

Exception thrown when an invalid value is set on a prompt.

See Also:
PromptValues, ValidationEntry, Serialized Form

Constructor Summary
InvalidPromptValueException(PromptDefinitionInterface promptDefinition, java.lang.Object value, java.util.Locale inputLocale, java.util.Collection<ValidationEntry> promptValueValidationErrors)
          Constructor.
 
Method Summary
 java.util.Locale getInputLocale()
          Returns the user's locale for the value that was entered.
 java.lang.String getMessage()
          This override adds the custom error message found on the prompt to the end of the message string.
 PromptDefinitionInterface getPromptDefinition()
          Returns the prompt which had the invalid value set on it.
 java.util.Collection<ValidationEntry> getPromptValueValidationErrors()
          Returns a Collection of errors indicating why the value was invalid.
 java.lang.Object getValue()
          Returns the invalid value that was set on the prompt.
 void setLogOutput(java.lang.String log)
           
 

Constructor Detail

InvalidPromptValueException

public InvalidPromptValueException(PromptDefinitionInterface promptDefinition,
                                   java.lang.Object value,
                                   java.util.Locale inputLocale,
                                   java.util.Collection<ValidationEntry> promptValueValidationErrors)
Constructor.

Parameters:
promptDefinition - The definition whose value is invalid. May not be null.
value - The value that was not valid.
inputLocale - The locale that the value was entered in.
promptValueValidationErrors - A collection of errors indicating why the value was invalid.
Method Detail

getPromptDefinition

public PromptDefinitionInterface getPromptDefinition()
Returns the prompt which had the invalid value set on it.

Returns:
the prompt which had the invalid value set on it.

getValue

public java.lang.Object getValue()
Returns the invalid value that was set on the prompt.

Returns:
the invalid value that was set on the prompt.

getInputLocale

public java.util.Locale getInputLocale()
Returns the user's locale for the value that was entered.

Returns:
the user's locale for the value that was entered.

getPromptValueValidationErrors

public java.util.Collection<ValidationEntry> getPromptValueValidationErrors()
Returns a Collection of errors indicating why the value was invalid.

Returns:
a Collection of errors indicating why the value was invalid.
See Also:
ValidationEntry

getMessage

public java.lang.String getMessage()
This override adds the custom error message found on the prompt to the end of the message string.

Overrides:
getMessage in class java.lang.Throwable
See Also:
Throwable.getMessage()

setLogOutput

public final void setLogOutput(java.lang.String log)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.