com.sas.prompts.groups
Class PromptGroup

com.sas.prompts.groups.PromptGroup
All Implemented Interfaces:
com.sas.models.VersionInterface, PromptGroupInterface, com.sas.prompts.groups.PromptGroupV2Interface, com.sas.prompts.IdentifiablePromptInterface, com.sas.prompts.MutableIdentifiablePromptInterface, com.sas.storage.editableproperties.LocalizableProperties, com.sas.storage.editableproperties.MultiLocaleProperties, com.sas.storage.editableproperties.SubstitutionProperties, com.sas.uiconfig.ContextEnabledObject, com.sas.util.AttributeConfigurationInterface, com.sas.util.log.ComponentLogFactoryInterface, com.sas.util.ResourceReferencesInterface, com.sas.util.xmlpersist.PersistenceInterface, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
TransparentGroup

public class PromptGroup
implements com.sas.prompts.groups.PromptGroupV2Interface, com.sas.storage.editableproperties.MultiLocaleProperties, com.sas.util.AttributeConfigurationInterface, com.sas.prompts.MutableIdentifiablePromptInterface, com.sas.uiconfig.ContextEnabledObject, com.sas.storage.editableproperties.SubstitutionProperties

A class to group PromptDefinitions. Groups can be hierarchical and contains other PromptGroups and PromptDefinitions.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sas.prompts.groups.PromptGroupInterface
PROMPT_GROUP_VALIDATION_ERROR_DISALLOWED_PROMPT_DEFINITION, PROMPT_GROUP_VALIDATION_ERROR_DUPLICATE_MODAL_CHOICE_VALUE, PROMPT_GROUP_VALIDATION_ERROR_NOT_VALID_SUBGROUP, PROMPT_GROUP_VALIDATION_NO_ERRORS
 
Constructor Summary
PromptGroup()
          Constructor
PromptGroup(java.util.List promptDefinitionsAndSubgroups)
          Constructor that takes a group name and a list of definitions and subgroups.
 
Method Summary
 void addPromptDefinition(PromptDefinitionInterface promptDefinition)
          Adds a group to the group at the end of the list
 void addPromptDefinition(PromptDefinitionInterface promptDefinition, int index)
          Adds a group to the group at the specified index.
 void addPromptDefinitionCombination(PromptDefinitionInterface promptDefinitionToCombine1, PromptDefinitionInterface promptDefinitionToCombine2)
          Adds a combination rule for the specified prompt definitions.
 void addPromptDefinitions(java.util.List<PromptDefinitionInterface> promptDefinitions)
          Add a List of prompts at the end of the list
 void addPromptSubgroup(PromptGroupInterface promptSubgroup)
          Adds a subgroup to the group at the end of the list
 void addPromptSubgroup(PromptGroupInterface promptSubgroup, int index)
          Adds the specified group as a subgroup at the specified index in the list of definitions and groups.
 void configureAttributes(java.util.Map<java.lang.String,?> options, java.util.Map<java.lang.String,?> context)
           
 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)
          Returns the group which contains the passed in prompt.
 com.sas.uiconfig.ApplicationContext getApplicationContext()
           
 java.util.List getAttributeDescriptors(java.util.Locale myLocale)
          Return a List of attribute descriptors containing information about the attributes of this type of prompt group.
 java.util.List<com.sas.prompts.AttributeDependencyInterface> getDependentPromptsForAttributes()
          Returns a List of objects which implement AttributeDependencyInterface.
 com.sas.storage.editableproperties.PropertyList getLocalizableProperties()
          Internal method
protected  com.sas.util.UsageVersion getMaxVersion()
           
 PromptDefinitionInterface getPromptDefinition(java.lang.String promptName, boolean recursive)
          Trys to find the specified prompt definition in the group or one of it's subgroups.
 java.util.List<PromptDefinitionInterface> getPromptDefinitionCombinations(PromptDefinitionInterface promptDefinition)
          Returns a list of PromptDefinitionInterfaces which are combined with the specified PromptDefinitionInterface or an empty list.
 java.util.List<PromptDefinitionInterface> getPromptDefinitions(boolean recursive)
          Returns a List of all prompt definitions in this group and all subgroups.
 java.util.List getPromptDefinitionsAndSubgroups()
          Returns a List of all prompt definitions and subgroups in this group.
 java.util.List getPromptDefinitionsAndSubgroups(java.util.List definitions, boolean recursive, boolean includeDefinitions, boolean includeSubgroups)
          Helper method to return prompts and/or groups contained in this 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 all the 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 all the labels for the group.
 com.sas.prompts.groups.PromptGroupLayoutInterface getPromptGroupLayout()
           
 java.lang.String getPromptID()
          Returns a unique identifier for the prompt group.
 java.util.List<PromptGroupInterface> getPromptSubgroups(boolean recursive)
          Returns a List of all prompt definition subgroups.
 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.storage.editableproperties.PropertyList getSubstitutionProperties()
          Returns a non-null PropertyList.
 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.
 java.lang.String getVersion()
           
protected  java.util.List getWritableLayoutInfo(boolean writeRefsNotDefinitions)
           
 boolean hasPromptDefinition(PromptDefinitionInterface promptDefinition)
          Returns whether or not the specified PromptDefinition is contained in the PromptGroup or any of it's subgroups.
 int indexOfPromptDefinitionOrSubgroup(java.lang.Object promptDefintionOrSubGroup)
          Returns the index of the PromptDefintionInterface or PromptGroupInterface that is passed in.
 boolean isClearPromptValuesWhenHidden()
          Returns whether
 boolean isIgnorePromptValuesWhenHidden()
          Returns whether the prompts contained in this group and any subgroups will be ignored when generating macro variables if the group is hidden.
 boolean isPromptGroupDisabled()
          Returns whether the prompt group should be disabled in the runtime UI.
 boolean isPromptGroupHidden()
          Returns whether the prompt group should be hidden in the runtime UI.
 boolean isTransparent()
          Returns whether the prompts in the group should be treated as if they are in the parent group when they are presented in a user interface.
 void removeAll()
          Removes all prompts and groups from the group.
 void removeAllPromptDefinitions(boolean recursive)
          Removes all prompts from the group and optionally all subgroups.
 void removeAllPromptSubgroups()
          Removes all groups from the group.
 void removePromptDefinition(PromptDefinitionInterface promptDefinition)
          Removes the specified prompt from the group
 void removePromptDefinitionCombination(PromptDefinitionInterface promptDefinitionToCombine1, PromptDefinitionInterface promptDefinitionToCombine2)
          Removes the combination between the specified PromptDefinitionInterfaces.
 void removePromptSubgroup(PromptGroupInterface promptSubgroup)
          Removes the specified prompt group
 void removeScript(com.sas.prompts.script.PromptAction promptAction)
          Removes the ScriptHolder whose action matches this PromptAction.
 boolean replacePromptDefintion(PromptDefinitionInterface promptDefinition, PromptDefinitionInterface newPromptDefinition, boolean recursive)
          Replaces a prompt in the group with a different prompt.
 boolean replacePromptSubgroup(PromptGroupInterface promptSubgroup, PromptGroupInterface newPromptSubgroup, boolean recursive)
          Replaces a subgroup in the group with a different subgroup.
 void setApplicationContext(com.sas.uiconfig.ApplicationContext applicationContext)
           
 void setClearPromptValuesWhenHidden(boolean clearPromptValuesWhenHidden)
          Sets whether the values of all prompts contained in this group or any subgroup will be cleared when the group is hidden.
 void setDependentPromptsForAttributes(java.util.List<com.sas.prompts.AttributeDependencyInterface> dependencies)
          Sets a List of objects which implement AttributeDependencyInterface.
 void setIgnorePromptValuesWhenHidden(boolean ignorePromptValuesWhenHidden)
          Sets whether the prompts contained in this group and any subgroups will be ignored when generating macro variables if the group is hidden.
 void setLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map)
          Internal method
 void setPromptGroupDescription(java.lang.String newDesc, java.util.Locale locale)
          Sets the description for the group in the given locale
 void setPromptGroupDescriptions(com.sas.util.LocalizableString descriptions)
          Sets a LocalizableString containing the localized descriptions for the group.
 void setPromptGroupDisabled(boolean disabled)
          Sets whether the prompt group should be disabled in the runtime UI.
 void setPromptGroupHidden(boolean hidden)
          Sets whether the prompt group should be hidden in the runtime UI.
 void setPromptGroupLabel(java.lang.String newLabel, java.util.Locale locale)
          Sets the label for the group in the given locale
 void setPromptGroupLabels(com.sas.util.LocalizableString labels)
          Sets a LocalizableString containing the localized labels for the group.
 void setPromptGroupLayout(com.sas.prompts.groups.PromptGroupLayoutInterface layout)
           
 void setPromptID(java.lang.String promptID)
          Sets an identifier for the prompt group.
 void setScript(com.sas.prompts.script.ScriptHolder scriptHolder)
          Sets the ScriptHolder into the collection.
 void setSubstitutionProperties(com.sas.storage.editableproperties.PropertyMap map)
          Sets substitution properties into the implementing object.
 void setTransparent(boolean transparent)
          Sets whether the prompts in the group should be treated as if they are in the parent group when they are presented in a user interface.
 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.
 java.lang.String toString()
          Returns a String containing the name of the group.
