public final class Plugins extends AbstractModel<Options,Void>
Modifier and Type | Method and Description |
---|---|
<T extends NativeObjectContainer> |
getOptions(String pluginId,
NativeObjectContainerFactory<T> factory)
Returns the plugin options, if exist.
|
<T extends NativeObjectContainer> |
getOptionsAsList(String pluginId,
NativeObjectContainerFactory<T> factory)
Returns the plugin options as list of object containers, if exist.
|
ObjectType |
getOptionsType(String pluginId)
Returns the options type.
|
boolean |
hasEnabled(String pluginId)
Returns if a global plugin has been set or not.
|
boolean |
hasOptions(String pluginId)
Checks if there is any options for a specific plugin, by its id.
|
boolean |
isEnabled(String pluginId)
Returns if a global plugin is enabled or not.
|
void |
setEnabled(String pluginId,
boolean enabled)
Sets if a global plugin must be enabled or not.
|
<T extends NativeObjectContainer> |
setOptions(String pluginId,
List<T> options)
Sets the plugin options as array.
|
<T extends NativeObjectContainer> |
setOptions(String pluginId,
T options)
Sets the plugin options.
|
checkAndAddToParent, getChildKey, getDefaultValues, getParent, setCallbackToModel, setEventToModel
getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public void setEnabled(String pluginId, boolean enabled)
pluginId
- plugin id.enabled
- false
disable a global plugin.public boolean isEnabled(String pluginId)
pluginId
- plugin id.false
if a global plugin is not enabled otherwise true
.public boolean hasEnabled(String pluginId)
pluginId
- plugin id.false
if a global plugin has not been set otherwise true
.public <T extends NativeObjectContainer> void setOptions(String pluginId, T options)
T
- type of native object container to storepluginId
- plugin id.options
- java script object used to configure the plugin. Pass null
to remove the configuration if
exist.public <T extends NativeObjectContainer> void setOptions(String pluginId, List<T> options)
T
- type of native object container to storepluginId
- plugin id.options
- list of native object container used to configure the plugin. Pass null
to remove the
configuration if exist.public boolean hasOptions(String pluginId)
pluginId
- plugin id.true
if there is an options, otherwise false
.public ObjectType getOptionsType(String pluginId)
pluginId
- plugin id.public <T extends NativeObjectContainer> T getOptions(String pluginId, NativeObjectContainerFactory<T> factory)
T
- type of native object container to returnpluginId
- plugin id.factory
- factory instance to create a native object container.public <T extends NativeObjectContainer> List<T> getOptionsAsList(String pluginId, NativeObjectContainerFactory<T> factory)
T
- type of native object container to returnpluginId
- plugin id.factory
- factory instance to create a native object container.