com.sas.prompts.definitions
Class TextDefinition

com.sas.prompts.definitions.TextDefinition
All Implemented Interfaces:
com.sas.models.VersionInterface, com.sas.prompts.definitions.HintableDefinitionInterface, com.sas.prompts.definitions.HintableDefinitionV2Interface, com.sas.prompts.definitions.MutableHintableDefinitionInterface, com.sas.prompts.definitions.MutableHintableDefinitionV2Interface, com.sas.prompts.definitions.MutablePromptDefinitionInterface, com.sas.prompts.definitions.MutablePromptDefinitionV2Interface, com.sas.prompts.definitions.MutablePromptDefinitionV3Interface, MutableSelectableDefinitionInterface, com.sas.prompts.definitions.MutableTextDefinitionInterface, com.sas.prompts.definitions.MutableTextDefinitionV2Interface, MutableValueProviderDefinitionInterface, com.sas.prompts.definitions.MutableValueRetrieverDefinitionInterface, PromptDefinitionInterface, com.sas.prompts.definitions.PromptDefinitionV2Interface, com.sas.prompts.definitions.PromptDefinitionV3Interface, SelectableDefinitionInterface, com.sas.prompts.definitions.SelectableDefinitionV2Interface, com.sas.prompts.definitions.TextDefinitionInterface, com.sas.prompts.definitions.TextDefinitionV2Interface, ValueProviderDefinitionInterface, com.sas.prompts.definitions.ValueRetrieverDefinitionInterface, com.sas.prompts.IdentifiablePromptInterface, com.sas.prompts.MutableIdentifiablePromptInterface, com.sas.prompts.MutablePromptHelpInterface, com.sas.prompts.PromptHelpInterface, com.sas.PublicClonable, com.sas.storage.editableproperties.LocalizableProperties, com.sas.storage.editableproperties.MultiLocaleProperties, com.sas.storage.valueprovider.AllowUserValuesInterface, com.sas.uiconfig.ContextEnabledObject, com.sas.util.AttributeConfigurationInterface, com.sas.util.AttributeDescription, com.sas.util.log.ComponentLogFactoryInterface, com.sas.util.macrovar.MacroVariableListOptionInterface, com.sas.util.macrovar.MacroVariableOptionInterface, com.sas.util.macrovar.MutableMacroVariableListOptionInterface, com.sas.util.macrovar.MutableMacroVariableOptionInterface, com.sas.util.MutableSupportedSpecialValuesInterface, com.sas.util.ResourceReferencesInterface, com.sas.util.SupportedSpecialValuesInterface, com.sas.util.xmlpersist.PersistenceInterface, java.io.Externalizable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ModalGroupDefinition

public class TextDefinition
implements com.sas.prompts.definitions.MutableTextDefinitionV2Interface

Prompt definition for standard text entry prompts.

See Also:
Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Fields inherited from interface com.sas.prompts.definitions.SelectableDefinitionInterface
MULTIPLE_SELECTION, ORDERED_MULTIPLE_SELECTION, SINGLE_SELECTION
 
