| java.lang.Object com.flexive.war.beans.admin.structure.OptionWrapper
OptionWrapper | public class OptionWrapper (Code) | | Conveniently wraps FxStructureOptions to simplify GUI Manipulaiton.
The OptionWrapper wraps the options of a structure element (group or property) and
its assignment. Options of the structure element override those of the assignment.
Provides Maps to verify if an option is valid or may be overwritten to enhance GUI
presentaiton.
author: Gerhard Glos (gerhard.glos@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) |
Inner Class :public class WrappedOption | |
Method Summary | |
public void | addOption(List<WrappedOption> options, String key, String value, boolean overridable) Add create a new option to the specified options list. | public List<FxStructureOption> | asFxStructureOptionList(List<WrappedOption> options) | public void | deleteOption(List<WrappedOption> options, WrappedOption o) | public List<WrappedOption> | getAssignmentOptions() | public Map<String, Boolean> | getIsAssignmentOptionOverridableMap() A Map to indicate if an assignment option for a given key may be overrwritten. | public Map<String, Boolean> | getIsAssignmentOptionValidMap() A Map to indicate if an assignment option for a given key is valid. | public Map<String, Boolean> | getIsStructureOptionValidMap() A Map to indicate if a structure option for a given key is valid. | public WrappedOption | getOption(boolean isStructureOption, String key) Gets an option with Key key. | public WrappedOption | getOptionNoCreate(boolean isStructureOption, String key) Gets an option with Key key. | public List<WrappedOption> | getStructureOptions() | public boolean | hasOption(List<WrappedOption> options, String key) | public void | setOption(boolean isStructureOption, String key, String value) Sets an option with Key key to Value value. | public void | setOption(boolean isStructureOption, String key, boolean value) Sets an option with Key key to Value value. |
OptionWrapper | public OptionWrapper(List<FxStructureOption> structureOptions, List<FxStructureOption> assignmentOptions, boolean addStandardOptions)(Code) | | Creates the OptionWrapper
Parameters: structureOptions - optionlist of the structure element (e.g. group or property) Parameters: assignmentOptions - optionlist of the according assignment (e.g. groupassignment or propertyassignment) Parameters: addStandardOptions - if the standard options (FxStructureOption.OPTION_...) should be added to thestructureOptions, if not alaready present |
OptionWrapper | public OptionWrapper(List<FxStructureOption> structureOptions, List<FxStructureOption> assignmentOptions, List<String> standardOptionKeyList)(Code) | | Creates the OptionWrapper
Parameters: structureOptions - optionlist of the structure element (e.g. group or property) Parameters: assignmentOptions - optionlist of the according assignment (e.g. groupassignment or propertyassignment) Parameters: standardOptionKeyList - a List of option keys from which new options will be created and added,if not alaready present |
addOption | public void addOption(List<WrappedOption> options, String key, String value, boolean overridable) throws FxInvalidParameterException(Code) | | Add create a new option to the specified options list.
Parameters: options - the option list to add the new option to Parameters: key - the option key Parameters: value - the option value Parameters: overridable - the option overridable flag throws: FxInvalidParameterException - on errors (empty key or empty value) |
deleteOption | public void deleteOption(List<WrappedOption> options, WrappedOption o)(Code) | | |
getAssignmentOptions | public List<WrappedOption> getAssignmentOptions()(Code) | | |
getIsAssignmentOptionOverridableMap | public Map<String, Boolean> getIsAssignmentOptionOverridableMap()(Code) | | A Map to indicate if an assignment option for a given key may be overrwritten.
a Map for JSF pages which indicates if an assignment option for a given key may be overwritten. |
getIsAssignmentOptionValidMap | public Map<String, Boolean> getIsAssignmentOptionValidMap()(Code) | | A Map to indicate if an assignment option for a given key is valid.
a Map for JSF pages which indicates if an assignment option for a given key is valid. |
getIsStructureOptionValidMap | public Map<String, Boolean> getIsStructureOptionValidMap()(Code) | | A Map to indicate if a structure option for a given key is valid.
a Map for JSF pages which indicates if a structure option for a given key is valid. |
getOption | public WrappedOption getOption(boolean isStructureOption, String key)(Code) | | Gets an option with Key key. If isStructure==true, the option will be from the
structureOptions list, else from the assignmentOptions list.
If the option is not present a new option will be created and set with default values.
Parameters: isStructureOption - if the option should be set/created in the structureOptions or assignmentOptions list Parameters: key - the Key the option with the matching key. |
getOptionNoCreate | public WrappedOption getOptionNoCreate(boolean isStructureOption, String key)(Code) | | Gets an option with Key key. If isStructure==true, the option will be from the
structureOptions list, else from the assignmentOptions list.
If the option is not present, null will be returned.
Parameters: isStructureOption - if the option should be set/created in the structureOptions or assignmentOptions list Parameters: key - the Key the option with the matching key or null if the option is not present. |
getStructureOptions | public List<WrappedOption> getStructureOptions()(Code) | | |
hasOption | public boolean hasOption(List<WrappedOption> options, String key)(Code) | | |
setOption | public void setOption(boolean isStructureOption, String key, String value)(Code) | | Sets an option with Key key to Value value. If isStructure==true, the option will be set
in the structureOptions list, else in the assignmentOptions list.
If the option is not present a new option will be created and set accordingly.
Parameters: isStructureOption - if the option should be set/created in the structureOptions or assignmentOptions list Parameters: key - the Key Parameters: value - the Value as String |
setOption | public void setOption(boolean isStructureOption, String key, boolean value)(Code) | | Sets an option with Key key to Value value. If isStructure==true, the option will be set
in the structureOptions list, else in the assignmentOptions list.
If the option is not present a new option will be created and set accordingly
Parameters: isStructureOption - if the option should be set/created in the structureOptions or assignmentOptions list Parameters: key - the Key Parameters: value - the Value as boolean |
|
|