|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.editor.nodes.expectation.part.SignaturePartUtil
public class SignaturePartUtil
A Class supplying data for use in editing SignaturePartBean
instances. Specifically, this class provides Strings to use to label controls
for editing the "value class name" and "value" fields, booleans for whether
these controls should be enabled, default values for the fields, lists of
options for the fields and validators for the user input, all as necessary.
Depending on the ValueType (and, as appropriate, class name)
defined in the SignaturePartBean, some or all of these data will
be returned. For instance, no list of options is provided for Mock Object
ValueType class names, but one is for Object
ValueType class names, etc.
| Constructor Summary | |
|---|---|
SignaturePartUtil()
|
|
| Method Summary | |
|---|---|
static org.mockcentral.server.SignaturePartBean |
createDefault()
Returns a new SignaturePartBean with default field values. |
static java.lang.String |
getDefaultValue(java.lang.Object... objects)
Returns a default value for the value field. |
static java.lang.String |
getDefaultValueClassName(org.mockcentral.server.ValueType valueType)
Returns a default value for the value class name field. |
static java.lang.String[] |
getEditChildrenPrompts(org.mockcentral.server.SignaturePartBean bean)
Returns an array of Strings for prompting the user during editing of nested SignaturePartBean instances. |
static boolean |
getEnableValue(org.mockcentral.server.ValueType valueType)
Returns a boolean for whether a view's controls associated with the value field should be enabled. |
static boolean |
getEnableValueClassName(org.mockcentral.server.ValueType valueType)
Returns a boolean for whether the control associated with the value class name field should be enabled. |
static IMockCentralDialogInputValidator |
getValueClassNameInputValidator(org.mockcentral.server.ValueType valueType)
Returns the IMockCentralDialogInputValidator used to
validate a prospective value for the value class name field. |
static java.lang.String |
getValueClassNameLabel(org.mockcentral.server.ValueType valueType)
Returns a String used to label the control used for editing the value class name field. |
static java.util.List<java.lang.String> |
getValueClassNameOptions(org.mockcentral.server.ValueType valueType)
Returns a list of available options for a view component used to select the value for the value class name field. |
static IMockCentralDialogInputValidator |
getValueInputValidator(org.mockcentral.server.SignaturePartBean bean)
Returns the IMockCentralDialogInputValidator used to
validate a prospective value for the value field. |
static java.lang.String |
getValueLabel(org.mockcentral.server.SignaturePartBean bean)
Returns a String used to label the control used for editing the value field. |
static java.util.List<java.lang.String> |
getValueOptions(java.lang.Object... objects)
Returns a list of available options for a view component used to select the value for the value field. |
static java.lang.String |
getValueTypeDisplayLabel(org.mockcentral.server.ValueType valueType)
Returns a displayable label for a ValueType value. |
static java.util.List<NodeProblem> |
validateSignaturePartBean(org.mockcentral.server.SignaturePartBean bean,
FixtureNode fixtureNode)
Performs validation for the supplied SignaturePartBean,
returning a list of any NodeProblem objects that were
generated during the process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SignaturePartUtil()
| Method Detail |
|---|
public static org.mockcentral.server.SignaturePartBean createDefault()
SignaturePartBean with default field values.
SignaturePartBean with default field values.public static java.lang.String getValueTypeDisplayLabel(org.mockcentral.server.ValueType valueType)
ValueType value.
valueType - the ValueType.
ValueType value.public static java.lang.String getValueClassNameLabel(org.mockcentral.server.ValueType valueType)
valueType - the ValueType for the object being edited.
public static boolean getEnableValueClassName(org.mockcentral.server.ValueType valueType)
valueType - the ValueType for the object being edited.
public static java.lang.String getDefaultValueClassName(org.mockcentral.server.ValueType valueType)
valueType - the ValueType for the object being edited.
public static java.util.List<java.lang.String> getValueClassNameOptions(org.mockcentral.server.ValueType valueType)
valueType - the ValueType for the object being edited.
public static IMockCentralDialogInputValidator getValueClassNameInputValidator(org.mockcentral.server.ValueType valueType)
IMockCentralDialogInputValidator used to
validate a prospective value for the value class name field. Returns null
if the value type does not require validation for the field.
valueType - the ValueType for the object being edited.
IMockCentralDialogInputValidator used to
validate a prospective value for the value class name field.public static java.lang.String getValueLabel(org.mockcentral.server.SignaturePartBean bean)
bean - the SignaturePartBean
public static boolean getEnableValue(org.mockcentral.server.ValueType valueType)
valueType - the ValueType for the object being edited.
public static java.lang.String getDefaultValue(java.lang.Object... objects)
objects - a Object array containing the ValueType and
any other data required to create the return value.
public static java.util.List<java.lang.String> getValueOptions(java.lang.Object... objects)
public static IMockCentralDialogInputValidator getValueInputValidator(org.mockcentral.server.SignaturePartBean bean)
IMockCentralDialogInputValidator used to
validate a prospective value for the value field. Returns null if the
value type does not require validation for the field.
IMockCentralDialogInputValidator used to
validate a prospective value for the value field or null.public static java.lang.String[] getEditChildrenPrompts(org.mockcentral.server.SignaturePartBean bean)
SignaturePartBean instances. These may be constructor
arguments for instantiatable types or collection/array entries.
bean - the SignaturePartBean being edited, the
ValueType and value classname of which are used to build the
prompts.
public static java.util.List<NodeProblem> validateSignaturePartBean(org.mockcentral.server.SignaturePartBean bean,
FixtureNode fixtureNode)
SignaturePartBean,
returning a list of any NodeProblem objects that were
generated during the process.
bean - the bean to validate.fixtureNode - the enclosing FixtureNode which is
required to validate Mock Object references.
List containing any NodeProblem
objects generated during validation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||