|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.PromptDefinition
public abstract class PromptDefinition
Base class for implementing the PromptDefinitionInterface. It provides basic functionality common to all subclasses.
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
PromptDefinition()
Constructor |
|
PromptDefinition(java.lang.String promptName)
Constructor |
Method Summary | |
---|---|
void |
addUserInfo(java.lang.String key,
java.lang.String value)
Adds an entry to the user information map. |
void |
clearDefaultValue()
Clears the default value if one has been set. |
void |
configureAttributes(java.util.Map<java.lang.String,?> options,
java.util.Map<java.lang.String,?> context)
|
com.sas.uiconfig.ApplicationContext |
getApplicationContext()
|
java.util.List<?> |
getAttributeDescriptors(java.util.Locale myLocale)
|
protected java.util.Map<java.lang.String,java.lang.String> |
getConstraints(java.util.Locale locale)
|
java.lang.String |
getCustomErrorMessage(java.util.Locale locale)
Returns a formatted custom error message for the desired locale. |
com.sas.util.LocalizableString |
getCustomErrorMessages()
Returns a LocalizableString which contains all custom error messages for the prompt. |
java.lang.Object |
getDefaultValue()
Returns the default value. |
java.util.List<com.sas.prompts.AttributeDependencyInterface> |
getDependentPromptsForAttributes()
Returns a List of objects which implement AttributeDependencyInterface or an empty list. |
java.lang.String |
getHint(java.util.Locale locale)
Returns the hint used to tell the user how to enter the value for the prompt. |
com.sas.prompts.HintPlacement |
getHintPlacement()
Returns the hint label placement used to tell the user where to place hint label. |
com.sas.util.LocalizableString |
getHints()
Returns all the hints current set on the prompt definition. |
java.lang.String |
getInlineHint(java.util.Locale locale)
Returns the inline hint which should be displayed for the prompt when no value is set for the prompt. |
com.sas.util.LocalizableString |
getInlineHints()
Returns a LocalizableString which contains all inline hints for the prompt. |
com.sas.prompts.LabelPlacement |
getLabelPlacement()
|
com.sas.storage.editableproperties.PropertyList |
getLocalizableProperties()
Returns a list of properties that may be localized for the implementing object. |
com.sas.util.MutableUserInfoInterface |
getMutableUserInfo()
Returns an instance of MutableUserInfoInterface that maps String values to other String values which can be used by creators and consumers of prompts. |
abstract com.sas.datatypes.DataTypeInterface |
getPromptDataType()
Returns the data type of the prompt. |
java.lang.String |
getPromptDescription(java.util.Locale locale)
Returns the description of the prompt definition. |
com.sas.util.LocalizableString |
getPromptDescriptions()
Returns a LocalizableString containing the localized descriptions for the prompt. |
PromptHelp |
getPromptHelp()
Returns the help of the prompt definition. |
java.lang.String |
getPromptID()
Returns a unique identifier for the prompt. |
java.lang.String |
getPromptLabel(java.util.Locale locale)
Returns the label for the prompt. |
com.sas.util.LocalizableString |
getPromptLabels()
Returns a LocalizableString containing all of the prompt labels set for this prompt definition. |
java.lang.String |
getPromptName()
Returns the name of the prompt. |
java.util.Collection<ValidationEntry> |
getPromptValueValidationErrors(java.lang.Object value,
java.util.Locale locale)
Returns an empty Collection to indicate that there are no validation errors. |
com.sas.prompts.script.ScriptHolder |
getScript(com.sas.prompts.script.PromptAction promptAction)
Returns the ScriptHolder instance, if any, whose action matches the PromptAction parameter (which may not be null). |
java.util.Collection<com.sas.prompts.script.ScriptHolder> |
getScripts()
Returns an unmodifiable collection of the scripts or an empty collection. |
com.sas.uiconfig.UIConfigurationInterface |
getUIConfiguration()
Returns a UI configuration object with options indicating how the prompt designer would like the prompting UI to look and behave. |
com.sas.util.UserInfoInterface |
getUserInfo()
Returns an instance of UserInfoInterface that maps String values to other String values which can be used by creators and consumers of prompts. |
protected java.util.List<com.sas.util.xmlpersist.PersistenceInterface> |
getUserInfoAsText(com.sas.util.MutableUserInfoInterface uii)
Helper method for persistence, but now calls PromptUtil.getUserInfoAsText(uii) |
java.lang.String |
getVersion()
|
boolean |
isDefaultValueSet()
Returns whether the default value is set. |
boolean |
isDisplayDefaultValueAsBlank()
Returns whether the prompt value should be displayed as an empty field when the current value is the same as the default value. |
boolean |
isFixed()
Returns true if the prompt defintion has a fixed value. |
boolean |
isHidden()
Returns whether the prompt is hidden at runtime. |
boolean |
isPromptValueValid(java.lang.Object value)
Deprecated. |
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the value passed in is valid for this prompt definition. |
abstract boolean |
isRequired()
Returns whether the prompt value is required to be set before the user can continue with the operation being prompted for. |
boolean |
isValueClearedForNonSelectedModalChoiceGroup()
Returns whether the value for this prompt gets cleared when the prompt is contained within a ModalChoiceGroupInterface, otherwise this parameter is ignored. |
void |
removeScript(com.sas.prompts.script.PromptAction promptAction)
Removes the ScriptHolder whose action matches this PromptAction. |
void |
removeUserInfo(java.lang.String key)
Removes an entry from the user information map. |
void |
setAdditionalCascadeDependencies(java.util.Collection<PromptDefinitionInterface> dependencies)
Sets a collection of PromptDefinitionInterfaces that this prompt depends on. |
void |
setApplicationContext(com.sas.uiconfig.ApplicationContext applicationContext)
|
void |
setCustomErrorMessage(java.lang.String errorMessage,
java.util.Locale locale)
Locale may not be null. |
void |
setCustomErrorMessages(com.sas.util.LocalizableString customErrorMessages)
|
void |
setDefaultValue(java.lang.Object defaultValue)
Sets the default value for the prompt definition. |
void |
setDependentPromptsForAttributes(java.util.List<com.sas.prompts.AttributeDependencyInterface> dependencies)
Sets a List of objects which implement AttributeDependencyInterface. |
void |
setDisplayDefaultValueAsBlank(boolean isBlank)
Sets whether the prompt value should be displayed as an empty field when the current value is the same as the default value. |
void |
setFixed(boolean fixed)
Sets the prompt to have its value fixed or not. |
void |
setHidden(boolean hidden)
Sets whether the prompt is hidden at runtime. |
void |
setHint(java.lang.String hint,
java.util.Locale locale)
Sets the hint used to tell the user how to enter the value for the prompt. |
void |
setHintPlacement(com.sas.prompts.HintPlacement hintPlacement)
Sets the hint label placemnet used to place the hint label in the UI |
void |
setHints(com.sas.util.LocalizableString hints)
Sets a LocalizableString containing the localized hints for the prompt. |
void |
setInlineHint(java.lang.String inlineHint,
java.util.Locale locale)
Sets the inline hint to be displayed when the prompt has no value. |
void |
setInlineHints(com.sas.util.LocalizableString inlineHint)
Sets a LocalizableString containing the localized inline hints for the prompt. |
void |
setLabelPlacement(com.sas.prompts.LabelPlacement labelPlacement)
|
void |
setLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map)
Sets localized properties into the implementing object. |
void |
setPromptDescription(java.lang.String promptDescription,
java.util.Locale locale)
Sets the description of the prompt definition. |
void |
setPromptDescriptions(com.sas.util.LocalizableString descriptions)
Sets a LocalizableString containing the localized descriptions for the prompt. |
void |
setPromptHelp(PromptHelp promptHelp)
Sets the prompt help of the prompt definition. |
void |
setPromptLabel(java.lang.String promptLabel,
java.util.Locale locale)
Sets the label for the prompt. |
void |
setPromptLabels(com.sas.util.LocalizableString labels)
Sets a LocalizableString containing the localized labels for the prompt. |
void |
setPromptName(java.lang.String promptName)
Sets the name of the prompt |
void |
setScript(com.sas.prompts.script.ScriptHolder scriptHolder)
Sets the ScriptHolder into the collection. |
void |
setUIConfiguration(com.sas.uiconfig.UIConfigurationInterface uiConfig)
Set a UI configuration object with options indicating how the prompt designer would like the prompting UI to look and behave. |
void |
setUserInfo(com.sas.util.UserInfoInterface userInfo)
Sets an instance of UserInfoInterface which maps String keys to String values which can be used by creators and consumers of prompts. |
void |
setValueClearedForNonSelectedModalChoiceGroup(boolean value)
Sets whether the value for this prompt gets cleared when the prompt is contained within a ModalChoiceGroupInterface, otherwise this parameter is ignored. |
java.lang.String |
toString()
Returns subclass name plus getPromptName() . |
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. |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public PromptDefinition()
public PromptDefinition(java.lang.String promptName)
promptName
- Method Detail |
---|
public java.lang.String getPromptID()
getPromptID
in interface com.sas.prompts.IdentifiablePromptInterface
public java.lang.String getPromptName()
getPromptName
in interface PromptDefinitionInterface
PromptDefinitionInterface.getPromptName()
public void setPromptName(java.lang.String promptName)
setPromptName
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
promptName
- getPromptName()
public java.lang.String getPromptLabel(java.util.Locale locale)
getPromptLabel
in interface PromptDefinitionInterface
locale
- The locale to get the label for
PromptDefinitionInterface.getPromptLabel(Locale)
public void setPromptLabel(java.lang.String promptLabel, java.util.Locale locale)
setPromptLabel
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
promptLabel
- the label for the promptlocale
- The locale to set the label forMutablePromptDefinitionInterface.setPromptLabel(String, Locale)
public java.lang.String getPromptDescription(java.util.Locale locale)
getPromptDescription
in interface PromptDefinitionInterface
locale
- The locale that the description is in.
PromptDefinitionInterface.getPromptDescription(Locale)
public void setPromptDescription(java.lang.String promptDescription, java.util.Locale locale)
setPromptDescription
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
promptDescription
- The description of the meaning of the value being prompted for.locale
- The locale that the description is in.MutablePromptDefinitionInterface.setPromptDescription(String, Locale)
public com.sas.util.LocalizableString getPromptLabels()
getPromptLabels
in interface PromptDefinitionInterface
public void setPromptLabels(com.sas.util.LocalizableString labels)
setPromptLabels
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
labels
- a LocalizableString containing the localized labels for the prompt.public com.sas.util.LocalizableString getPromptDescriptions()
getPromptDescriptions
in interface PromptDefinitionInterface
public void setPromptDescriptions(com.sas.util.LocalizableString descriptions)
setPromptDescriptions
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
descriptions
- a LocalizableString containing the localized descriptions for the prompt.public java.lang.Object getDefaultValue()
getDefaultValue
in interface PromptDefinitionInterface
PromptDefinitionInterface.getDefaultValue()
public void setDefaultValue(java.lang.Object defaultValue)
setDefaultValue
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
defaultValue
- An appropriate value for the specific type of prompt definition.public void clearDefaultValue()
clearDefaultValue
in interface PromptDefinitionInterface
isDefaultValueSet()
public boolean isDefaultValueSet()
isDefaultValueSet
in interface PromptDefinitionInterface
PromptDefinitionInterface.isDefaultValueSet()
public PromptHelp getPromptHelp()
getPromptHelp
in interface com.sas.prompts.PromptHelpInterface
PromptHelp
public void setPromptHelp(PromptHelp promptHelp)
setPromptHelp
in interface com.sas.prompts.MutablePromptHelpInterface
promptHelp
- The help set by the creator of the promptPromptHelp
public abstract com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType
in interface PromptDefinitionInterface
PromptDefinitionInterface.getPromptDataType()
public abstract boolean isRequired()
isRequired
in interface PromptDefinitionInterface
PromptDefinitionInterface.isRequired()
public boolean isHidden()
isHidden
in interface PromptDefinitionInterface
PromptDefinitionInterface.isHidden()
public void setHidden(boolean hidden)
setHidden
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
hidden
- booleanMutablePromptDefinitionInterface.setHidden(boolean)
@Deprecated public boolean isPromptValueValid(java.lang.Object value)
isPromptValueValid
in interface PromptDefinitionInterface
value
- The value to check for validity
PromptDefinitionInterface.isPromptValueValid(java.lang.Object)
public boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
isPromptValueValid
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
PromptDefinitionV2Interface.isPromptValueValid(java.lang.Object, java.util.Locale)
public java.util.Collection<ValidationEntry> getPromptValueValidationErrors(java.lang.Object value, java.util.Locale locale)
getPromptValueValidationErrors
in interface PromptDefinitionInterface
value
- The value to check for errorslocale
- The locale to return the error messages in
PromptDefinitionInterface.getPromptValueValidationErrors(Object, Locale)
public java.util.Collection<ValidationEntry> validateDefinition(java.util.Locale locale)
validateDefinition
in interface PromptDefinitionInterface
locale
- Locale
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.validateDefinition(Locale)
public com.sas.util.MutableUserInfoInterface getMutableUserInfo()
getMutableUserInfo
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
MutablePromptDefinitionInterface.getMutableUserInfo()
public com.sas.util.UserInfoInterface getUserInfo()
getUserInfo
in interface PromptDefinitionInterface
PromptDefinitionInterface.getUserInfo()
public void setUserInfo(com.sas.util.UserInfoInterface userInfo)
If only a key is important, do not use null or "" for the value or else the key/value
will not be correctly persisted. Instead use a blank string like
com.sas.prompts.util.PromptConstants.USER_INFO_VALUE_BLANK
.
setUserInfo
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
userInfo
- Mapcom.sas.prompts.definitions.MutablePromptDefinitionInterface#setUserInfo(Map)
public void addUserInfo(java.lang.String key, java.lang.String value)
If only a key is important, do not use null or "" for the value or else the key/value
will not be correctly persisted. Instead use a blank string like
com.sas.prompts.util.PromptConstants.USER_INFO_VALUE_BLANK
.
addUserInfo
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
key
- value
- a non-null, non-"" valuepublic void removeUserInfo(java.lang.String key)
removeUserInfo
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
key
- public boolean isFixed()
isFixed
in interface PromptDefinitionInterface
PromptDefinitionInterface.isFixed()
public void setFixed(boolean fixed)
setFixed
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
fixed
- boolean true to fix the value for the prompt, false otherwiseMutablePromptDefinitionInterface.setFixed(boolean)
public void setAdditionalCascadeDependencies(java.util.Collection<PromptDefinitionInterface> dependencies)
setAdditionalCascadeDependencies
in interface com.sas.prompts.definitions.MutablePromptDefinitionInterface
dependencies
- a collection of PromptDefinitionInterfaces that this prompt depends on.public java.lang.String toString()
getPromptName()
.
toString
in class java.lang.Object
Object.toString()
public java.lang.String getHint(java.util.Locale locale)
HintableDefinitionInterface
getHint
in interface com.sas.prompts.definitions.HintableDefinitionInterface
locale
- Locale
public void setHint(java.lang.String hint, java.util.Locale locale)
MutableHintableDefinitionInterface
setHint
in interface com.sas.prompts.definitions.MutableHintableDefinitionInterface
hint
- locale
- Localepublic com.sas.util.LocalizableString getHints()
getHints
in interface com.sas.prompts.definitions.HintableDefinitionInterface
public void setHints(com.sas.util.LocalizableString hints)
setHints
in interface com.sas.prompts.definitions.MutableHintableDefinitionInterface
hints
- a LocalizableString containing the localized hints for the prompt.public boolean isDisplayDefaultValueAsBlank()
isDisplayDefaultValueAsBlank
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setDisplayDefaultValueAsBlank(boolean isBlank)
setDisplayDefaultValueAsBlank
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
public boolean isValueClearedForNonSelectedModalChoiceGroup()
PromptDefinitionV2Interface
isValueClearedForNonSelectedModalChoiceGroup
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setValueClearedForNonSelectedModalChoiceGroup(boolean value)
MutablePromptDefinitionV2Interface
setValueClearedForNonSelectedModalChoiceGroup
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
value
- true to clear the value, false otherwise.public void configureAttributes(java.util.Map<java.lang.String,?> options, java.util.Map<java.lang.String,?> context)
configureAttributes
in interface com.sas.util.AttributeConfigurationInterface
protected final java.util.List<com.sas.util.xmlpersist.PersistenceInterface> getUserInfoAsText(com.sas.util.MutableUserInfoInterface uii)
public com.sas.storage.editableproperties.PropertyList getLocalizableProperties()
LocalizableProperties
getLocalizableProperties
in interface com.sas.storage.editableproperties.LocalizableProperties
public void setLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map)
LocalizableProperties
setLocalizableProperties
in interface com.sas.storage.editableproperties.LocalizableProperties
map
- - map containing localized propertiespublic java.util.List<?> getAttributeDescriptors(java.util.Locale myLocale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
public java.util.List<com.sas.prompts.AttributeDependencyInterface> getDependentPromptsForAttributes()
getDependentPromptsForAttributes
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setDependentPromptsForAttributes(java.util.List<com.sas.prompts.AttributeDependencyInterface> dependencies)
setDependentPromptsForAttributes
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
dependencies
- a List of objects which implement AttributeDependencyInterface. Null may be passed in
to indicate no dependencies.protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
public java.lang.String getCustomErrorMessage(java.util.Locale locale)
getCustomErrorMessage
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
PromptDefinitionV2Interface.getCustomErrorMessage(java.util.Locale)
public com.sas.util.LocalizableString getCustomErrorMessages()
public void setCustomErrorMessage(java.lang.String errorMessage, @NotNull java.util.Locale locale)
setCustomErrorMessage
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
locale
- a non-null localecom.sas.prompts.definitions.MutablePromptDefinitionV2Interface#setCustomErrorMessage(com.sas.util.LocalizableString)
public void setCustomErrorMessages(com.sas.util.LocalizableString customErrorMessages)
public com.sas.prompts.script.ScriptHolder getScript(com.sas.prompts.script.PromptAction promptAction)
PromptDefinitionV2Interface
getScript
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setScript(com.sas.prompts.script.ScriptHolder scriptHolder)
MutablePromptDefinitionV2Interface
setScript
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
public void removeScript(com.sas.prompts.script.PromptAction promptAction)
MutablePromptDefinitionV2Interface
removeScript
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
public java.util.Collection<com.sas.prompts.script.ScriptHolder> getScripts()
PromptDefinitionV2Interface
getScripts
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public com.sas.uiconfig.UIConfigurationInterface getUIConfiguration()
getUIConfiguration
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setUIConfiguration(com.sas.uiconfig.UIConfigurationInterface uiConfig)
setUIConfiguration
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
uiConfig
- a UI configurationpublic java.lang.String getInlineHint(java.util.Locale locale)
getInlineHint
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
locale
- The locale to return the inline hint for
public com.sas.util.LocalizableString getInlineHints()
getInlineHints
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setInlineHint(java.lang.String inlineHint, java.util.Locale locale)
setInlineHint
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
inlineHint
- the inline hint to be displayed when the prompt has no value.locale
- The locale to set the inline hint for.public void setInlineHints(com.sas.util.LocalizableString inlineHint)
setInlineHints
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
inlineHint
- a LocalizableString containing the localized inline hints for the promptpublic com.sas.prompts.LabelPlacement getLabelPlacement()
getLabelPlacement
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
public void setLabelPlacement(com.sas.prompts.LabelPlacement labelPlacement)
setLabelPlacement
in interface com.sas.prompts.definitions.MutablePromptDefinitionV2Interface
public com.sas.prompts.HintPlacement getHintPlacement()
HintableDefinitionV2Interface
getHintPlacement
in interface com.sas.prompts.definitions.HintableDefinitionV2Interface
public void setHintPlacement(com.sas.prompts.HintPlacement hintPlacement)
MutableHintableDefinitionV2Interface
setHintPlacement
in interface com.sas.prompts.definitions.MutableHintableDefinitionV2Interface
public java.lang.String getVersion()
getVersion
in interface com.sas.models.VersionInterface
getVersion
in class com.sas.util.xmlpersist.impl.BaseAbstractPersistence
public final com.sas.uiconfig.ApplicationContext getApplicationContext()
getApplicationContext
in interface com.sas.uiconfig.ContextEnabledObject
public final void setApplicationContext(com.sas.uiconfig.ApplicationContext applicationContext)
setApplicationContext
in interface com.sas.uiconfig.ContextEnabledObject
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |