net.commerce.zocalo.experiment.config
Class RoleGroup
java.lang.Object
net.commerce.zocalo.experiment.config.RoleGroup
- All Implemented Interfaces:
- ConfigHolder, RoleValueGroup, RoleValueHolder, ValueGroup, ValueHolder
public class RoleGroup
- extends java.lang.Object
- implements RoleValueHolder, ValueGroup
A collection of descriptions of roles for an experiment. baseFields are
associated with the kind of experiment, while each of the roles represents
a particular combination of parameters available for the experiment. The
initial set of roles specifies the kinds of roles available, and we should
ensure that each type continues to be available. Each type can be copied
multiple times to describe each separate combination of parameters within
that role.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleGroup
public RoleGroup()
RoleGroup
public RoleGroup(java.lang.String roleGroupName)
RoleGroup
public RoleGroup(java.lang.String title,
java.lang.String baseName,
ConfigField[] baseFields,
ConfigField[] roleFields)
getRoleGroupName
public java.lang.String getRoleGroupName()
- Deprecated.
setRoleGroupName
public void setRoleGroupName(java.lang.String roleGroupName)
- Deprecated.
roleCount
public int roleCount()
deleteRole
public void deleteRole(int index)
setRoleName
public void setRoleName(int index,
java.lang.String name)
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
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
asString
public java.lang.String asString(java.lang.String fieldName)
- Specified by:
asString
in interface ValueHolder
getTitle
public java.lang.String getTitle()
- Specified by:
getTitle
in interface RoleValueHolder
- Specified by:
getTitle
in interface ValueHolder
getConfigField
public ConfigField getConfigField(java.lang.String fieldName)
- Specified by:
getConfigField
in interface ValueHolder
hasRole
public boolean hasRole(java.lang.String roleName)
- Specified by:
hasRole
in interface RoleValueHolder
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 value)
- Specified by:
setRoleValue
in interface RoleValueHolder
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
setAllValues
public void setAllValues(javax.servlet.http.HttpServletRequest request)
- Specified by:
setAllValues
in interface ConfigHolder
getRoles
public RoleFields[] getRoles()
setRoles
public void setRoles(RoleFields[] roles)
getBaseFields
public FieldGroup getBaseFields()
setBaseFields
public void setBaseFields(FieldGroup baseFields)
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