|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.DateDefinition
public class DateDefinition
Field Summary | |
---|---|
static java.util.Date |
maximumMaximum
Date representing the maximum date allowed for the "maximum" property. |
static java.util.Date |
minimumMinimum
Date representing the minimum date allowed for the "minimum" property. |
static com.sas.util.DatePeriod |
periodInTheFuture
DatePeriod representing the largest interval allowed for a period in the future. |
static com.sas.util.DatePeriod |
periodInThePast
DatePeriod representing the largest interval allowed for a period in the past. |
static java.lang.String |
RB_KEY
|
Fields inherited from interface com.sas.prompts.definitions.SelectableDefinitionInterface |
---|
MULTIPLE_SELECTION, ORDERED_MULTIPLE_SELECTION, SINGLE_SELECTION |
Constructor Summary | |
---|---|
DateDefinition()
Constructor |
|
DateDefinition(java.lang.String promptName)
Constructor for DateDefinition. |
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)
|
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. |
java.util.Date |
getMaximum()
Returns the maximum allowed date or null if none is set. |
int |
getMaximumValueCount()
Returns the maximum number of values the user is allowed to select. |
java.util.Date |
getMinimum()
Returns the minimum allowed date or null if none is set. |
int |
getMinimumValueCount()
Returns the minimum number of values the user is allowed to select. |
int |
getPageSize()
Internal method |
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. |
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 |
isRelativeAllowed()
Returns 'false' when the relativity is set to PromptConstants.relativeToNone Else it returns ' true' |
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 |
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 |
setLoggerFactory(com.sas.util.log.LoggerFactoryInterface factory)
Sets the factory that will provide the desired logger implementation. |
void |
setMaximum(java.util.Date maximum)
Sets the maximum allowed date. |
void |
setMaximumValueCount(int maximumValueCount)
Sets the maximum number of valid values for a prompt. |
void |
setMinimum(java.util.Date minimum)
Sets the minimum allowed date. |
void |
setMinimumValueCount(int minimumValueCount)
Sets the minimum number of valid values for a prompt. |
void |
setPageSize(int pageSize)
Internal method |
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. |
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
public static final java.util.Date minimumMinimum
public static final java.util.Date maximumMaximum
public static final com.sas.util.DatePeriod periodInThePast
public static final com.sas.util.DatePeriod periodInTheFuture
Constructor Detail |
---|
public DateDefinition()
public DateDefinition(java.lang.String promptName)
promptName
- The name of the prompt as StringMethod Detail |
---|
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 java.util.Date getMaximum()
getMaximum
in interface com.sas.prompts.definitions.DateDefinitionInterface
DateDefinitionInterface.getMaximum()
public void setMaximum(java.util.Date maximum)
setMaximum
in interface com.sas.prompts.definitions.MutableDateDefinitionInterface
maximum
- the maximum allowed date.public java.util.Date getMinimum()
getMinimum
in interface com.sas.prompts.definitions.DateDefinitionInterface
DateDefinitionInterface.getMinimum()
public void setMinimum(java.util.Date minimum)
setMinimum
in interface com.sas.prompts.definitions.MutableDateDefinitionInterface
minimum
- the minimum allowed date.public com.sas.util.DateTypes getDateType()
getDateType
in interface com.sas.prompts.definitions.DateDefinitionInterface
DateDefinitionInterface.getDateType()
public void setDateType(com.sas.util.DateTypes dateType)
setDateType
in interface com.sas.prompts.definitions.MutableDateDefinitionInterface
dateType
- the type of date, time or timestamp value allowed for this prompt.MutableDateDefinitionInterface.setDateType(DateTypes)
public com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType
in interface PromptDefinitionInterface
getPromptDataType
in class PromptDefinition
PromptDefinitionInterface.getPromptDataType()
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 int getPageSize()
ValueProviderDefinitionInterface
getPageSize
in interface ValueProviderDefinitionInterface
public void setPageSize(int pageSize)
MutableValueProviderDefinitionInterface
setPageSize
in interface MutableValueProviderDefinitionInterface
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 setLoggerFactory(com.sas.util.log.LoggerFactoryInterface factory)
BaseAbstractPersistence
com.sas.util.log.fs.ServicesLogFactory
for the SAS Logging Service or you can get Log4J logging from
com.sas.util.log.Log4JFactory
.
With deprecation of the Logging Service in 9.3, this method is unnecessary and does nothing.
setLoggerFactory
in interface com.sas.util.log.ComponentLogFactoryInterface
setLoggerFactory
in class com.sas.util.xmlpersist.impl.BaseAbstractPersistence
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 java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
getAttributeDescriptors
in class PromptDefinition
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.MutableDateDefinitionV2Interface
dateRelativity
- public java.lang.String getDateRelativity()
DateDefinitionV2Interface
getDateRelativity
in interface com.sas.prompts.definitions.DateDefinitionV2Interface
public boolean isRelativeAllowed()
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 |