|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.TextDefinition
public class TextDefinition
Prompt definition for standard text entry prompts.
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Fields inherited from interface com.sas.prompts.definitions.SelectableDefinitionInterface |
---|
MULTIPLE_SELECTION, ORDERED_MULTIPLE_SELECTION, SINGLE_SELECTION |
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 interface com.sas.prompts.definitions.PromptDefinitionInterface |
---|
clearDefaultValue, getDefaultValue, getPromptDescription, getPromptDescriptions, getPromptLabel, getPromptLabels, getPromptName, getUserInfo, isDefaultValueSet, isFixed, isHidden, isPromptValueValid |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public TextDefinition()
public TextDefinition(java.lang.String promptName)
promptName
- The name of the promptMethod Detail |
---|
public boolean isMasked()
isMasked
in interface com.sas.prompts.definitions.TextDefinitionInterface
public void setMasked(boolean masked)
setMasked
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
masked
- public boolean isAllowMultipleLines()
isAllowMultipleLines
in interface com.sas.prompts.definitions.TextDefinitionInterface
public void setAllowMultipleLines(boolean allowMultipleLines)
setAllowMultipleLines
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
allowMultipleLines
- booleanpublic int getDisplayedLines()
getDisplayedLines
in interface com.sas.prompts.definitions.TextDefinitionInterface
public void setDisplayedLines(int displayedLines)
setDisplayedLines
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
displayedLines
- intpublic int getMaximumLines()
getMaximumLines
in interface com.sas.prompts.definitions.TextDefinitionInterface
public void setMaximumLines(int maximumLines)
setMaximumLines
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
maximumLines
- intpublic int getMinimumLength()
TextDefinitionInterface
getMinimumLength
in interface com.sas.prompts.definitions.TextDefinitionInterface
public void setMinimumLength(int minimumLength)
setMinimumLength
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
minimumLength
- intpublic int getMaximumLength()
getMaximumLength
in interface com.sas.prompts.definitions.TextDefinitionInterface
public void setMaximumLength(int maximumLength)
setMaximumLength
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
maximumLength
- intpublic boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
PromptDefinition
isPromptValueValid
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
isPromptValueValid
in class PromptDefinition
PromptDefinitionV2Interface.isPromptValueValid(java.lang.Object, java.util.Locale)
public boolean validIndividualValue(java.lang.Object value, java.util.Locale locale)
SelectableDefinitionV2Interface
validIndividualValue
in interface com.sas.prompts.definitions.SelectableDefinitionV2Interface
public java.util.Collection<ValidationEntry> 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<ValidationEntry> 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
- Locale
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.validateDefinition(Locale)
public com.sas.datatypes.DataTypeInterface getPromptDataType()
PromptDefinition
getPromptDataType
in interface PromptDefinitionInterface
getPromptDataType
in class PromptDefinition
PromptDefinitionInterface.getPromptDataType()
public java.lang.String toString()
toString
in class PromptDefinition
PromptDefinition.toString()
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 PromptDefinition
public boolean isRequired()
PromptDefinition
isRequired
in interface PromptDefinitionInterface
isRequired
in class PromptDefinition
PromptDefinitionInterface.isRequired()
public int getMaximumValueCount()
SelectableDefinitionInterface
getMaximumValueCount
in interface SelectableDefinitionInterface
public int getMinimumValueCount()
SelectableDefinitionInterface
getMinimumValueCount
in interface SelectableDefinitionInterface
public int getSelectionType()
SelectableDefinitionInterface
getSelectionType
in interface SelectableDefinitionInterface
public boolean isSelectionOrdered()
SelectableDefinitionInterface
isSelectionOrdered
in interface SelectableDefinitionInterface
public void setMaximumValueCount(int maximumValueCount)
MutableSelectableDefinitionInterface
setMaximumValueCount
in interface MutableSelectableDefinitionInterface
maximumValueCount
- the maximum number of valid values for a prompt.public void setMinimumValueCount(int minimumValueCount)
MutableSelectableDefinitionInterface
setMinimumValueCount
in interface MutableSelectableDefinitionInterface
minimumValueCount
- the minimum number of valid values for a prompt.public void setSelectionOrdered(boolean selectionOrdered)
MutableSelectableDefinitionInterface
setSelectionOrdered
in interface MutableSelectableDefinitionInterface
selectionOrdered
- whether the order in which values are selected should be retained.public com.sas.storage.valueprovider.ValueProviderInterface getValueProvider()
ValueProviderDefinitionInterface
getValueProvider
in interface ValueProviderDefinitionInterface
public boolean isAllowUserValues()
isAllowUserValues
in interface com.sas.storage.valueprovider.AllowUserValuesInterface
public void setValueProvider(com.sas.storage.valueprovider.ValueProviderInterface valueProvider)
MutableValueProviderDefinitionInterface
setValueProvider
in interface MutableValueProviderDefinitionInterface
valueProvider
- the value provider which will be used to determine the set of possible values for the prompt.public void setAllowUserValues(boolean allowValues)
MutableValueProviderDefinitionInterface
setAllowUserValues
in interface MutableValueProviderDefinitionInterface
allowValues
- whether the user should be allowed to specify values in addition to those returned by the
value provider.public com.sas.util.SupportedSpecialValues getSupportedSpecialValues()
getSupportedSpecialValues
in interface com.sas.util.SupportedSpecialValuesInterface
public void setSupportedSpecialValues(com.sas.util.SupportedSpecialValues specialValuesSupported)
setSupportedSpecialValues
in interface com.sas.util.MutableSupportedSpecialValuesInterface
public void setMaskedTextEncoding(java.lang.String encoding)
setMaskedTextEncoding
in interface com.sas.prompts.definitions.MutableTextDefinitionInterface
encoding
- The encoding to use for the prompt value when the prompt is in masked entry mode.public java.lang.String getMaskedTextEncoding()
TextDefinitionInterface
getMaskedTextEncoding
in interface com.sas.prompts.definitions.TextDefinitionInterface
public java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
getAttributeDescriptors
in class PromptDefinition
public final void addInputPattern(com.sas.util.LocalizableString inputPattern)
MutableTextDefinitionV2Interface
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.
addInputPattern
in interface com.sas.prompts.definitions.MutableTextDefinitionV2Interface
public java.util.List<com.sas.util.LocalizableString> getInputPatterns()
TextDefinitionV2Interface
getInputPatterns
in interface com.sas.prompts.definitions.TextDefinitionV2Interface
public final java.util.List<java.lang.String> getInputPatternsAsText(java.util.Locale locale)
TextDefinitionV2Interface
getInputPatternsAsText
in interface com.sas.prompts.definitions.TextDefinitionV2Interface
locale
- the desired locale
public final int getNumberOfInputPatterns()
TextDefinitionV2Interface
getNumberOfInputPatterns
in interface com.sas.prompts.definitions.TextDefinitionV2Interface
public final boolean isInputPatternValid(com.sas.util.LocalizableString inputPattern)
TextDefinitionV2Interface
localizableString
successfully compile with java.regex.Pattern.compile()
. If any pattern causes an exception, this method
returns false.
isInputPatternValid
in interface com.sas.prompts.definitions.TextDefinitionV2Interface
public final boolean removeInputPattern(com.sas.util.LocalizableString inputPattern)
MutableTextDefinitionV2Interface
removeInputPattern
in interface com.sas.prompts.definitions.MutableTextDefinitionV2Interface
protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
getConstraints
in class PromptDefinition
public void setValueRetrieverConfiguration(com.sas.storage.vr.dto.ValueRetrieverConfiguration config)
MutableValueRetrieverDefinitionInterface
setValueRetrieverConfiguration
in interface com.sas.prompts.definitions.MutableValueRetrieverDefinitionInterface
public com.sas.storage.vr.dto.ValueRetrieverConfiguration getValueRetrieverConfiguration()
ValueRetrieverDefinitionInterface
getValueRetrieverConfiguration
in interface com.sas.prompts.definitions.ValueRetrieverDefinitionInterface
public java.lang.String getVersion()
getVersion
in interface com.sas.models.VersionInterface
getVersion
in class PromptDefinition
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |