E
- the field choice definitionpublic class ChoiceValue<E extends FieldChoiceDefinition<E>> extends Named implements Choice, ChoiceWithTransition
Constructor and Description |
---|
ChoiceValue(java.lang.String storagecode,
java.lang.String displayvalue,
java.lang.String tooltip,
boolean activechoice) |
ChoiceValue(java.lang.String storagecode,
java.lang.String displayvalue,
java.lang.String tooltip,
boolean activechoice,
boolean transitionrestrictions) |
Modifier and Type | Method and Description |
---|---|
void |
addTransition(ChoiceValue<E> targetchoice)
some choice values restrict transition to a new choice value
|
ChoiceValue<E>[] |
getAuthorizedTransitions() |
java.lang.String |
getDisplayValue() |
java.lang.String |
getStorageCode() |
java.lang.String |
getTooltip() |
int |
hashCode() |
boolean |
isAuthorizedTransitions(ChoiceValue<E> newvalue)
checks if the transition is authorized
|
boolean |
isTransitionrestrictions() |
void |
setTransitionRestrictions()
specifies that this choice value has transiction restrictions, and will allow
as next value only some choice values
|
java.lang.String |
toString() |
void |
WritePayloadToCDL(MessageWriter writer)
writes the definition of this choice value on the OpenLowcode message
|
changeName, cleanName, equals, getName
public ChoiceValue(java.lang.String storagecode, java.lang.String displayvalue, java.lang.String tooltip, boolean activechoice, boolean transitionrestrictions)
storagecode
- the text stored in the dabatase, typically
short, without special characters and in
English for multi-lingual applicationdisplayvalue
- the value as displayed, typically in clear
human language, but quite shorttooltip
- the whole story about the valueactivechoice
- false if the choice is available in theory but
not in the current contexttransitionrestrictions
- true if transictions are restrictedpublic ChoiceValue(java.lang.String storagecode, java.lang.String displayvalue, java.lang.String tooltip, boolean activechoice)
storagecode
- the text stored in the dabatase, typically short, without
special characters and in English for multi-lingual
applicationdisplayvalue
- the value as displayed, typically in clear human
language, but quite shorttooltip
- the whole story about the valueactivechoice
- false if the choice is available in theory but not in the
current contextpublic java.lang.String getStorageCode()
getStorageCode
in interface Choice
public java.lang.String getDisplayValue()
public java.lang.String getTooltip()
public boolean isAuthorizedTransitions(ChoiceValue<E> newvalue)
newvalue
- the new value to transition topublic boolean isTransitionrestrictions()
isTransitionrestrictions
in interface ChoiceWithTransition
public void setTransitionRestrictions()
public void addTransition(ChoiceValue<E> targetchoice)
targetchoice
- the authorized target choice for a field where current
value is this choicepublic ChoiceValue<E>[] getAuthorizedTransitions()
getAuthorizedTransitions
in interface ChoiceWithTransition
public void WritePayloadToCDL(MessageWriter writer) throws java.io.IOException
writer
- the writer of the messagejava.io.IOException
- if an exception is encountered transmitting the messagepublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object