- java.lang.Object
-
- com.oracle.tools.packager.BundlerParamInfo<T>
-
- com.oracle.tools.packager.EnumeratedBundlerParam<T>
-
public class EnumeratedBundlerParam<T> extends BundlerParamInfo<T>
The class contains key-value pairs (elements) where keys are "displayable" keys which the IDE can display/choose and values are "identifier" values which can be stored in parameters' map. For instance the Mac has a predefined set of categories which can be applied to LSApplicationCategoryType which is required for the mac app store. The following example illustrates a simple usage of the MAC_CATEGORY parameter Setkeys = MAC_CATEGORY.getDisplayableKeys(); String key = getLastValue(keys); // get last value for example String value = MAC_CATEGORY.getValueForDisplayableKey(key); params.put(MAC_CATEGORY.getID(), value);
-
-
Constructor Summary
Constructors Constructor Description EnumeratedBundlerParam(String name, String description, String id, Class<T> valueType, Function<Map<String,? super Object>,T> defaultValueFunction, BiFunction<String,Map<String,? super Object>,T> stringConverter, Map<String,T> elements, boolean strict)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getDisplayableKeys()
T
getValueForDisplayableKey(String displayableKey)
boolean
isInPossibleValues(T value)
boolean
isLoose()
boolean
isStrict()
T
validatedFetchFrom(Map<String,? super Object> params)
-
Methods inherited from class com.oracle.tools.packager.BundlerParamInfo
fetchFrom, fetchFrom, getDefaultValueFunction, getDescription, getID, getName, getStringConverter, getValueType, setDefaultValueFunction, setDescription, setId, setName, setStringConverter, setValueType
-
-
-
-
Method Detail
-
isInPossibleValues
public boolean isInPossibleValues(T value)
-
isStrict
public boolean isStrict()
-
isLoose
public boolean isLoose()
-
validatedFetchFrom
public T validatedFetchFrom(Map<String,? super Object> params) throws InvalidBundlerParamException
- Throws:
InvalidBundlerParamException
-
-