Fields inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface
PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_DECIMAL_PLACES, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_LINES, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_VALUE_COUNT, PROMPT_VALIDATION_ERROR_BELOW_MINIMUM, PROMPT_VALIDATION_ERROR_BELOW_MINIMUM_LENGTH, PROMPT_VALIDATION_ERROR_BELOW_MINIMUM_VALUE_COUNT, PROMPT_VALIDATION_ERROR_DATA_SOURCE_COLUMN_TYPE_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_DATA_SOURCE_CONTAINS_NO_DATA_ITEMS, PROMPT_VALIDATION_ERROR_DATA_SOURCE_NOT_AVAILABLE, PROMPT_VALIDATION_ERROR_DATA_SOURCE_TYPE_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_EMPTY_STATIC_LIST_AND_REQUIRED_WITH_NO_ADDITIONAL_VALUES_ALLOWED, PROMPT_VALIDATION_ERROR_ERROR_LOADING_SHARED_PROMPT, PROMPT_VALIDATION_ERROR_FILE_TYPE_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_FROM_SCRIPT, PROMPT_VALIDATION_ERROR_INCORRECT_RELATIVE_DATE_VALUE, PROMPT_VALIDATION_ERROR_INPUT_DOES_NOT_MATCH_PATTERN, PROMPT_VALIDATION_ERROR_INVALID_INPUT_PATTERN, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_ABOVE_UPPER_RANGE_VALUE, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_BELOW_MINIMUM, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_BELOW_MINIMUM_LENGTH, PROMPT_VALIDATION_ERROR_MASKED_HIDDEN_REQUIRED, PROMPT_VALIDATION_ERROR_MAX_DECIMAL_PLACES_ABOVE_MAX_PERCISION, PROMPT_VALIDATION_ERROR_MAXIMUM_LENGTH_BELOW_ZERO, PROMPT_VALIDATION_ERROR_MIN_DECIMAL_PLACES_ABOVE_MAX_PERCISION, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM_DECIMAL_PLACES, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM_VALUE_COUNT, PROMPT_VALIDATION_ERROR_MINIMUM_LENGTH_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_MINIMUM_LENGTH_BELOW_ZERO, PROMPT_VALIDATION_ERROR_MORE_THAN_ONE_SPECIAL_VALUE_SPECIFIED, PROMPT_VALIDATION_ERROR_MULTIPLE_DATA_SOURCES_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_NO_DATA_SOURCE, PROMPT_VALIDATION_ERROR_NON_EDITABLE_REQUIRED_WITH_NO_DEFAULT_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_NOT_VALID_OBJECT, PROMPT_VALIDATION_ERROR_ONLY_DIRECTORIES_ALLOWED, PROMPT_VALIDATION_ERROR_ONLY_FILES_ALLOWED, PROMPT_VALIDATION_ERROR_PERIOD_ENDS_200_YEARS_AHEAD, PROMPT_VALIDATION_ERROR_PERIOD_STARTS_200_YEARS_AGO, PROMPT_VALIDATION_ERROR_SPECIAL_VALUE_MIXED_WITH_OTHER_VALUES, PROMPT_VALIDATION_ERROR_STATIC_VALUE_INVALID, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_BELOW_MINIMUM, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_BELOW_MINIMUM_LENGTH, PROMPT_VALIDATION_NO_ERRORS
 
Constructor Summary
TextDefinition()
          Constructor
TextDefinition(java.lang.String promptName)
          Constructor
 
Method Summary
 void addInputPattern(com.sas.util.LocalizableString inputPattern)
          Adds an localized input pattern to the prompt.
 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)
           
 int getDisplayedLines()
          Method getDisplayedLines.
 java.util.List<com.sas.util.LocalizableString> getInputPatterns()
          Returns an unmodifiable list of all patterns.
 java.util.List<java.lang.String> getInputPatternsAsText(java.util.Locale locale)
          Returns a list of strings that are the locale-specific input patterns.
 java.lang.String getMaskedTextEncoding()
          Returns the encoding which the value of the prompt will be output using.
 int getMaximumLength()
          Method getMaximumLength.
 int getMaximumLines()
          Method getMaximumLines.
 int getMaximumValueCount()
          Returns the maximum number of values the user is allowed to select.
 int getMinimumLength()
          Returns the minimum number of characters in the entered/selected value.
 int getMinimumValueCount()
          Returns the minimum number of values the user is allowed to select.
 int getNumberOfInputPatterns()
          Returns the number of input patterns on this prompt or zero.
 com.sas.datatypes.DataTypeInterface getPromptDataType()
          Returns the data type of the prompt.
 java.util.Collection<ValidationEntry> 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.
 int getSelectionType()
          Returns the type of selection that the prompt supports.
 com.sas.util.SupportedSpecialValues getSupportedSpecialValues()
           
 com.sas.storage.valueprovider.ValueProviderInterface getValueProvider()
          Returns the value provider to use to access possible values for the prompt.
 com.sas.storage.vr.dto.ValueRetrieverConfiguration getValueRetrieverConfiguration()
          Returns the ValueRetrieverConfiguration instance that was set, if any.
 java.lang.String getVersion()
           
 boolean isAllowMultipleLines()
          Method isAllowMultipleLines.
 boolean isAllowUserValues()
           
 boolean isInputPatternValid(com.sas.util.LocalizableString inputPattern)
          Tests whether all regular expressions contained as text within the localizableString successfully compile with java.regex.Pattern.compile().
 boolean isMasked()
          Returns whether the text should be masked in a UI for presentation or input.
 boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
          Returns whether the value passed in is valid for this prompt definition.
 boolean isRequired()
          Returns whether the prompt value is required to be set before the user can continue with the operation being prompted for.
 boolean isSelectionOrdered()
          Returns whether the values the user selects should be ordered.
 boolean removeInputPattern(com.sas.util.LocalizableString inputPattern)
          Removes the supplied input pattern from the prompt if the pattern matches any pattern in the prompt's list.
 void setAllowMultipleLines(boolean allowMultipleLines)
          Method setAllowMultipleLines.
 void setAllowUserValues(boolean allowValues)
          Sets whether the user should be allowed to specify values in addition to those returned by the value provider.
 void setDisplayedLines(int displayedLines)
          Method setDisplayedLines.
 void setMasked(boolean masked)
          Sets whether the text should be masked in a UI for presentation or input.
 void setMaskedTextEncoding(java.lang.String encoding)
          Sets the encoding used for the text entered when the text prompt is in masked entry mode.
 void setMaximumLength(int maximumLength)
          Method setMaximumLength.
 void setMaximumLines(int maximumLines)
          Method setMaximumLines.
 void setMaximumValueCount(int maximumValueCount)
          Sets the maximum number of valid values for a prompt.
 void setMinimumLength(int minimumLength)
          Method setMinimumLength.
 void setMinimumValueCount(int minimumValueCount)
          Sets the minimum number of valid values for a prompt.
 void setSelectionOrdered(boolean selectionOrdered)
          Sets whether the order in which values are selected should be retained.
 void setSupportedSpecialValues(com.sas.util.SupportedSpecialValues specialValuesSupported)
           
 void setValueProvider(com.sas.storage.valueprovider.ValueProviderInterface valueProvider)
          Sets the value provider which will be used to determine the set of possible values for the prompt.
 void setValueRetrieverConfiguration(com.sas.storage.vr.dto.ValueRetrieverConfiguration config)
          Sets the ValueRetrieverConfiguration instance.
 java.lang.String toString()
          Returns current version, then prompt name.
 java.util.Collection<ValidationEntry> validateDefinition(java.util.Locale locale)
          This method is used to validate that the various attributes of the definition all contain valid values.
 boolean validIndividualValue(java.lang.Object value, java.util.Locale locale)
          Validates an individual value in a locale-specific way as appropriate.
 
Methods inherited from class com.sas.prompts.definitions.PromptDefinition
addUserInfo, clearDefaultValue, getApplicationContext, getCustomErrorMessage, getCustomErrorMessages, getDefaultValue, getDependentPromptsForAttributes, getHint, getHintPlacement, getHints, getInlineHint, getInlineHints, getLabelPlacement, getLocalizableProperties, getMutableUserInfo, getPromptDescription, getPromptDescriptions, getPromptHelp, getPromptID, getPromptLabel, getPromptLabels, getPromptName, getScript, getScripts, getUIConfiguration, getUserInfo, getUserInfoAsText, isDefaultValueSet, isDisplayDefaultValueAsBlank, isFixed, isHidden, isPromptValueValid, isValueClearedForNonSelectedModalChoiceGroup, removeScript, removeUserInfo, setAdditionalCascadeDependencies, setApplicationContext, setCustomErrorMessage, setCustomErrorMessages, setDefaultValue, setDependentPromptsForAttributes, setDisplayDefaultValueAsBlank, setFixed, setHidden, setHint, setHintPlacement, setHints, setInlineHint, setInlineHints, setLabelPlacement, setLocalizableProperties, setPromptDescription, setPromptDescriptions, setPromptHelp, setPromptLabel, setPromptLabels, setPromptName, setScript, setUIConfiguration, setUserInfo, setValueClearedForNonSelectedModalChoiceGroup
 
