|
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)
|
java.util.List |
getAttributeDescriptors(java.util.Locale locale)
|
protected java.util.Map<java.lang.String,java.lang.String> |
getConstraints(java.util.Locale locale)
|
java.lang.String |
getDateRelativity()
Returns the dateRelativity constraint for the relative date |
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 |
getMaxMax()
Returns the user set maximumMaximum date allowed for the 'maximum' property |
java.util.Date |
getMinimum()
Returns the minimum allowed date or null if none is set. |
java.util.Date |
getMinMin()
Returns the user set minimumMinimum date allowed for the 'minimum' property |
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. |
java.lang.String |
getVersion()
|
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the specified value meets the constraints on the prompt definition. |
boolean |
isRelativeAllowed()
Returns 'false' when the relativity is set to PromptConstants.relativeToNone Else it returns ' true' |
void |
setDateRelativity(java.lang.String dateRelativity)
This defines the dateRelativity for the Relative Date values. |
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 |
setMaxMax(java.util.Date maxMax)
Set the date allowed for the 'minimum' property. |
void |
setMinimum(java.util.Date minimum)
Sets the minimum allowed date. |
void |
setMinMin(java.util.Date minMin)
Set the minimumMinimum date allowed for the 'minimum' property. |
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 |
---|
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 promptMethod Detail |
---|
public java.lang.String getVersion()
getVersion
in interface com.sas.models.VersionInterface
getVersion
in class PromptDefinition
public java.util.Date getMinMin()
getMinMin
in interface DateRangeDefinitionV3Interface
public void setMinMin(java.util.Date minMin)
setMinMin
in interface com.sas.prompts.definitions.MutableDateRangeDefinitionV3Interface
minMin
- date allowed for the 'minimum' propertypublic java.util.Date getMaxMax()
getMaxMax
in interface DateRangeDefinitionV3Interface
public void setMaxMax(java.util.Date maxMax)
setMaxMax
in interface com.sas.prompts.definitions.MutableDateRangeDefinitionV3Interface
maxMax
- date allowed for the 'maximum' propertyprotected java.lang.String getDefaultMaxLabel(java.util.Locale locale)
getDefaultMaxLabel
in class BaseDefinitionRange
locale
- The locale the retrieve the label for
protected java.lang.String getDefaultMinLabel(java.util.Locale locale)
getDefaultMinLabel
in class BaseDefinitionRange
locale
- The locale the retrieve the label for
public com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType
in interface PromptDefinitionInterface
getPromptDataType
in class PromptDefinition
PromptDefinitionInterface.getPromptDataType()
public java.util.Date getMinimum()
getMinimum
in interface com.sas.prompts.definitions.DateRangeDefinitionInterface
DateRangeDefinitionInterface.getMinimum()
public void setMinimum(java.util.Date minimum)
setMinimum
in interface com.sas.prompts.definitions.MutableDateRangeDefinitionInterface
minimum
- the minimum allowed date.public java.util.Date getMaximum()
getMaximum
in interface com.sas.prompts.definitions.DateRangeDefinitionInterface
DateRangeDefinitionInterface.getMaximum()
public void setMaximum(java.util.Date maximum)
setMaximum
in interface com.sas.prompts.definitions.MutableDateRangeDefinitionInterface
maximum
- the maximum allowed date.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.util.DateTypes getDateType()
getDateType
in interface com.sas.prompts.definitions.DateRangeDefinitionInterface
DateDefinitionInterface.getDateType()
public void setDateType(com.sas.util.DateTypes dateType)
setDateType
in interface com.sas.prompts.definitions.MutableDateRangeDefinitionInterface
dateType
- 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.AttributeConfigurationInterface
configureAttributes
in class BaseDefinitionRange
public java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
getAttributeDescriptors
in class BaseDefinitionRange
protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
getConstraints
in class PromptDefinition
public void setDateRelativity(java.lang.String dateRelativity)
setDateRelativity
in interface com.sas.prompts.definitions.MutableDateRangeDefinitionV2Interface
dateRelativity
- public java.lang.String getDateRelativity()
DateRangeDefinitionV2Interface
getDateRelativity
in interface com.sas.prompts.definitions.DateRangeDefinitionV2Interface
public boolean isRelativeAllowed()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |