org.broadleafcommerce.openadmin.web.rulebuilder.enums
Class AbstractRuleBuilderEnumOptionsExtensionListener
java.lang.Object
org.broadleafcommerce.openadmin.web.rulebuilder.enums.AbstractRuleBuilderEnumOptionsExtensionListener
- All Implemented Interfaces:
- RuleBuilderEnumOptionsExtensionListener
public abstract class AbstractRuleBuilderEnumOptionsExtensionListener
- extends Object
- implements RuleBuilderEnumOptionsExtensionListener
Abstract extension listener for rule builder enum options that handles the boilerplate code required for setting up
the response to the client. This class provides two abstract methods that must be implemented, #getVariableName()
and #getEnumClass(). Generates a String with the following pattern:
var variableName = [
{ label : "enumFriendlyType", name : "enumType" },
{ label : "enumFriendlyType2", name : "enumType2" },
...
{ label : "enumFriendlyTypeN", name : "enumTypeN" }
];
- Author:
- Andre Azzolini (apazzolini)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRuleBuilderEnumOptionsExtensionListener
public AbstractRuleBuilderEnumOptionsExtensionListener()
getOptionValues
public String getOptionValues()
- Specified by:
getOptionValues in interface RuleBuilderEnumOptionsExtensionListener
getTypes
protected Map<String,? extends BroadleafEnumerationType> getTypes(Class<? extends BroadleafEnumerationType> clazz)
getValuesToGenerate
protected abstract Map<String,Class<? extends BroadleafEnumerationType>> getValuesToGenerate()
- Returns:
- a map representing the various values that this extension listener should generate
Copyright © 2013. All Rights Reserved.