|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.structure.FxStructureOption
public class FxStructureOption
Option for structure elements (groups, properties, assignments)
| Field Summary | |
|---|---|
static java.lang.String |
OPTION_HTML_EDITOR
|
static java.lang.String |
OPTION_MAXLENGTH
|
static java.lang.String |
OPTION_MULTILANG
|
static java.lang.String |
OPTION_MULTILINE
|
static java.lang.String |
OPTION_SEARCHABLE
|
static java.lang.String |
OPTION_SHOW_OVERVIEW
|
protected boolean |
overrideable
|
static java.lang.String |
VALUE_FALSE
|
static java.lang.String |
VALUE_TRUE
|
| Constructor Summary | |
|---|---|
FxStructureOption(FxStructureOption o)
Copy Constructor |
|
FxStructureOption(java.lang.String key,
boolean overrideable,
boolean set,
java.lang.String value)
Ctor |
|
| Method Summary | |
|---|---|
static void |
clearOption(java.util.List<FxStructureOption> options,
java.lang.String key)
Clear the option with the given key - removing it from the list if it exists |
static java.util.List<FxStructureOption> |
cloneOptions(java.util.List<FxStructureOption> options)
Get a copy of the a list of options |
boolean |
equals(java.lang.Object o)
Checks for equality |
static java.util.List<FxStructureOption> |
getEmptyOptionList(int capacity)
Get a list of empty options |
int |
getIntValue()
Get the value as integer |
java.lang.String |
getKey()
Get the option key |
static FxStructureOption |
getOption(java.lang.String key,
java.util.List<FxStructureOption> options)
Get an option entry for the given key, if the key is invalid or not found a FxStructureOption object
will be returned with set set to false, overrideable set to false and value
set to an empty String. |
static java.util.List<FxStructureOption> |
getUnmodifieableOptions(java.util.List<FxStructureOption> options)
Convert a list of options to an unmodifieable list |
java.lang.String |
getValue()
Get the value assigned to the option |
int |
hashCode()
|
static boolean |
hasOption(java.lang.String key,
java.util.List<FxStructureOption> options)
Check if an option is set for the requested key |
boolean |
isOverrideable()
Is the option overrideable (in assignments)? |
boolean |
isSet()
Is the option set, will return false if an unknown option is requested |
boolean |
isValueTrue()
Convenience method to check if value is set to true |
static void |
setOption(java.util.List<FxStructureOption> options,
java.lang.String key,
boolean overrideable,
boolean value)
Set or add a boolean value in a list of options |
static void |
setOption(java.util.List<FxStructureOption> options,
java.lang.String key,
boolean overrideable,
java.lang.String value)
Set or add a String value in a list of options |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String OPTION_MULTILANG
public static final java.lang.String OPTION_SHOW_OVERVIEW
public static final java.lang.String OPTION_HTML_EDITOR
public static final java.lang.String OPTION_SEARCHABLE
public static final java.lang.String OPTION_MAXLENGTH
public static final java.lang.String OPTION_MULTILINE
public static final java.lang.String VALUE_TRUE
public static final java.lang.String VALUE_FALSE
protected boolean overrideable
| Constructor Detail |
|---|
public FxStructureOption(java.lang.String key,
boolean overrideable,
boolean set,
java.lang.String value)
key - key identifying the optionoverrideable - is the option overridable in assignmentsset - is the option set? (non-existing options are returned as not-set options!)value - the options valuepublic FxStructureOption(FxStructureOption o)
o - an FxStructureOption| Method Detail |
|---|
public java.lang.String getKey()
public boolean isOverrideable()
public boolean isSet()
false if an unknown option is requested
false if an unknown option is requestedpublic java.lang.String getValue()
public int getIntValue()
public boolean isValueTrue()
public static boolean hasOption(java.lang.String key,
java.util.List<FxStructureOption> options)
key - option keyoptions - the available options
public static FxStructureOption getOption(java.lang.String key,
java.util.List<FxStructureOption> options)
FxStructureOption object
will be returned with set set to false, overrideable set to false and value
set to an empty String.
key - option keyoptions - the available options
public static java.util.List<FxStructureOption> getEmptyOptionList(int capacity)
capacity - desired capacity
public static void setOption(java.util.List<FxStructureOption> options,
java.lang.String key,
boolean overrideable,
java.lang.String value)
options - list of existing optionskey - option keyoverrideable - should the option be overrideable?value - String value to set for the option
public static void setOption(java.util.List<FxStructureOption> options,
java.lang.String key,
boolean overrideable,
boolean value)
options - list of existing optionskey - option keyoverrideable - should the option be overrideable?value - boolean value to set for the option (will be converted internally to a String)
public static void clearOption(java.util.List<FxStructureOption> options,
java.lang.String key)
options - list options to clear the option forkey - key of the option to removepublic static java.util.List<FxStructureOption> cloneOptions(java.util.List<FxStructureOption> options)
options - list to clone
public static java.util.List<FxStructureOption> getUnmodifieableOptions(java.util.List<FxStructureOption> options)
options - list to convert
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||