Class DialogTextElement

java.lang.Object
com.slack.api.model.dialog.DialogTextElement
All Implemented Interfaces:
DialogElement

public class DialogTextElement
extends java.lang.Object
implements DialogElement
Represents a text dialog element

Text elements are single-line plain text fields.

  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  DialogTextElement.DialogTextElementBuilder  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int maxLength
    Maximum input length allowed for element.
  • Constructor Summary

    Constructors 
    Constructor Description
    DialogTextElement()  
    DialogTextElement​(java.lang.String label, java.lang.String name, java.lang.String value, java.lang.String placeholder, boolean optional, int maxLength, int minLength, java.lang.String hint, DialogSubType subtype)  
  • Method Summary

    Modifier and Type Method Description
    static DialogTextElement.DialogTextElementBuilder builder()  
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.lang.String getHint()
    Helpful text provided to assist users in answering a question.
    java.lang.String getLabel()
    Label displayed to user.
    int getMaxLength()
    Maximum input length allowed for element.
    int getMinLength()
    Minimum input length allowed for element.
    java.lang.String getName()
    Name of form element.
    java.lang.String getPlaceholder()
    A string displayed as needed to help guide users in completing the element.
    DialogSubType getSubtype()
    Subtype for this text type element (e.g.
    java.lang.String getType()
    Type of element.
    java.lang.String getValue()
    A default value for this field.
    int hashCode()  
    boolean isOptional()
    Provide true when the form element is not required.
    void setHint​(java.lang.String hint)
    Helpful text provided to assist users in answering a question.
    void setLabel​(java.lang.String label)
    Label displayed to user.
    void setMaxLength​(int maxLength)
    Maximum input length allowed for element.
    void setMinLength​(int minLength)
    Minimum input length allowed for element.
    void setName​(java.lang.String name)
    Name of form element.
    void setOptional​(boolean optional)
    Provide true when the form element is not required.
    void setPlaceholder​(java.lang.String placeholder)
    A string displayed as needed to help guide users in completing the element.
    void setSubtype​(DialogSubType subtype)
    Subtype for this text type element (e.g.
    void setValue​(java.lang.String value)
    A default value for this field.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • maxLength

      public int maxLength
      Maximum input length allowed for element. Up to 150 characters. Defaults to 150.
  • Constructor Details

    • DialogTextElement

      public DialogTextElement()
    • DialogTextElement

      public DialogTextElement​(java.lang.String label, java.lang.String name, java.lang.String value, java.lang.String placeholder, boolean optional, int maxLength, int minLength, java.lang.String hint, DialogSubType subtype)
  • Method Details

    • builder

    • getLabel

      public java.lang.String getLabel()
      Label displayed to user. Required. No more than 24 characters.
      Specified by:
      getLabel in interface DialogElement
    • getName

      public java.lang.String getName()
      Name of form element. Required. No more than 300 characters.
      Specified by:
      getName in interface DialogElement
    • getType

      public java.lang.String getType()
      Type of element. For a text element, the type is always text . It's required.
      Specified by:
      getType in interface DialogElement
      See Also:
      Dialog form elements
    • getValue

      public java.lang.String getValue()
      A default value for this field. Up to 500 characters.
      Specified by:
      getValue in interface DialogElement
    • getPlaceholder

      public java.lang.String getPlaceholder()
      A string displayed as needed to help guide users in completing the element. 150 character maximum.
      Specified by:
      getPlaceholder in interface DialogElement
    • isOptional

      public boolean isOptional()
      Provide true when the form element is not required. By default, form elements are required.
      Specified by:
      isOptional in interface DialogElement
    • getMaxLength

      public int getMaxLength()
      Maximum input length allowed for element. Up to 150 characters. Defaults to 150.
    • getMinLength

      public int getMinLength()
      Minimum input length allowed for element. Type text: Up to 150 characters. Defaults to 0.
    • getHint

      public java.lang.String getHint()
      Helpful text provided to assist users in answering a question. Up to 150 characters.
    • getSubtype

      public DialogSubType getSubtype()
      Subtype for this text type element (e.g. Number)
    • setLabel

      public void setLabel​(java.lang.String label)
      Label displayed to user. Required. No more than 24 characters.
      Specified by:
      setLabel in interface DialogElement
    • setName

      public void setName​(java.lang.String name)
      Name of form element. Required. No more than 300 characters.
      Specified by:
      setName in interface DialogElement
    • setValue

      public void setValue​(java.lang.String value)
      A default value for this field. Up to 500 characters.
      Specified by:
      setValue in interface DialogElement
    • setPlaceholder

      public void setPlaceholder​(java.lang.String placeholder)
      A string displayed as needed to help guide users in completing the element. 150 character maximum.
      Specified by:
      setPlaceholder in interface DialogElement
    • setOptional

      public void setOptional​(boolean optional)
      Provide true when the form element is not required. By default, form elements are required.
      Specified by:
      setOptional in interface DialogElement
    • setMaxLength

      public void setMaxLength​(int maxLength)
      Maximum input length allowed for element. Up to 150 characters. Defaults to 150.
    • setMinLength

      public void setMinLength​(int minLength)
      Minimum input length allowed for element. Type text: Up to 150 characters. Defaults to 0.
    • setHint

      public void setHint​(java.lang.String hint)
      Helpful text provided to assist users in answering a question. Up to 150 characters.
    • setSubtype

      public void setSubtype​(DialogSubType subtype)
      Subtype for this text type element (e.g. Number)
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object