protected  void writeLayout(org.w3c.dom.Element element, com.sas.util.xmlpersist.PromptsWritingContext writingContext)
           
 

Constructor Detail

PromptGroup

public PromptGroup()
Constructor


PromptGroup

public PromptGroup(java.util.List promptDefinitionsAndSubgroups)
Constructor that takes a group name and a list of definitions and subgroups.

Parameters:
promptDefinitionsAndSubgroups - List
Method Detail

getPromptDefinition

public PromptDefinitionInterface getPromptDefinition(java.lang.String promptName,
                                                     boolean recursive)
Trys to find the specified prompt definition in the group or one of it's subgroups. A depth-first search is performed. null will be returned if the prompt definition cannot be found.

Specified by:
getPromptDefinition in interface PromptGroupInterface
Parameters:
promptName - the name of the prompt to find
recursive - Whether to search subgroups for a prompt with the specified name
Returns:
PromptDefinitionInterface the prompt definition if found, otherwise null will be returned
See Also:
com.sas.prompts.groups.PromptGroupInterface#getPromptDefinition(String)

getPromptDefinitionsAndSubgroups

public java.util.List getPromptDefinitionsAndSubgroups(java.util.List definitions,
                                                       boolean recursive,
                                                       boolean includeDefinitions,
                                                       boolean includeSubgroups)
Helper method to return prompts and/or groups contained in this group.

Specified by:
getPromptDefinitionsAndSubgroups in interface PromptGroupInterface
Parameters:
definitions - A List to return the prompts and/or groups in. If null, a new list will be created and returned.
recursive - Whether to recurse into subgroups and return their promptsand/or subgroups.
includeDefinitions - Whether to include prompts in the returned list.
includeSubgroups - Whether to include groups in the returned list.
Returns:
Either the list passed in or a new, ordered list.
See Also:
PromptGroupInterface.getPromptDefinitionsAndSubgroups(List, boolean, boolean, boolean)

hasPromptDefinition

public boolean hasPromptDefinition(PromptDefinitionInterface promptDefinition)
Returns whether or not the specified PromptDefinition is contained in the PromptGroup or any of it's subgroups.

Specified by:
hasPromptDefinition in interface PromptGroupInterface
Parameters:
promptDefinition - The prompt to search for
Returns:
whether or not the specified PromptDefinition is contained in the PromptGroup or any of it's subgroups.
See Also:
PromptGroupInterface.hasPromptDefinition(PromptDefinitionInterface)

getPromptDefinitionsAndSubgroups

public java.util.List getPromptDefinitionsAndSubgroups()
Returns a List of all prompt definitions and subgroups in this group.

Specified by:
getPromptDefinitionsAndSubgroups in interface PromptGroupInterface
Returns:
a List of all prompt definitions and subgroups in this group
See Also:
PromptGroupInterface.getPromptDefinitionsAndSubgroups()

findPromptSubgroup

public PromptGroupInterface findPromptSubgroup(PromptDefinitionInterface promptDefinition)
Returns the group which contains the passed in prompt. It first searches the group it is called on, and then it searches the subgroups of that group in a depth first recursive manner. This method may return null if the PromptDefinition is not contained in the PromptGroup or an of it's subgroups.

Specified by:
findPromptSubgroup in interface PromptGroupInterface
Returns:
the group which contains the passed in prompt

getPromptDefinitions

public java.util.List<PromptDefinitionInterface> getPromptDefinitions(boolean recursive)
Returns a List of all prompt definitions in this group and all subgroups.

Specified by:
getPromptDefinitions in interface PromptGroupInterface
Parameters:
recursive - Whether to include prompts from subgroups
Returns:
a List of all prompt definitions in this group and all subgroups
See Also:
PromptGroupInterface.getPromptDefinitions(boolean)

getPromptSubgroups

public java.util.List<PromptGroupInterface> getPromptSubgroups(boolean recursive)
Returns a List of all prompt definition subgroups.

Specified by:
getPromptSubgroups in interface PromptGroupInterface
Parameters:
recursive - whether to recurse into subgroups
Returns:
a List of all prompt definition subgroups
See Also:
PromptGroupInterface.getPromptSubgroups(boolean)

addPromptDefinition

public void addPromptDefinition(PromptDefinitionInterface promptDefinition)
Adds a group to the group at the end of the list

Specified by:
addPromptDefinition in interface PromptGroupInterface
Parameters:
promptDefinition - The prompt to add
See Also:
PromptGroupInterface.addPromptDefinition(PromptDefinitionInterface)

addPromptDefinition

public void addPromptDefinition(PromptDefinitionInterface promptDefinition,
                                int index)
Adds a group to the group at the specified index.

Specified by:
addPromptDefinition in interface PromptGroupInterface
Parameters:
promptDefinition - The prompt to add
index - The index to insert the prompt at
See Also:
PromptGroupInterface.addPromptDefinition(PromptDefinitionInterface, int)

addPromptDefinitions

public void addPromptDefinitions(java.util.List<PromptDefinitionInterface> promptDefinitions)
Add a List of prompts at the end of the list

Specified by:
addPromptDefinitions in interface PromptGroupInterface
Parameters:
promptDefinitions - The List of prompts to add
See Also:
PromptGroupInterface.addPromptDefinitions(List)

removePromptDefinition

public void removePromptDefinition(PromptDefinitionInterface promptDefinition)
Removes the specified prompt from the group

Specified by:
removePromptDefinition in interface PromptGroupInterface
Parameters:
promptDefinition - The prompt to remove
See Also:
PromptGroupInterface.removePromptDefinition(PromptDefinitionInterface)

addPromptSubgroup

public void addPromptSubgroup(PromptGroupInterface promptSubgroup)
Adds a subgroup to the group at the end of the list

Specified by:
addPromptSubgroup in interface PromptGroupInterface
Parameters:
promptSubgroup - The group to add
See Also:
PromptGroupInterface.addPromptSubgroup(PromptGroupInterface)

addPromptSubgroup

public void addPromptSubgroup(PromptGroupInterface promptSubgroup,
                              int index)
Adds the specified group as a subgroup at the specified index in the list of definitions and groups.

Specified by:
addPromptSubgroup in interface PromptGroupInterface
Parameters:
promptSubgroup - The group to add
index - Index to add the group at, or -1 to add at the end.
See Also:
PromptGroupInterface.addPromptSubgroup(PromptGroupInterface, int)

removePromptSubgroup

public void removePromptSubgroup(PromptGroupInterface promptSubgroup)
Removes the specified prompt group

Specified by:
removePromptSubgroup in interface PromptGroupInterface
Parameters:
promptSubgroup - The group to remove
See Also:
PromptGroupInterface.removePromptSubgroup(PromptGroupInterface)

indexOfPromptDefinitionOrSubgroup

public int indexOfPromptDefinitionOrSubgroup(java.lang.Object promptDefintionOrSubGroup)
Returns the index of the PromptDefintionInterface or PromptGroupInterface that is passed in. This index is the index in the list that holds the prompt definitions and prompt subgroups. -1 will be returned if the object cannot be found.

Specified by:
indexOfPromptDefinitionOrSubgroup in interface PromptGroupInterface
Parameters:
promptDefintionOrSubGroup - needs to be either a prompt definition or prompt group
Returns:
int the index in the list

getPromptGroupLabel

public java.lang.String getPromptGroupLabel(java.util.Locale locale)
Returns the label for the group in the specified Locale. See the documentation for LocalizableString for more information about how Locales are handled when the a label in the specified Locale is not found.

