|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.prompts.definitions.BaseDefinitionRange
public abstract class BaseDefinitionRange
Base class for range definitions. This class adds a required flag and labels for the min and max fields (which subclasses will provide) to the functionality provided by PromptDefinitionInterface.
| Field Summary | |
|---|---|
static java.lang.String |
RB_KEY
|
| Constructor Summary | |
|---|---|
BaseDefinitionRange()
Constructor |
|
BaseDefinitionRange(java.lang.String promptName)
Constructor |
|
| Method Summary | |
|---|---|
void |
configureAttributes(java.util.Map<java.lang.String,?> options,
java.util.Map<java.lang.String,?> context)
|
java.util.List |
getAttributeDescriptors(java.util.Locale locale)
|
protected java.lang.String |
getDefaultMaxLabel(java.util.Locale locale)
Returns the default label for the maximum field when one is not set by the user. |
protected java.lang.String |
getDefaultMinLabel(java.util.Locale locale)
Returns the default label for the minimum field when one is not set by the user. |
java.lang.String |
getMaxLabel(java.util.Locale locale)
Returns the label for the maximum field for the given locale. |
com.sas.util.LocalizableString |
getMaxLabels()
Returns a LocalizableString which contains all max labels for the prompt. |
java.lang.String |
getMinLabel(java.util.Locale locale)
Returns the label for the minimum field for the given locale. |
com.sas.util.LocalizableString |
getMinLabels()
Returns a LocalizableString which contains all min labels for the prompt. |
boolean |
isRequired()
Returns whether the user is required to enter a value for this prompt before continuing. |
protected java.util.Collection<ValidationEntry> |
populateErrorsForMinMax(java.util.Collection<ValidationEntry> errors,
long errorCode,
boolean defaultValue,
java.util.Locale locale,
java.lang.Object value,
java.lang.Object minValue,
java.lang.Object maxValue)
|
protected java.util.Collection<ValidationEntry> |
populateMapWithErrorsForValue(java.util.Collection<ValidationEntry> errors,
long errorCode,
java.lang.Object value,
boolean defaultValue,
java.util.Locale locale)
|
void |
setMaxLabel(java.lang.String maxLabelValue,
java.util.Locale locale)
Sets the label for the maximum field for the given locale. |
void |
setMaxLabels(com.sas.util.LocalizableString labels)
Sets a LocalizableString containing the localized max labels for the prompt. |
void |
setMinLabel(java.lang.String minLabelValue,
java.util.Locale locale)
Sets the label for the minimum field for the given locale. |
void |
setMinLabels(com.sas.util.LocalizableString labels)
Sets a LocalizableString containing the localized min labels for the prompt. |
void |
setRequired(boolean required)
Sets whether the user is required to enter a value for this prompt before continuing. |
| Methods inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface |
|---|
clearDefaultValue, getDefaultValue, getPromptDataType, getPromptDescription, getPromptDescriptions, getPromptLabel, getPromptLabels, getPromptName, getPromptValueValidationErrors, getUserInfo, isDefaultValueSet, isFixed, isHidden, isPromptValueValid, validateDefinition |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
| Constructor Detail |
|---|
public BaseDefinitionRange()
public BaseDefinitionRange(java.lang.String promptName)
promptName - The name of the prompt| Method Detail |
|---|
public java.lang.String getMaxLabel(java.util.Locale locale)
getMaxLabel in interface com.sas.prompts.definitions.BaseDefinitionRangeInterfacepublic com.sas.util.LocalizableString getMaxLabels()
public void setMaxLabel(java.lang.String maxLabelValue,
java.util.Locale locale)
setMaxLabel in interface com.sas.prompts.definitions.MutableBaseDefinitionRangeInterfacemaxLabelValue - the label for the maximum field for the given locale.locale - The locale to set the label forpublic void setMaxLabels(com.sas.util.LocalizableString labels)
labels - a LocalizableString containing the localized max labels for the prompt.public java.lang.String getMinLabel(java.util.Locale locale)
getMinLabel in interface com.sas.prompts.definitions.BaseDefinitionRangeInterfacepublic com.sas.util.LocalizableString getMinLabels()
protected java.lang.String getDefaultMaxLabel(java.util.Locale locale)
locale - The locale the retrieve the label for
protected java.lang.String getDefaultMinLabel(java.util.Locale locale)
locale - The locale the retrieve the label for
public void setMinLabel(java.lang.String minLabelValue,
java.util.Locale locale)
setMinLabel in interface com.sas.prompts.definitions.MutableBaseDefinitionRangeInterfacemaxLabelValue - the label for the minimum field for the given locale.locale - The locale to set the label forpublic void setMinLabels(com.sas.util.LocalizableString labels)
labels - a LocalizableString containing the localized min labels for the prompt.public boolean isRequired()
isRequired in interface com.sas.prompts.definitions.BaseDefinitionRangeInterfaceisRequired in interface PromptDefinitionInterfaceisRequired in class PromptDefinitionPromptDefinitionInterface.isRequired()public void setRequired(boolean required)
setRequired in interface MutableRequiredDefinitionInterfacerequired - whether the user is required to enter a value for this prompt before continuing.
protected java.util.Collection<ValidationEntry> populateMapWithErrorsForValue(java.util.Collection<ValidationEntry> errors,
long errorCode,
java.lang.Object value,
boolean defaultValue,
java.util.Locale locale)
protected java.util.Collection<ValidationEntry> populateErrorsForMinMax(java.util.Collection<ValidationEntry> errors,
long errorCode,
boolean defaultValue,
java.util.Locale locale,
java.lang.Object value,
java.lang.Object minValue,
java.lang.Object maxValue)
public void configureAttributes(java.util.Map<java.lang.String,?> options,
java.util.Map<java.lang.String,?> context)
configureAttributes in interface com.sas.util.AttributeConfigurationInterfaceconfigureAttributes in class PromptDefinitionpublic java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors in interface com.sas.util.AttributeDescriptiongetAttributeDescriptors in class PromptDefinition
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||