|
| 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 prompt| Method Detail |
|---|
public boolean isMasked()
isMasked in interface com.sas.prompts.definitions.TextDefinitionInterfacepublic void setMasked(boolean masked)
setMasked in interface com.sas.prompts.definitions.MutableTextDefinitionInterfacemasked - public boolean isAllowMultipleLines()
isAllowMultipleLines in interface com.sas.prompts.definitions.TextDefinitionInterfacepublic void setAllowMultipleLines(boolean allowMultipleLines)
setAllowMultipleLines in interface com.sas.prompts.definitions.MutableTextDefinitionInterfaceallowMultipleLines - booleanpublic int getDisplayedLines()
getDisplayedLines in interface com.sas.prompts.definitions.TextDefinitionInterfacepublic void setDisplayedLines(int displayedLines)
setDisplayedLines in interface com.sas.prompts.definitions.MutableTextDefinitionInterfacedisplayedLines - intpublic int getMaximumLines()
getMaximumLines in interface com.sas.prompts.definitions.TextDefinitionInterfacepublic void setMaximumLines(int maximumLines)
setMaximumLines in interface com.sas.prompts.definitions.MutableTextDefinitionInterfacemaximumLines - intpublic int getMinimumLength()
TextDefinitionInterface
getMinimumLength in interface com.sas.prompts.definitions.TextDefinitionInterfacepublic void setMinimumLength(int minimumLength)
setMinimumLength in interface com.sas.prompts.definitions.MutableTextDefinitionInterfaceminimumLength - intpublic int getMaximumLength()
getMaximumLength in interface com.sas.prompts.definitions.TextDefinitionInterfacepublic void setMaximumLength(int maximumLength)
setMaximumLength in interface com.sas.prompts.definitions.MutableTextDefinitionInterfacemaximumLength - int
public boolean isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
PromptDefinition
isPromptValueValid in interface com.sas.prompts.definitions.PromptDefinitionV2InterfaceisPromptValueValid in class PromptDefinitionPromptDefinitionV2Interface.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 PromptDefinitionInterfacegetPromptValueValidationErrors in class PromptDefinitionvalue - 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 PromptDefinitionInterfacevalidateDefinition in class PromptDefinitionlocale - 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 PromptDefinitionInterfacegetPromptDataType in class PromptDefinitionPromptDefinitionInterface.getPromptDataType()public java.lang.String toString()
toString in class PromptDefinitionPromptDefinition.toString()
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 boolean isRequired()
PromptDefinition
isRequired in interface PromptDefinitionInterfaceisRequired in class PromptDefinitionPromptDefinitionInterface.isRequired()public int getMaximumValueCount()
SelectableDefinitionInterface
getMaximumValueCount in interface SelectableDefinitionInterfacepublic int getMinimumValueCount()
SelectableDefinitionInterface
getMinimumValueCount in interface SelectableDefinitionInterfacepublic int getSelectionType()
SelectableDefinitionInterface
getSelectionType in interface SelectableDefinitionInterfacepublic boolean isSelectionOrdered()
SelectableDefinitionInterface
isSelectionOrdered in interface SelectableDefinitionInterfacepublic void setMaximumValueCount(int maximumValueCount)
MutableSelectableDefinitionInterface
setMaximumValueCount in interface MutableSelectableDefinitionInterfacemaximumValueCount - the maximum number of valid values for a prompt.public void setMinimumValueCount(int minimumValueCount)
MutableSelectableDefinitionInterface
setMinimumValueCount in interface MutableSelectableDefinitionInterfaceminimumValueCount - the minimum number of valid values for a prompt.public void setSelectionOrdered(boolean selectionOrdered)
MutableSelectableDefinitionInterface
setSelectionOrdered in interface MutableSelectableDefinitionInterfaceselectionOrdered - whether the order in which values are selected should be retained.public com.sas.storage.valueprovider.ValueProviderInterface getValueProvider()
ValueProviderDefinitionInterface
getValueProvider in interface ValueProviderDefinitionInterfacepublic boolean isAllowUserValues()
isAllowUserValues in interface com.sas.storage.valueprovider.AllowUserValuesInterfacepublic void setValueProvider(com.sas.storage.valueprovider.ValueProviderInterface valueProvider)
MutableValueProviderDefinitionInterface
setValueProvider in interface MutableValueProviderDefinitionInterfacevalueProvider - 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 MutableValueProviderDefinitionInterfaceallowValues - 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.SupportedSpecialValuesInterfacepublic void setSupportedSpecialValues(com.sas.util.SupportedSpecialValues specialValuesSupported)
setSupportedSpecialValues in interface com.sas.util.MutableSupportedSpecialValuesInterfacepublic void setMaskedTextEncoding(java.lang.String encoding)
setMaskedTextEncoding in interface com.sas.prompts.definitions.MutableTextDefinitionInterfaceencoding - 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.TextDefinitionInterfacepublic java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors in interface com.sas.util.AttributeDescriptiongetAttributeDescriptors in class PromptDefinitionpublic final void addInputPattern(com.sas.util.LocalizableString inputPattern)
MutableTextDefinitionV2InterfaceisInputPatternValid() 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.MutableTextDefinitionV2Interfacepublic java.util.List<com.sas.util.LocalizableString> getInputPatterns()
TextDefinitionV2Interface
getInputPatterns in interface com.sas.prompts.definitions.TextDefinitionV2Interfacepublic final java.util.List<java.lang.String> getInputPatternsAsText(java.util.Locale locale)
TextDefinitionV2Interface
getInputPatternsAsText in interface com.sas.prompts.definitions.TextDefinitionV2Interfacelocale - the desired locale
public final int getNumberOfInputPatterns()
TextDefinitionV2Interface
getNumberOfInputPatterns in interface com.sas.prompts.definitions.TextDefinitionV2Interfacepublic final boolean isInputPatternValid(com.sas.util.LocalizableString inputPattern)
TextDefinitionV2InterfacelocalizableString
successfully compile with java.regex.Pattern.compile(). If any pattern causes an exception, this method
returns false.
isInputPatternValid in interface com.sas.prompts.definitions.TextDefinitionV2Interfacepublic final boolean removeInputPattern(com.sas.util.LocalizableString inputPattern)
MutableTextDefinitionV2Interface
removeInputPattern in interface com.sas.prompts.definitions.MutableTextDefinitionV2Interfaceprotected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
getConstraints in class PromptDefinitionpublic void setValueRetrieverConfiguration(com.sas.storage.vr.dto.ValueRetrieverConfiguration config)
MutableValueRetrieverDefinitionInterface
setValueRetrieverConfiguration in interface com.sas.prompts.definitions.MutableValueRetrieverDefinitionInterfacepublic com.sas.storage.vr.dto.ValueRetrieverConfiguration getValueRetrieverConfiguration()
ValueRetrieverDefinitionInterface
getValueRetrieverConfiguration in interface com.sas.prompts.definitions.ValueRetrieverDefinitionInterfacepublic java.lang.String getVersion()
getVersion in interface com.sas.models.VersionInterfacegetVersion in class PromptDefinition
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||