Methods inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface
clearDefaultValue, getDefaultValue, getPromptDescription, getPromptDescriptions, getPromptLabel, getPromptLabels, getPromptName, getUserInfo, isDefaultValueSet, isFixed, isHidden, isPromptValueValid
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values
Constructor Detail

TextDefinition

public TextDefinition()
Constructor


TextDefinition

public TextDefinition(java.lang.String promptName)
Constructor

Parameters:
promptName - The name of the prompt
Method Detail

isMasked

public boolean isMasked()
Returns whether the text should be masked in a UI for presentation or input.

Specified by:
isMasked in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
boolean

setMasked

public void setMasked(boolean masked)
Sets whether the text should be masked in a UI for presentation or input.

Specified by:
setMasked in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
masked -

isAllowMultipleLines

public boolean isAllowMultipleLines()
Method isAllowMultipleLines.

Specified by:
isAllowMultipleLines in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
boolean

setAllowMultipleLines

public void setAllowMultipleLines(boolean allowMultipleLines)
Method setAllowMultipleLines.

Specified by:
setAllowMultipleLines in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
allowMultipleLines - boolean

getDisplayedLines

public int getDisplayedLines()
Method getDisplayedLines.

Specified by:
getDisplayedLines in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
int

setDisplayedLines

public void setDisplayedLines(int displayedLines)
Method setDisplayedLines.

Specified by:
setDisplayedLines in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
displayedLines - int

getMaximumLines

public int getMaximumLines()
Method getMaximumLines.

Specified by:
getMaximumLines in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
int

setMaximumLines

public void setMaximumLines(int maximumLines)
Method setMaximumLines.

Specified by:
setMaximumLines in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
maximumLines - int

getMinimumLength

public int getMinimumLength()
Description copied from interface: TextDefinitionInterface
Returns the minimum number of characters in the entered/selected value. The default of zero indicates that there is no minimum length.

Specified by:
getMinimumLength in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
int

setMinimumLength

public void setMinimumLength(int minimumLength)
Method setMinimumLength.

Specified by:
setMinimumLength in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
minimumLength - int

getMaximumLength

public int getMaximumLength()
Method getMaximumLength.

Specified by:
getMaximumLength in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
int

setMaximumLength

public void setMaximumLength(int maximumLength)
Method setMaximumLength.

Specified by:
setMaximumLength in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
maximumLength - int

isPromptValueValid

public boolean isPromptValueValid(java.lang.Object value,
                                  java.util.Locale locale)
Description copied from class: PromptDefinition
Returns whether the value passed in is valid for this prompt definition. Subclasses should override this method to validate the value.

Specified by:
isPromptValueValid in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
Overrides:
isPromptValueValid in class PromptDefinition
Returns:
boolean
See Also:
PromptDefinitionV2Interface.isPromptValueValid(java.lang.Object, java.util.Locale)

validIndividualValue

public boolean validIndividualValue(java.lang.Object value,
                                    java.util.Locale locale)
Description copied from interface: SelectableDefinitionV2Interface
Validates an individual value in a locale-specific way as appropriate. Locale may not be null.

Specified by:
validIndividualValue in interface com.sas.prompts.definitions.SelectableDefinitionV2Interface
Returns:

