|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.prompts.definitions.DateRangeDefinition
public class DateRangeDefinition
DateDefinition is a prompt type which allows the specification of a range of dates by specifying a minimum and maximum date.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
DateRangeDefinition()
Constructor |
|
DateRangeDefinition(java.lang.String promptName)
Constructor |
|
| Method Summary | |
|---|---|
void |
configureAttributes(java.util.Map<java.lang.String,?> options,
java.util.Map<java.lang.String,?> context)
|
protected java.util.Map<java.lang.String,java.lang.String> |
getConstraints(java.util.Locale locale)
|
com.sas.util.DateTypes |
getDateType()
Returns the type of date, time or timestamp value allowed for this prompt. |
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.util.Date |
getMaximum()
Returns the maximum allowed date or null if none is set. |
java.util.Date |
getMinimum()
Returns the minimum allowed date or null if none is set. |
com.sas.datatypes.DataTypeInterface |
getPromptDataType()
Returns the data type used to manipulate values for the type of date 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. |
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the specified value meets the constraints on the prompt definition. |
void |
setDateType(com.sas.util.DateTypes dateType)
Sets the type of date, time or timestamp value allowed for this prompt. |
void |
setMaximum(java.util.Date maximum)
Sets the maximum allowed date. |
void |
setMinimum(java.util.Date minimum)
Sets the minimum allowed date. |
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. |
| Methods inherited from class com.sas.prompts.definitions.BaseDefinitionRange |
|---|
getAttributeDescriptors, 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 |
| Constructor Detail |
|---|
public DateRangeDefinition()
public DateRangeDefinition(java.lang.String promptName)
promptName - The name of the prompt| Method Detail |
|---|
protected java.lang.String getDefaultMaxLabel(java.util.Locale locale)
getDefaultMaxLabel in class BaseDefinitionRangelocale - The locale the retrieve the label for
protected java.lang.String getDefaultMinLabel(java.util.Locale locale)
getDefaultMinLabel in class BaseDefinitionRangelocale - The locale the retrieve the label for
public com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType in interface PromptDefinitionInterfacegetPromptDataType in class PromptDefinitionPromptDefinitionInterface.getPromptDataType()public java.util.Date getMinimum()
getMinimum in interface com.sas.prompts.definitions.DateRangeDefinitionInterfaceDateRangeDefinitionInterface.getMinimum()public void setMinimum(java.util.Date minimum)
setMinimum in interface com.sas.prompts.definitions.MutableDateRangeDefinitionInterfaceminimum - the minimum allowed date.public java.util.Date getMaximum()
getMaximum in interface com.sas.prompts.definitions.DateRangeDefinitionInterfaceDateRangeDefinitionInterface.getMaximum()public void setMaximum(java.util.Date maximum)
setMaximum in interface com.sas.prompts.definitions.MutableDateRangeDefinitionInterfacemaximum - the maximum allowed date.
public boolean isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
isPromptValueValid in interface com.sas.prompts.definitions.PromptDefinitionV2InterfaceisPromptValueValid in class PromptDefinitionvalue - 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 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 - 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.util.DateTypes getDateType()
getDateType in interface com.sas.prompts.definitions.DateRangeDefinitionInterfaceDateDefinitionInterface.getDateType()public void setDateType(com.sas.util.DateTypes dateType)
setDateType in interface com.sas.prompts.definitions.MutableDateRangeDefinitionInterfacedateType - the type of date, time or timestamp value allowed for this prompt.MutableDateDefinitionInterface.setDateType(DateTypes)
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 BaseDefinitionRangeprotected 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 | |||||||||||||