Specified by:
getPromptGroupLabel in interface PromptGroupInterface
Parameters:
locale - The Locale to get the label for.
Returns:
The label for the group.
See Also:
PromptGroupInterface.getPromptGroupLabel(Locale)

setPromptGroupLabel

public void setPromptGroupLabel(java.lang.String newLabel,
                                java.util.Locale locale)
Sets the label for the group in the given locale

Specified by:
setPromptGroupLabel in interface PromptGroupInterface
Parameters:
newLabel - The label to set
locale - The locale to set the label for
See Also:
PromptGroupInterface.setPromptGroupLabel(String, Locale)

getPromptGroupDescription

public java.lang.String getPromptGroupDescription(java.util.Locale locale)
Returns the description for the group in the specified Locale. See the documentation for LocalizableString for more information about how Locales are handled when the a description in the specified Locale is not found.

Specified by:
getPromptGroupDescription in interface PromptGroupInterface
Parameters:
locale - The Locale to get the description for.
Returns:
The description for the group.
See Also:
PromptGroupInterface.getPromptGroupDescription(Locale)

setPromptGroupDescription

public void setPromptGroupDescription(java.lang.String newDesc,
                                      java.util.Locale locale)
Sets the description for the group in the given locale

Specified by:
setPromptGroupDescription in interface PromptGroupInterface
Parameters:
newLabel - The description to set
locale - The locale to set the description for
See Also:
PromptGroupInterface.setPromptGroupDescription(String, Locale)

getPromptGroupLabels

public com.sas.util.LocalizableString getPromptGroupLabels()
Returns a LocalizableString containing all the labels for the group.

Specified by:
getPromptGroupLabels in interface PromptGroupInterface
Returns:
a LocalizableString containing all the labels for the group
See Also:
PromptGroupInterface.getPromptGroupLabels()

getPromptGroupDescriptions

public com.sas.util.LocalizableString getPromptGroupDescriptions()
Returns a LocalizableString containing all the descriptions for the group.

Specified by:
getPromptGroupDescriptions in interface PromptGroupInterface
Returns:
a LocalizableString containing all the descriptions for the group
See Also:
PromptGroupInterface.getPromptGroupDescriptions()

setPromptGroupLabels

public void setPromptGroupLabels(com.sas.util.LocalizableString labels)
Sets a LocalizableString containing the localized labels for the group. The LocalizableString passed in is cloned by the prompt group.

Specified by:
setPromptGroupLabels in interface PromptGroupInterface
Parameters:
labels - a LocalizableString containing the localized labels for the group.
See Also:
PromptGroupInterface.setPromptGroupLabels(LocalizableString)

setPromptGroupDescriptions

public void setPromptGroupDescriptions(com.sas.util.LocalizableString descriptions)
Sets a LocalizableString containing the localized descriptions for the group. The LocalizableString passed in is cloned by the prompt group.

Specified by:
setPromptGroupDescriptions in interface PromptGroupInterface
Parameters:
descriptions - a LocalizableString containing the localized descriptions for the group.
See Also:
PromptGroupInterface.setPromptGroupDescriptions(LocalizableString)

isPromptGroupHidden

public boolean isPromptGroupHidden()
Returns whether the prompt group should be hidden in the runtime UI.

Specified by:
isPromptGroupHidden in interface PromptGroupInterface
Returns:
whether the prompt group should be hidden in the runtime UI.
See Also:
PromptGroupInterface.isPromptGroupHidden()

setPromptGroupHidden

public void setPromptGroupHidden(boolean hidden)
Sets whether the prompt group should be hidden in the runtime UI.

Specified by:
setPromptGroupHidden in interface PromptGroupInterface
Parameters:
hidden - whether the prompt group should be hidden in the runtime UI.

isPromptGroupDisabled

public boolean isPromptGroupDisabled()
Returns whether the prompt group should be disabled in the runtime UI.

Specified by:
isPromptGroupDisabled in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:
whether the prompt group should be disabled in the runtime UI.
See Also:
PromptGroupV2Interface.isPromptGroupDisabled()

setPromptGroupDisabled

public void setPromptGroupDisabled(boolean disabled)
Sets whether the prompt group should be disabled in the runtime UI.

Specified by:
setPromptGroupDisabled in interface com.sas.prompts.groups.PromptGroupV2Interface
Parameters:
hidden - whether the prompt group should be disabled in the runtime UI.