getPromptValueValidationErrors

public java.util.Collection<ValidationEntry> 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.

Specified by:
getPromptValueValidationErrors in interface PromptDefinitionInterface
Overrides:
getPromptValueValidationErrors in class PromptDefinition
Parameters:
value - The value to check for errors
locale - The locale to return the error messages in
Returns:
A Collection containing the set of ValidationEntry objects or an empty collection if no errors were found.
See Also:
PromptDefinitionInterface.getPromptValueValidationErrors(Object, Locale)

validateDefinition

public java.util.Collection<ValidationEntry> validateDefinition(java.util.Locale locale)
This method is used to validate that the various attributes of the definition all contain valid values. If the definition is valid, an empty collection will be returned, otherwise the collection with contain 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.

Specified by:
validateDefinition in interface PromptDefinitionInterface
Overrides:
validateDefinition in class PromptDefinition
Parameters:
locale - Locale
Returns:
A Collection containing the set of ValidationEntry objects or an empty collection if no errors were found.
See Also:
PromptDefinitionInterface.validateDefinition(Locale)

getPromptDataType

public com.sas.datatypes.DataTypeInterface getPromptDataType()
Description copied from class: PromptDefinition
Returns the data type of the prompt. This will vary by prompt subclass.

Specified by:
getPromptDataType in interface PromptDefinitionInterface
Specified by:
getPromptDataType in class PromptDefinition
Returns:
the data type of the prompt.
See Also:
PromptDefinitionInterface.getPromptDataType()

toString

public java.lang.String toString()
Returns current version, then prompt name.

Overrides:
toString in class PromptDefinition
See Also:
PromptDefinition.toString()

configureAttributes

public void configureAttributes(java.util.Map<java.lang.String,?> options,
                                java.util.Map<java.lang.String,?> context)
Specified by:
configureAttributes in interface com.sas.util.AttributeConfigurationInterface
Overrides:
configureAttributes in class PromptDefinition

isRequired

public boolean isRequired()
Description copied from class: PromptDefinition
Returns whether the prompt value is required to be set before the user can continue with the operation being prompted for.

Specified by:
isRequired in interface PromptDefinitionInterface
Specified by:
isRequired in class PromptDefinition
Returns:
whether the prompt value is required to be set.
See Also:
PromptDefinitionInterface.isRequired()

getMaximumValueCount

public int getMaximumValueCount()
Description copied from interface: SelectableDefinitionInterface
Returns the maximum number of values the user is allowed to select.

Specified by:
getMaximumValueCount in interface SelectableDefinitionInterface
Returns:
the maximum number of values the user is allowed to select

getMinimumValueCount

public int getMinimumValueCount()
Description copied from interface: SelectableDefinitionInterface
Returns the minimum number of values the user is allowed to select.

Specified by:
getMinimumValueCount in interface SelectableDefinitionInterface
Returns:
the minimum number of values the user is allowed to select

getSelectionType

public int getSelectionType()
Description copied from interface: SelectableDefinitionInterface
Returns the type of selection that the prompt supports. SINGLE_SELECTION indicates that the user will only be able to select 1 value at a time. MULTIPLE_SELECTION indicates that the user will be able to select multiple values (subject to the maximum value count). ORDERED_MULTIPLE_SELECTION indicates that the user will be able to select multiple values (subject to the maximum value count) and that they will be able to reorder the selected values.

Specified by:
getSelectionType in interface SelectableDefinitionInterface
Returns:
An integer corresponding to SINGLE_SELECTION, MULTIPLE_SELECTION, ORDERED_MULTIPLE_SELECTION

isSelectionOrdered

public boolean isSelectionOrdered()
Description copied from interface: SelectableDefinitionInterface
Returns whether the values the user selects should be ordered.

Specified by:
isSelectionOrdered in interface SelectableDefinitionInterface
Returns:
whether the values the user selects should be ordered.

setMaximumValueCount

public void setMaximumValueCount(int maximumValueCount)
Description copied from interface: MutableSelectableDefinitionInterface
Sets the maximum number of valid values for a prompt.

Specified by:
setMaximumValueCount in interface MutableSelectableDefinitionInterface
Parameters:
maximumValueCount - the maximum number of valid values for a prompt.

setMinimumValueCount

public void setMinimumValueCount(int minimumValueCount)
Description copied from interface: MutableSelectableDefinitionInterface
Sets the minimum number of valid values for a prompt.

Specified by:
setMinimumValueCount in interface MutableSelectableDefinitionInterface
Parameters:
minimumValueCount - the minimum number of valid values for a prompt.

setSelectionOrdered

public void setSelectionOrdered(boolean selectionOrdered)
Description copied from interface: MutableSelectableDefinitionInterface
Sets whether the order in which values are selected should be retained.

Specified by:
setSelectionOrdered in interface MutableSelectableDefinitionInterface
Parameters:
selectionOrdered - whether the order in which values are selected should be retained.

getValueProvider

public com.sas.storage.valueprovider.ValueProviderInterface getValueProvider()
Description copied from interface: ValueProviderDefinitionInterface
Returns the value provider to use to access possible values for the prompt.

Specified by:
getValueProvider in interface ValueProviderDefinitionInterface
Returns:
the value provider to use to access possible values for the prompt

isAllowUserValues

public boolean isAllowUserValues()
Specified by:
isAllowUserValues in interface com.sas.storage.valueprovider.AllowUserValuesInterface

setValueProvider

public void setValueProvider(com.sas.storage.valueprovider.ValueProviderInterface valueProvider)
Description copied from interface: MutableValueProviderDefinitionInterface
Sets the value provider which will be used to determine the set of possible values for the prompt. This may be a dynamic value provider which reads from a dataset, or is may be a StaticValueProvider which holds the possble set of values in memory.

Specified by:
setValueProvider in interface MutableValueProviderDefinitionInterface
Parameters:
valueProvider - the value provider which will be used to determine the set of possible values for the prompt.

setAllowUserValues

public void setAllowUserValues(boolean allowValues)
Description copied from interface: MutableValueProviderDefinitionInterface
Sets whether the user should be allowed to specify values in addition to those returned by the value provider.

Specified by:
setAllowUserValues in interface MutableValueProviderDefinitionInterface
Parameters:
allowValues - whether the user should be allowed to specify values in addition to those returned by the value provider.

getSupportedSpecialValues

public com.sas.util.SupportedSpecialValues getSupportedSpecialValues()
Specified by:
getSupportedSpecialValues in interface com.sas.util.SupportedSpecialValuesInterface

setSupportedSpecialValues

public void setSupportedSpecialValues(com.sas.util.SupportedSpecialValues specialValuesSupported)
Specified by:
setSupportedSpecialValues in interface com.sas.util.MutableSupportedSpecialValuesInterface

setMaskedTextEncoding

public void setMaskedTextEncoding(java.lang.String encoding)
Sets the encoding used for the text entered when the text prompt is in masked entry mode. The valid encodings are SasPasswordString.BASE64_ENCODING, SasPasswordString.SAS001_ENCODING, and SasPasswordString.SAS002_ENCODING.

Specified by:
setMaskedTextEncoding in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
Parameters:
encoding - The encoding to use for the prompt value when the prompt is in masked entry mode.

getMaskedTextEncoding

public java.lang.String getMaskedTextEncoding()
Description copied from interface: TextDefinitionInterface
Returns the encoding which the value of the prompt will be output using. This is one of null, SasPasswordString.BASE64_ENCODING or SasPasswordString.SAS001_ENCODING. If null is returned, no encoding is performed.

Specified by:
getMaskedTextEncoding in interface com.sas.prompts.definitions.TextDefinitionInterface
Returns:
the encoding which the value of the prompt will be output using

getAttributeDescriptors

