public interface DMXExtensionCallback
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getCallbackData()
Returns data that this callback wants to register with the model.
|
DMXExtensionType |
getExtensionType()
Returns a type of this extension.
|
String[] |
getMappings()
Returns the mappings of views or controllers to which this
extension will apply.
|
String[] |
getResourceBundles()
Returns a list of names of resources bundles associated with this extension callback.
|
void |
setDataValuesFromModel(Map<String,Object> dataMap)
Updates model which this callback has registered with values currently set
in model.
|
DMXExtensionType getExtensionType()
String[] getMappings()
Map<String,Object> getCallbackData()
void setDataValuesFromModel(Map<String,Object> dataMap)
dataMap
- data map from modelString[] getResourceBundles()
Returns a list of names of resources bundles associated with this extension callback.
Values specified in bundles will override values set in extendable controller or view. The way
to do this is to specify name of each property from DMXExtendable
which is being overriden
as a key, and set new property value as a value.
For example, let's say that DMXExtendable
specifies the following properties:
ext.prop1 = value 1
ext.prop2 = value 2
ext.prop3 = value 3
To override these values in extension callback, create a resource bundle which contains values to be overriden.
ext.prop1 = Override value 1
ext.prop2 = Overridevalue 2
and then return name of this bundle as a return from this method.
String[] getResourceBundles(){
return new String[]{"my.bundle};
}
For platforms which do not use resource bundle to manage resources, such as Android, properties should map parent values to values which will override them. For example:
original_string_name = callback_string_name
original_drawable_name = callback_drawable_name
Note that, due to the packaging of Android applications, these values should not be specified in properties files, but rather
in implementations such as ListResourceBundle
.
Copyright © 2012-2014 Vektor Software. All Rights Reserved.