toString

public java.lang.String toString()
Returns a String containing the name of the group.

Overrides:
toString in class java.lang.Object
Returns:
String

removeAll

public void removeAll()
Removes all prompts and groups from the group.

Specified by:
removeAll in interface PromptGroupInterface

removeAllPromptDefinitions

public void removeAllPromptDefinitions(boolean recursive)
Removes all prompts from the group and optionally all subgroups.

Specified by:
removeAllPromptDefinitions in interface PromptGroupInterface
Parameters:
recursive - Whether to remove prompts from subgroups

removeAllPromptSubgroups

public void removeAllPromptSubgroups()
Removes all groups from the group.

Specified by:
removeAllPromptSubgroups in interface PromptGroupInterface

replacePromptDefintion

public boolean replacePromptDefintion(PromptDefinitionInterface promptDefinition,
                                      PromptDefinitionInterface newPromptDefinition,
                                      boolean recursive)
Replaces a prompt in the group with a different prompt. The replace may only occur in the top level group or recursively. The new prompt will be at the same index in the group as the prompt being replaced.

Specified by:
replacePromptDefintion in interface PromptGroupInterface
Parameters:
promptDefinition - The prompt to replace
newPromptDefinition - The new prompt to place in the group.
recursive - Whether to search subgroups during the replace
Returns:
Whether the prompt to replace prompt was found

replacePromptSubgroup

public boolean replacePromptSubgroup(PromptGroupInterface promptSubgroup,
                                     PromptGroupInterface newPromptSubgroup,
                                     boolean recursive)
Replaces a subgroup in the group with a different subgroup. The replace may only occur in the top level group or recursively. The new subgroup will be at the same index in the group as the subgroup being replaced.

Specified by:
replacePromptSubgroup in interface PromptGroupInterface
Parameters:
promptSubgroup - The subgroup to replace
newPromptSubgroup - The new subgroup to place in the group.
recursive - Whether to search subgroups during the replace
Returns:
Whether the prompt to replace prompt was found

isIgnorePromptValuesWhenHidden

public boolean isIgnorePromptValuesWhenHidden()
Returns whether the prompts contained in this group and any subgroups will be ignored when generating macro variables if the group is hidden.

Specified by:
isIgnorePromptValuesWhenHidden in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:

setIgnorePromptValuesWhenHidden

public void setIgnorePromptValuesWhenHidden(boolean ignorePromptValuesWhenHidden)
Sets whether the prompts contained in this group and any subgroups will be ignored when generating macro variables if the group is hidden.

Specified by:
setIgnorePromptValuesWhenHidden in interface com.sas.prompts.groups.PromptGroupV2Interface
Parameters:
ignorePromptValuesWhenHidden -

isClearPromptValuesWhenHidden

public boolean isClearPromptValuesWhenHidden()
Returns whether

Specified by:
isClearPromptValuesWhenHidden in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:

setClearPromptValuesWhenHidden

public void setClearPromptValuesWhenHidden(boolean clearPromptValuesWhenHidden)
Description copied from interface: PromptGroupV2Interface
Sets whether the values of all prompts contained in this group or any subgroup will be cleared when the group is hidden. It is up to the calling application to make sure this happens by calling a utility routine such as PromptUtil.updatePromptAttributesForDependencies().

Specified by:
setClearPromptValuesWhenHidden in interface com.sas.prompts.groups.PromptGroupV2Interface

writeLayout

protected void writeLayout(org.w3c.dom.Element element,
                           com.sas.util.xmlpersist.PromptsWritingContext writingContext)
                    throws java.util.prefs.BackingStoreException
Throws:
java.util.prefs.BackingStoreException

getWritableLayoutInfo

protected java.util.List getWritableLayoutInfo(boolean writeRefsNotDefinitions)

containsSubgroup

public boolean containsSubgroup(PromptGroupInterface subGroupCandidate,
                                boolean recursive)
Returns true if the specified subGroupCandidate argument is identified as a subgroup of this group. The test for subgroup status will be limited to immediate child subgroups if the recursive argument is false. The test for subgroup status will span all descendant groups when the recursive argument is true.

Specified by:
containsSubgroup in interface PromptGroupInterface
Parameters:
subGroupCandidate - PromptGroupInterface to be identified as a subgroup of this group or not.
Returns:
true if the specified subGroupCandidate argument is identified as a subgroup of this group.

getLocalizableProperties

public com.sas.storage.editableproperties.PropertyList getLocalizableProperties()
Internal method

Specified by:
getLocalizableProperties in interface com.sas.storage.editableproperties.LocalizableProperties
Returns:
property list

setLocalizableProperties

public void setLocalizableProperties(com.sas.storage.editableproperties.PropertyMap map)
Internal method

Specified by:
setLocalizableProperties in interface com.sas.storage.editableproperties.LocalizableProperties
Parameters:
map - - map containing localized properties

setPromptGroupLayout

public void setPromptGroupLayout(com.sas.prompts.groups.PromptGroupLayoutInterface layout)
Specified by:
setPromptGroupLayout in interface com.sas.prompts.groups.PromptGroupV2Interface

getPromptGroupLayout

public com.sas.prompts.groups.PromptGroupLayoutInterface getPromptGroupLayout()
Specified by:
getPromptGroupLayout in interface com.sas.prompts.groups.PromptGroupV2Interface

addPromptDefinitionCombination

public void addPromptDefinitionCombination(@NotNull
                                           PromptDefinitionInterface promptDefinitionToCombine1,
                                           @NotNull
                                           PromptDefinitionInterface promptDefinitionToCombine2)
Description copied from interface: PromptGroupV2Interface
Adds a combination rule for the specified prompt definitions. When the value of one of the definitions is set, the value of the combined prompt definition will be set to the same value. It is up to the caller to make sure that the prompt definitions being combined can accept the same types of values.

Specified by:
addPromptDefinitionCombination in interface com.sas.prompts.groups.PromptGroupV2Interface

getPromptDefinitionCombinations

public java.util.List<PromptDefinitionInterface> getPromptDefinitionCombinations(PromptDefinitionInterface promptDefinition)
Description copied from interface: PromptGroupV2Interface
Returns a list of PromptDefinitionInterfaces which are combined with the specified PromptDefinitionInterface or an empty list.

Specified by:
getPromptDefinitionCombinations in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:
a List of PromptDefinitionInterfaces which are combined with the specified PromptDefinitionInterface.

removePromptDefinitionCombination

public void removePromptDefinitionCombination(@NotNull
                                              PromptDefinitionInterface promptDefinitionToCombine1,
                                              @NotNull
                                              PromptDefinitionInterface promptDefinitionToCombine2)
Description copied from interface: PromptGroupV2Interface
Removes the combination between the specified PromptDefinitionInterfaces. Sets to one definition will no longer cause the other definition's value to be changed.

Specified by:
removePromptDefinitionCombination in interface com.sas.prompts.groups.PromptGroupV2Interface

configureAttributes

public void configureAttributes(java.util.Map<java.lang.String,?> options,
                                java.util.Map<java.lang.String,?> context)
Specified by:
configureAttributes in interface com.sas.util.AttributeConfigurationInterface

getDependentPromptsForAttributes

public java.util.List<com.sas.prompts.AttributeDependencyInterface> getDependentPromptsForAttributes()
Returns a List of objects which implement AttributeDependencyInterface.

Specified by:
getDependentPromptsForAttributes in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:
a List of objects which implement AttributeDependencyInterface.

setDependentPromptsForAttributes

public void setDependentPromptsForAttributes(java.util.List<com.sas.prompts.AttributeDependencyInterface> dependencies)
Sets a List of objects which implement AttributeDependencyInterface.

Specified by:
setDependentPromptsForAttributes in interface com.sas.prompts.groups.PromptGroupV2Interface
Parameters:
dependencies - a List of objects which implement AttributeDependencyInterface. Null may be passed in to indicate no dependencies.

isTransparent

public boolean isTransparent()
Description copied from interface: PromptGroupV2Interface
Returns whether the prompts in the group should be treated as if they are in the parent group when they are presented in a user interface.

Specified by:
isTransparent in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:

setTransparent

public void setTransparent(boolean transparent)
Description copied from interface: PromptGroupV2Interface
Sets whether the prompts in the group should be treated as if they are in the parent group when they are presented in a user interface.

