|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.StringRangeDefinition
public class StringRangeDefinition
StringRangeDefinition is a prompt type which allows the specification of an string range consisting of a minimum and maximum value. The string range allows the specification of two strings which indicate the minimum and maximum extents.
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
StringRangeDefinition()
Constructor |
|
StringRangeDefinition(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.util.Map<java.lang.String,java.lang.String> |
getConstraints(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 |
getMaximum()
Returns the maximum valid value for the prompt value. |
int |
getMaximumLength()
Returns the maximum allowed length of a valid value. |
java.lang.String |
getMinimum()
Returns the minimum valid value for the prompt value. |
int |
getMinimumLength()
Returns the minimum allowed length of a valid value. |
com.sas.datatypes.DataTypeInterface |
getPromptDataType()
Returns the data type used to manipulate the value for the prompt definition. |
java.util.Collection |
getPromptValueValidationErrors(java.lang.Object value,
java.util.Locale locale)
Returns a Collection containing the set of ValidationEntry objects or an empty
collection if no errors were found. |
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the value passed in is a valid value for this prompt definition. |
void |
setMaximum(java.lang.String maximum)
Sets the maximum valid value for the prompt value. |
void |
setMaximumLength(int maximumLength)
Sets the maximum allowed length of a valid value. |
void |
setMinimum(java.lang.String minimum)
Sets the minimum valid value for the prompt value. |
void |
setMinimumLength(int minimumLength)
Sets the minimum allowed length of a valid value. |
java.util.Collection |
validateDefinition(java.util.Locale locale)
This method is used to validate that the various attributes of the definition all contain valid values. |
Methods inherited from class com.sas.prompts.definitions.BaseDefinitionRange |
---|
getMaxLabel, getMaxLabels, getMinLabel, getMinLabels, isRequired, populateErrorsForMinMax, populateMapWithErrorsForValue, setMaxLabel, setMaxLabels, setMinLabel, setMinLabels, setRequired |
Methods inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface |
---|
clearDefaultValue, getDefaultValue, getPromptDescription, getPromptDescriptions, getPromptLabel, getPromptLabels, getPromptName, getUserInfo, isDefaultValueSet, isFixed, isHidden, isPromptValueValid |
Methods inherited from interface com.sas.prompts.definitions.MutableRequiredDefinitionInterface |
---|
setRequired |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public StringRangeDefinition()
public StringRangeDefinition(java.lang.String promptName)
promptName
- The name of the prompt as StringMethod Detail |
---|
protected java.lang.String getDefaultMaxLabel(java.util.Locale locale)
getDefaultMaxLabel
in class BaseDefinitionRange
locale
- The locale the retrieve the label for
protected java.lang.String getDefaultMinLabel(java.util.Locale locale)
getDefaultMinLabel
in class BaseDefinitionRange
locale
- The locale the retrieve the label for
public java.lang.String getMinimum()
getMinimum
in interface com.sas.prompts.definitions.StringRangeDefinitionInterface
public void setMinimum(java.lang.String minimum)
setMinimum
in interface com.sas.prompts.definitions.MutableStringRangeDefinitionInterface
minimum
- the minimum valid value for the prompt value.public java.lang.String getMaximum()
getMaximum
in interface com.sas.prompts.definitions.StringRangeDefinitionInterface
public void setMaximum(java.lang.String maximum)
setMaximum
in interface com.sas.prompts.definitions.MutableStringRangeDefinitionInterface
maximum
- the maximum valid value for the prompt value.public int getMinimumLength()
getMinimumLength
in interface com.sas.prompts.definitions.StringRangeDefinitionInterface
public void setMinimumLength(int minimumLength)
setMinimumLength
in interface com.sas.prompts.definitions.MutableStringRangeDefinitionInterface
minimumLength
- the minimum allowed length of a valid valuepublic int getMaximumLength()
getMaximumLength
in interface com.sas.prompts.definitions.StringRangeDefinitionInterface
public void setMaximumLength(int maximumLength)
setMaximumLength
in interface com.sas.prompts.definitions.MutableStringRangeDefinitionInterface
maximumLength
- the maximum allowed length of a valid valuepublic boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
isPromptValueValid
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
isPromptValueValid
in class PromptDefinition
value
- The value to check for validity
PromptDefinitionV2Interface.isPromptValueValid(java.lang.Object, java.util.Locale)
public java.util.Collection getPromptValueValidationErrors(java.lang.Object value, java.util.Locale locale)
ValidationEntry
objects or an empty
collection if no errors were found.
getPromptValueValidationErrors
in interface PromptDefinitionInterface
getPromptValueValidationErrors
in class PromptDefinition
value
- The value to check for errorslocale
- The locale to return the error messages in
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.getPromptValueValidationErrors(Object, Locale)
public java.util.Collection validateDefinition(java.util.Locale locale)
ValidationEntry
objects
for each error. This method should be called before the definition is to be used.
Subclasses should override this method to return the appropriate validation errors.
validateDefinition
in interface PromptDefinitionInterface
validateDefinition
in class PromptDefinition
locale
- The locale to return the error messages in
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.validateDefinition(Locale)
public com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType
in interface PromptDefinitionInterface
getPromptDataType
in class PromptDefinition
PromptDefinitionInterface.getPromptDataType()
public java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
getAttributeDescriptors
in class BaseDefinitionRange
public void configureAttributes(java.util.Map<java.lang.String,?> options, java.util.Map<java.lang.String,?> context)
configureAttributes
in interface com.sas.util.AttributeConfigurationInterface
configureAttributes
in class BaseDefinitionRange
protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
getConstraints
in class PromptDefinition
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |