|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.IntegerDefinition
public class IntegerDefinition
IntegerDefinition is a prompt type which allows the specification of one or more integer values.
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 | |
---|---|
IntegerDefinition()
Constructor |
|
IntegerDefinition(java.lang.String promptName)
Constructor |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone this PromptDefinition. |
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 |
getMaximum()
Returns the maximum allowed value for the prompt. |
int |
getMaximumValueCount()
Returns the maximum number of values the user is allowed to select. |
int |
getMinimum()
Returns the minimum allowed value for the prompt. |
int |
getMinimumValueCount()
Returns the minimum number of values the user is allowed to select. |
com.sas.datatypes.DataTypeInterface |
getPromptDataType()
Returns an instance of com.sas.datatypes.CollectionType or com.sas.datatypes.IntegerType that can be used to process values for this 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 |
isAllowUserValues()
|
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the specified value meets the constraints on the 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. |
void |
setAllowUserValues(boolean allowValues)
Sets whether the user should be allowed to specify values in addition to those returned by the value provider. |
void |
setMaximum(int maximum)
Sets the maximum allowed value for the prompt. |
void |
setMaximumValueCount(int maximumValueCount)
Sets the maximum number of valid values for a prompt. |
void |
setMinimum(int minimum)
Sets the minimum allowed value for the prompt. |
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.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. |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public IntegerDefinition()
public IntegerDefinition(java.lang.String promptName)
promptName
- Method Detail |
---|
public int getMinimum()
getMinimum
in interface com.sas.prompts.definitions.IntegerDefinitionInterface
public void setMinimum(int minimum)
setMinimum
in interface com.sas.prompts.definitions.MutableIntegerDefinitionInterface
minimum
- the minimum allowed value for the prompt.public int getMaximum()
getMaximum
in interface com.sas.prompts.definitions.IntegerDefinitionInterface
public void setMaximum(int maximum)
setMaximum
in interface com.sas.prompts.definitions.MutableIntegerDefinitionInterface
maximum
- the minimum allowed value for the prompt.public 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.
PromptDefinitionInterface.isPromptValueValid(Object)
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
- 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 PromptDefinition
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
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.Object clone() throws java.lang.CloneNotSupportedException
PromptDefinition
clone
in interface com.sas.PublicClonable
clone
in class PromptDefinition
java.lang.CloneNotSupportedException
public java.lang.String getVersion()
getVersion
in interface com.sas.models.VersionInterface
getVersion
in class PromptDefinition
public boolean validIndividualValue(java.lang.Object value, java.util.Locale locale)
SelectableDefinitionV2Interface
validIndividualValue
in interface com.sas.prompts.definitions.SelectableDefinitionV2Interface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |