Class TextArea
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.elements.Element
-
- org.symphonyoss.symphony.messageml.elements.FormElement
-
- org.symphonyoss.symphony.messageml.elements.TextArea
-
- All Implemented Interfaces:
LabelableElement,MinMaxLengthElement,RegexElement,SplittableElement,TooltipableElement
public class TextArea extends FormElement implements RegexElement, LabelableElement, TooltipableElement, MinMaxLengthElement
Class representing a Text Area inside a Form.- Since:
- 06/12/2019
- Author:
- Sandro Ribeiro
-
-
Field Summary
Fields Modifier and Type Field Description static StringMESSAGEML_TAG-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.FormElement
INPUT_TAG, NAME_ATTR, TYPE_ATTR
-
Fields inherited from class org.symphonyoss.symphony.messageml.elements.Element
CLASS_ATTR, format, ID_ATTR, MAPPER, STYLE_ATTR
-
Fields inherited from interface org.symphonyoss.symphony.messageml.elements.LabelableElement
LABEL, LABEL_FOR, LABEL_MAX_LENGTH, LABEL_TOO_LONG_ERR
-
Fields inherited from interface org.symphonyoss.symphony.messageml.elements.MinMaxLengthElement
ALL_MIN_MAX_ATTRS, MAXLENGTH_ATTR, MINLENGTH_ATTR
-
Fields inherited from interface org.symphonyoss.symphony.messageml.elements.RegexElement
ALL_REGEX_ATTRS, ATTRIBUTE_MANDATORY_WHEN_ATTRIBUTE_DEFINED_ERR, ATTRIBUTE_TOO_LONG_ERR, PATTERN_ATTR, PATTERN_ERROR_MESSAGE_ATTR, PATTERN_ERROR_MESSAGE_MAX_LENGTH, PATTERN_MAX_LENGTH, PRESENTATIONML_PATTERN_ERROR_MESSAGE_ATTR, REGEX_NOT_VALID_ERR
-
Fields inherited from interface org.symphonyoss.symphony.messageml.elements.SplittableElement
PRESENTATIONML_DIV_FLAG
-
Fields inherited from interface org.symphonyoss.symphony.messageml.elements.TooltipableElement
DATA_TARGET_ID, DATA_TITLE, TITLE, TOOLTIP_CLASS, TOOLTIP_MAX_LENGTH, TOOLTIP_TOO_LONG_ERR, TOOLTIPABLE_PRESENTATIONML
-
-
Constructor Summary
Constructors Constructor Description TextArea(Element parent, FormatEnum format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.commonmark.node.NodeasMarkdown()protected voidbuildAttribute(MessageMLParser parser, Node item)StringgetAttributeValue(String attributeName)StringgetElementId()StringgetElementInitialValue()StringgetElementType()IntegergetMaxValueAllowed()IntegergetMinValueAllowed()booleanhasElementInitialValue()voidvalidate()-
Methods inherited from class org.symphonyoss.symphony.messageml.elements.Element
addChild, areNestedElementsAllowed, asText, buildAll, buildNode, countNonTextNodesInNodeList, findElements, findElements, findElements, getAttribute, getAttributes, getChild, getChildren, getFormat, getMessageMLTag, getParent, getPresentationMLTag, getStringAttribute, hasExactNumberOfChildren, hasIdAttribute, size, throwInvalidInputException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.symphonyoss.symphony.messageml.elements.LabelableElement
getLabelAttribute, getPresentationMLLabelTag, isLabel, isLabelNode, validateLabel
-
Methods inherited from interface org.symphonyoss.symphony.messageml.elements.MinMaxLengthElement
getAttributeAsInteger, getDefaultValueIfCurrentIsNull, getLengthErrorMessage, isLengthOutOfRange, isMinAndMaxLengthCombinationValid, isTextBiggerThanMaxLength, isTextSmallerThanMinLength, validateInitialValueIfFound, validateMinAndMaxLengths
-
Methods inherited from interface org.symphonyoss.symphony.messageml.elements.RegexElement
getAttribute, getAttributes, getFormat, getOtherAttributes, getRegexAttrForPresentationML, validateRegex
-
Methods inherited from interface org.symphonyoss.symphony.messageml.elements.SplittableElement
fillAttributes, fillAttributes, getAttribute, getAttributes, getStringAttribute, isSplittable, isSplittableNodeComponent, splittableAsPresentationML, splittableRemove, validateSplittable
-
Methods inherited from interface org.symphonyoss.symphony.messageml.elements.TooltipableElement
getPresentationMLTooltipTag, getTooltipAttributes, isTooltip, validateTooltip
-
-
-
-
Field Detail
-
MESSAGEML_TAG
public static final String MESSAGEML_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextArea
public TextArea(Element parent, FormatEnum format)
-
-
Method Detail
-
validate
public void validate() throws InvalidInputException- Overrides:
validatein classFormElement- Throws:
InvalidInputException
-
buildAttribute
protected void buildAttribute(MessageMLParser parser, Node item) throws InvalidInputException
- Throws:
InvalidInputException
-
asMarkdown
public org.commonmark.node.Node asMarkdown()
-
getElementId
public String getElementId()
- Specified by:
getElementIdin interfaceSplittableElement- Returns:
- the name used to build unique element id
-
getElementType
public String getElementType()
- Specified by:
getElementTypein interfaceMinMaxLengthElement- Returns:
- the type of the element
-
hasElementInitialValue
public boolean hasElementInitialValue()
- Specified by:
hasElementInitialValuein interfaceMinMaxLengthElement- Returns:
- true if the element has an initial value
-
getElementInitialValue
public String getElementInitialValue()
- Specified by:
getElementInitialValuein interfaceMinMaxLengthElement- Returns:
- the initial value found in the element
-
getAttributeValue
public String getAttributeValue(String attributeName)
- Specified by:
getAttributeValuein interfaceMinMaxLengthElement- Parameters:
attributeName- we want to retrieve- Returns:
- the value corresponding to the attributeName given in input
-
getMinValueAllowed
public Integer getMinValueAllowed()
- Specified by:
getMinValueAllowedin interfaceMinMaxLengthElement- Returns:
- minimum value allowed for the minLength attribute
-
getMaxValueAllowed
public Integer getMaxValueAllowed()
- Specified by:
getMaxValueAllowedin interfaceMinMaxLengthElement- Returns:
- maximum value allowed for the maxLength attribute
-
-