|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PromptGroupInterface
Defines a hierarchical group of prompts. Each group contains prompt definitions and subgroups. Prompt names are only allowed to be used once per group. Implementations of this interface should store prompt definitions and subgroups together in an ordered manner.
Field Summary | |
---|---|
static long |
PROMPT_GROUP_VALIDATION_ERROR_DISALLOWED_PROMPT_DEFINITION
Validation error code indicating that a prompt is not valid in the containing group type |
static long |
PROMPT_GROUP_VALIDATION_ERROR_DUPLICATE_MODAL_CHOICE_VALUE
Validation error code indicating that two ModalChoiceGroups in a ModalGroup have the same value |
static long |
PROMPT_GROUP_VALIDATION_ERROR_NOT_VALID_SUBGROUP
Validation error code indicating that a subgroup is not valid in the containing group type |
static long |
PROMPT_GROUP_VALIDATION_NO_ERRORS
Validation error code indicating no errors |
Method Summary | |
---|---|
void |
addPromptDefinition(PromptDefinitionInterface promptDefinition)
Adds the specified prompt to the group being called at the end of the list of prompts and groups. |
void |
addPromptDefinition(PromptDefinitionInterface promptDefinition,
int index)
Adds the specified prompt to the group being called at the specified index. |
void |
addPromptDefinitions(java.util.List<PromptDefinitionInterface> promptDefinitions)
Adds the specified prompts to the group being called at the end of the list of prompts and groups. |
void |
addPromptSubgroup(PromptGroupInterface promptSubgroup)
Adds the specified group to the called group as a child. |
void |
addPromptSubgroup(PromptGroupInterface promptSubgroup,
int index)
Adds the specified group to the called group as a child. |
boolean |
containsSubgroup(PromptGroupInterface subGroupCandidate,
boolean recursive)
Returns true if the specified subGroupCandidate argument is identified as a subgroup of this group. |
PromptGroupInterface |
findPromptSubgroup(PromptDefinitionInterface promptDefinition)
Finds the specified PromptDefinition in the hierarchy of PromptGroups and returns the group directly containing the definition. |
PromptDefinitionInterface |
getPromptDefinition(java.lang.String promptName,
boolean recursive)
Returns the first prompt definition found in the group with the specified name or null if a definition cannot be found. |
java.util.List<PromptDefinitionInterface> |
getPromptDefinitions(boolean recursive)
Returns a List of all prompt definitions in this group. |
java.util.List<?> |
getPromptDefinitionsAndSubgroups()
Returns a List of all prompt definitions and subgroups in this group, this is not recursive. |
java.util.List<?> |
getPromptDefinitionsAndSubgroups(java.util.List list,
boolean recursive,
boolean includeDefinitions,
boolean includeSubgroups)
Returns a List containing all of the PromptDefinitions and Prompts in the group and optionally the subgroups of the group. |
java.lang.String |
getPromptGroupDescription(java.util.Locale locale)
Returns the description for the group in the specified Locale. |
com.sas.util.LocalizableString |
getPromptGroupDescriptions()
Returns a LocalizableString containing a copy of the localized descriptions for the group. |
java.lang.String |
getPromptGroupLabel(java.util.Locale locale)
Returns the label for the group in the specified Locale. |
com.sas.util.LocalizableString |
getPromptGroupLabels()
Returns a LocalizableString containing a copy of the localized labels for the group. |
java.util.List<PromptGroupInterface> |
getPromptSubgroups(boolean recursive)
Returns a List of all prompt groups contained in this prompt group. |
boolean |
hasPromptDefinition(PromptDefinitionInterface promptDefinition)
Returns whether the prompt definition is found in the group. |
int |
indexOfPromptDefinitionOrSubgroup(java.lang.Object promptDefintionOrSubGroup)
Returns the index of the PromptDefintionInterface or PromptGroupInterface that is passed in. |
boolean |
isPromptGroupHidden()
Returns whether the prompt group should be displayed to the user at runtime. |
void |
removeAll()
Removes all prompts and groups contained within the group. |
void |
removeAllPromptDefinitions(boolean recursive)
Removes all prompts from the group. |
void |
removeAllPromptSubgroups()
Removes all groups contained within the group. |
void |
removePromptDefinition(PromptDefinitionInterface promptDefinition)
Removes the specified prompt from the group. |
void |
removePromptSubgroup(PromptGroupInterface promptSubgroup)
Removes the specified group from the called group. |
boolean |
replacePromptDefintion(PromptDefinitionInterface promptDefinition,
PromptDefinitionInterface newPromptDefinition,
boolean recursive)
Replaces the specified prompt with the other specified prompt. |
boolean |
replacePromptSubgroup(PromptGroupInterface promptSubgroup,
PromptGroupInterface newPromptSubgroup,
boolean recursive)
Replaces the specified group with the other specified group. |
void |
setPromptGroupDescription(java.lang.String description,
java.util.Locale locale)
Sets the description for the group in the specified Locale. |
void |
setPromptGroupDescriptions(com.sas.util.LocalizableString descriptions)
Returns a LocalizableString containing a copy of the localized descriptions for the group. |
void |
setPromptGroupHidden(boolean hidden)
Sets whether the prompt group should be hidden from the user at runtime. |
void |
setPromptGroupLabel(java.lang.String label,
java.util.Locale locale)
Sets the label for the group in the specified Locale. |
void |
setPromptGroupLabels(com.sas.util.LocalizableString labels)
Returns a LocalizableString containing a copy of the localized labels for the group. |
Field Detail |
---|
static final long PROMPT_GROUP_VALIDATION_NO_ERRORS
static final long PROMPT_GROUP_VALIDATION_ERROR_NOT_VALID_SUBGROUP
static final long PROMPT_GROUP_VALIDATION_ERROR_DISALLOWED_PROMPT_DEFINITION
static final long PROMPT_GROUP_VALIDATION_ERROR_DUPLICATE_MODAL_CHOICE_VALUE
Method Detail |
---|
PromptDefinitionInterface getPromptDefinition(java.lang.String promptName, boolean recursive)
promptName
- The name of the prompt definition to search forrecursive
- boolean
boolean hasPromptDefinition(PromptDefinitionInterface promptDefinition)
promptDefinition
- The prompt definition to search for
java.util.List<?> getPromptDefinitionsAndSubgroups(java.util.List list, boolean recursive, boolean includeDefinitions, boolean includeSubgroups)
definitions
- A List to populate or null to have a new List created and returnedrecursive
- Whether to return prompts and groups recursivelyincludeDefinitions
- Whether to include prompts in the returned listincludeSubgroups
- Whether to include subgroups in the returned list
java.util.List<?> getPromptDefinitionsAndSubgroups()
java.util.List<PromptDefinitionInterface> getPromptDefinitions(boolean recursive)
recursive
- boolean true if to include definitions in subgroups, false otherwise
java.util.List<PromptGroupInterface> getPromptSubgroups(boolean recursive)
recursive
- whether to search subgroups of the passed in group for subgroups.
void addPromptDefinition(PromptDefinitionInterface promptDefinition)
promptDefinition
- The prompt to add to the group.void addPromptDefinition(PromptDefinitionInterface promptDefinition, int index)
promptDefinition
- The prompt to add to the group.index
- The index to add the definition at.void addPromptDefinitions(java.util.List<PromptDefinitionInterface> promptDefinitions)
promptDefinition
- The List of prompts to add to the group.void removePromptDefinition(PromptDefinitionInterface promptDefinition)
promptDefinition
- The prompt to remove from the group.void removeAllPromptDefinitions(boolean recursive)
recursive
- Whether to also remove prompts from all subgroups.void removeAllPromptSubgroups()
void removeAll()
boolean replacePromptDefintion(PromptDefinitionInterface promptDefinition, PromptDefinitionInterface newPromptDefinition, boolean recursive)
promptDefinition
- The prompt to be replaced.newPromptDefinition
- The prompt to put in place of promptDefinition.recursive
- If recursive is true, subgroups are searched for the specified
prompt to replace. If not, only the top level group is searched.
boolean replacePromptSubgroup(PromptGroupInterface promptSubgroup, PromptGroupInterface newPromptSubgroup, boolean recursive)
promptSubgroup
- The group to be replaced.newPromptSubgroup
- The group to put in place of promptSubgroup.recursive
- If recursive is true, subgroups are searched for the specified
group to replace. If not, only the top level group is searched.
void addPromptSubgroup(PromptGroupInterface promptSubgroup)
promptSubgroup
- The group to add.void addPromptSubgroup(PromptGroupInterface promptSubgroup, int index)
promptSubgroup
- The group to add.index
- The index to add the group at.void removePromptSubgroup(PromptGroupInterface promptSubgroup)
promptSubgroup
- The group to remove.int indexOfPromptDefinitionOrSubgroup(java.lang.Object promptDefintionOrSubGroup)
promptDefintionOrSubGroup
- needs to be either a prompt definition or prompt group
PromptGroupInterface findPromptSubgroup(PromptDefinitionInterface promptDefinition)
promptDefinition
-
java.lang.String getPromptGroupLabel(java.util.Locale locale)
locale
- The Locale to get the label for.
java.lang.String getPromptGroupDescription(java.util.Locale locale)
locale
- The Locale to get the description for.
void setPromptGroupLabel(java.lang.String label, java.util.Locale locale)
label
- The label for the group.locale
- The Locale to set the label for.void setPromptGroupDescription(java.lang.String description, java.util.Locale locale)
label
- The description for the group.locale
- The Locale to set the description for.com.sas.util.LocalizableString getPromptGroupLabels()
com.sas.util.LocalizableString getPromptGroupDescriptions()
void setPromptGroupLabels(com.sas.util.LocalizableString labels)
labels
- LocalizableStringvoid setPromptGroupDescriptions(com.sas.util.LocalizableString descriptions)
descriptions
- LocalizableStringboolean isPromptGroupHidden()
void setPromptGroupHidden(boolean hidden)
hidden
- whether the prompt group should be hidden from the user at runtime.boolean containsSubgroup(PromptGroupInterface subGroupCandidate, boolean recursive)
subGroupCandidate
- PromptGroupInterface to be identified as
a subgroup of this group or not.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |