public class Plugins extends Object
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> objects)
Sets the plugin options as array.
|
<T extends NativeObjectContainer> |
setOptions(String pluginId,
T object)
Sets the plugin options.
|
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 object)
T
- type of native object container to storepluginId
- plugin id.object
- 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> objects)
T
- type of native object container to storepluginId
- plugin id.objects
- 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.