public java.util.List getAttributeDescriptors(java.util.Locale locale)
Specified by:
getAttributeDescriptors in interface com.sas.util.AttributeDescription
Overrides:
getAttributeDescriptors in class PromptDefinition

addInputPattern

public final void addInputPattern(com.sas.util.LocalizableString inputPattern)
Description copied from interface: MutableTextDefinitionV2Interface
Adds an localized input pattern to the prompt. The pattern must be a valid regular expression, but this method will not check. Use isInputPatternValid() to check. Validity will be checked as part of prompt validation. A defensive copy of the LocalizableString will be created via clone(), so use removeInputPattern() then call this method with an revised LocalizableString to effect a change.

Specified by:
addInputPattern in interface com.sas.prompts.definitions.MutableTextDefinitionV2Interface

getInputPatterns

public java.util.List<com.sas.util.LocalizableString> getInputPatterns()
Description copied from interface: TextDefinitionV2Interface
Returns an unmodifiable list of all patterns.

Specified by:
getInputPatterns in interface com.sas.prompts.definitions.TextDefinitionV2Interface
Returns:
a non-null list

getInputPatternsAsText

public final java.util.List<java.lang.String> getInputPatternsAsText(java.util.Locale locale)
Description copied from interface: TextDefinitionV2Interface
Returns a list of strings that are the locale-specific input patterns. The pattern should be a valid regular expression. If no pattern was set for a specific locale, the pattern from the closest matching locale is returned.

Specified by:
getInputPatternsAsText in interface com.sas.prompts.definitions.TextDefinitionV2Interface
Parameters:
locale - the desired locale
Returns:
the list of patterns

getNumberOfInputPatterns

public final int getNumberOfInputPatterns()
Description copied from interface: TextDefinitionV2Interface
Returns the number of input patterns on this prompt or zero.

Specified by:
getNumberOfInputPatterns in interface com.sas.prompts.definitions.TextDefinitionV2Interface
Returns:
the number

isInputPatternValid

public final boolean isInputPatternValid(com.sas.util.LocalizableString inputPattern)
Description copied from interface: TextDefinitionV2Interface
Tests whether all regular expressions contained as text within the localizableString successfully compile with java.regex.Pattern.compile(). If any pattern causes an exception, this method returns false.

Specified by:
isInputPatternValid in interface com.sas.prompts.definitions.TextDefinitionV2Interface
Returns:
false if any pattern fails to compile

removeInputPattern

public final boolean removeInputPattern(com.sas.util.LocalizableString inputPattern)
Description copied from interface: MutableTextDefinitionV2Interface
Removes the supplied input pattern from the prompt if the pattern matches any pattern in the prompt's list.

Specified by:
removeInputPattern in interface com.sas.prompts.definitions.MutableTextDefinitionV2Interface
Returns:
true if the pattern was found and removed

getConstraints

protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
Overrides:
getConstraints in class PromptDefinition

setValueRetrieverConfiguration

public void setValueRetrieverConfiguration(com.sas.storage.vr.dto.ValueRetrieverConfiguration config)
Description copied from interface: MutableValueRetrieverDefinitionInterface
Sets the ValueRetrieverConfiguration instance.

Specified by:
setValueRetrieverConfiguration in interface com.sas.prompts.definitions.MutableValueRetrieverDefinitionInterface

getValueRetrieverConfiguration

public com.sas.storage.vr.dto.ValueRetrieverConfiguration getValueRetrieverConfiguration()
Description copied from interface: ValueRetrieverDefinitionInterface
Returns the ValueRetrieverConfiguration instance that was set, if any.

Specified by:
getValueRetrieverConfiguration in interface com.sas.prompts.definitions.ValueRetrieverDefinitionInterface
Returns:

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface com.sas.models.VersionInterface
Overrides:
getVersion in class PromptDefinition



Copyright © 2009 SAS Institute Inc. All Rights Reserved.