Specified by:
setTransparent in interface com.sas.prompts.groups.PromptGroupV2Interface

getUIConfiguration

public 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.

Specified by:
getUIConfiguration in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:
a UI configuration

setUIConfiguration

public 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.

Specified by:
setUIConfiguration in interface com.sas.prompts.groups.PromptGroupV2Interface
Parameters:
uiConfig - a UI configuration

getScript

public com.sas.prompts.script.ScriptHolder getScript(com.sas.prompts.script.PromptAction promptAction)
Description copied from interface: PromptGroupV2Interface
Returns the ScriptHolder instance, if any, whose action matches the PromptAction parameter (which may not be null).

Specified by:
getScript in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:
the requested script holder or null

setScript

public void setScript(com.sas.prompts.script.ScriptHolder scriptHolder)
Description copied from interface: PromptGroupV2Interface
Sets the ScriptHolder into the collection. Implementors may have rules about which ScriptHolder properties are acceptable.

Specified by:
setScript in interface com.sas.prompts.groups.PromptGroupV2Interface

removeScript

public void removeScript(com.sas.prompts.script.PromptAction promptAction)
Description copied from interface: PromptGroupV2Interface
Removes the ScriptHolder whose action matches this PromptAction.

Specified by:
removeScript in interface com.sas.prompts.groups.PromptGroupV2Interface

getScripts

public java.util.Collection<com.sas.prompts.script.ScriptHolder> getScripts()
Description copied from interface: PromptGroupV2Interface
Returns an unmodifiable collection of the scripts or an empty collection.

Specified by:
getScripts in interface com.sas.prompts.groups.PromptGroupV2Interface
Returns:
the scripts

getAttributeDescriptors

public java.util.List getAttributeDescriptors(java.util.Locale myLocale)
Return a List of attribute descriptors containing information about the attributes of this type of prompt group.

Specified by:
getAttributeDescriptors in interface com.sas.prompts.groups.PromptGroupV2Interface
Parameters:
locale -
Returns:

getPromptID

public java.lang.String getPromptID()
Returns a unique identifier for the prompt group.

Specified by:
getPromptID in interface com.sas.prompts.IdentifiablePromptInterface
Returns:
a unique identifier for the prompt group.

setPromptID

public void setPromptID(java.lang.String promptID)
Sets an identifier for the prompt group. This is an internal framework method and should not be called by users.

Specified by:
setPromptID in interface com.sas.prompts.MutableIdentifiablePromptInterface
See Also:
MutableIdentifiablePromptInterface.setPromptID(java.lang.String)

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface com.sas.models.VersionInterface
Overrides:
getVersion in class com.sas.util.xmlpersist.impl.BaseAbstractPersistence

getMaxVersion

protected final com.sas.util.UsageVersion getMaxVersion()
                                                 throws java.text.ParseException
Throws:
java.text.ParseException

getApplicationContext

public final com.sas.uiconfig.ApplicationContext getApplicationContext()
Specified by:
getApplicationContext in interface com.sas.uiconfig.ContextEnabledObject

setApplicationContext

public final void setApplicationContext(com.sas.uiconfig.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface com.sas.uiconfig.ContextEnabledObject

getSubstitutionProperties

public final com.sas.storage.editableproperties.PropertyList getSubstitutionProperties()
                                                                                throws com.sas.storage.editableproperties.UnexpectedSubstitutionException
Returns a non-null PropertyList. If any prompts held by this group

Specified by:
getSubstitutionProperties in interface com.sas.storage.editableproperties.SubstitutionProperties
Returns:
property list
Throws:
com.sas.storage.editableproperties.UnexpectedSubstitutionException - for unexpected error conditions.
See Also:
SubstitutionProperties.getSubstitutionProperties()

setSubstitutionProperties

public final void setSubstitutionProperties(@NotNull
                                            com.sas.storage.editableproperties.PropertyMap map)
                                     throws com.sas.storage.editableproperties.UnexpectedSubstitutionException
Description copied from interface: SubstitutionProperties
Sets substitution properties into the implementing object.

Specified by:
setSubstitutionProperties in interface com.sas.storage.editableproperties.SubstitutionProperties
Parameters:
map - - map containing localized properties
Throws:
com.sas.storage.editableproperties.UnexpectedSubstitutionException - for unexpected error conditions.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.