net.commerce.zocalo.experiment.config
Class ChoiceField
java.lang.Object
net.commerce.zocalo.experiment.config.ChoiceField
- All Implemented Interfaces:
- ConfigHolder, RoleValueGroup, RoleValueHolder, ValueGroup, ValueHolder
public class ChoiceField
- extends java.lang.Object
- implements ValueGroup
A field that provides a choice which may specify further configuration parameters.
The choice made by this field specifies one of its groups as the active one.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChoiceField
public ChoiceField()
ChoiceField
public ChoiceField(java.lang.String title,
ValueGroup[] configurations)
asString
public java.lang.String asString(java.lang.String fieldName)
- Specified by:
asString
in interface ValueHolder
hasValue
public boolean hasValue(java.lang.String fieldName)
- Specified by:
hasValue
in interface ValueHolder
setValue
public void setValue(java.lang.String fieldName,
java.lang.String newValue)
- Specified by:
setValue
in interface ValueHolder
getValue
public java.lang.String getValue(java.lang.String fieldName)
- Specified by:
getValue
in interface ValueHolder
getTitle
public java.lang.String getTitle()
- Specified by:
getTitle
in interface RoleValueHolder
- Specified by:
getTitle
in interface ValueHolder
setTitle
public void setTitle(java.lang.String title)
setGroups
public void setGroups(ValueGroup[] groups)
hasRole
public boolean hasRole(java.lang.String roleName)
- Specified by:
hasRole
in interface RoleValueHolder
getField
public ConfigField getField(java.lang.String fieldName)
- Specified by:
getField
in interface ValueGroup
getField
public ConfigField getField(java.lang.String roleName,
java.lang.String fieldName)
- Specified by:
getField
in interface RoleValueGroup
getConfigField
public ConfigField getConfigField(java.lang.String fieldName)
- Specified by:
getConfigField
in interface ValueHolder
getGroups
public ValueGroup[] getGroups()
setGroups
public void setGroups(FieldGroup[] groups)
setAllValues
public void setAllValues(javax.servlet.http.HttpServletRequest request)
- Specified by:
setAllValues
in interface ConfigHolder
render
public void render(java.lang.StringBuffer buf)
- Specified by:
render
in interface ConfigHolder
renderVisible
public void renderVisible(java.lang.StringBuffer buf,
boolean visible)
- Specified by:
renderVisible
in interface ValueGroup
getChoice
public java.lang.String getChoice()
setChoice
public void setChoice(java.lang.String choice)
hasRoleValue
public boolean hasRoleValue(java.lang.String roleName,
java.lang.String fieldName)
- Specified by:
hasRoleValue
in interface RoleValueHolder
setRoleValue
public void setRoleValue(java.lang.String roleName,
java.lang.String fieldName,
java.lang.String newValue)
- Specified by:
setRoleValue
in interface RoleValueHolder
getRoleValue
public java.lang.String getRoleValue(java.lang.String roleName,
java.lang.String fieldName)
- Specified by:
getRoleValue
in interface RoleValueHolder
getConfigField
public ConfigField getConfigField(java.lang.String roleName,
java.lang.String fieldName)
- Specified by:
getConfigField
in interface RoleValueHolder