Interface Base

  • All Superinterfaces:
    com.adobe.cq.wcm.core.components.models.Component, com.adobe.cq.export.json.ComponentExporter
    All Known Subinterfaces:
    Field, TextInput

    @ConsumerType
    public interface Base
    extends com.adobe.cq.wcm.core.components.models.Component
    A base interface to be extended by all the different types of form elements.
    Since:
    com.adobe.cq.forms.core.components.models.form 0.0.1
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Base.ConstraintType
      Defines the constraint type.
      static class  Base.FieldType
      Defines the view type.
    • Field Summary

      • Fields inherited from interface com.adobe.cq.wcm.core.components.models.Component

        PN_ID
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default @NotNull java.util.Map<Base.ConstraintType,​java.lang.String> getConstraintsMessages()
      Returns map of constraint messages specific to each constraint (like required, minLength etc).
      default @Nullable java.lang.String getDataRef()
      Returns the reference to the data model
      default @Nullable java.lang.String getDescription()
      Returns the description of the field
      default @NotNull java.lang.String getExportedType()  
      java.lang.String getFieldType()
      Returns the field type
      default @Nullable Label getLabel()
      Returns label of the form field
      default @Nullable java.lang.String getName()
      Returns the name of the form field
      default @NotNull java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      Custom Properties
      default @Nullable java.lang.String getScreenReaderText()
      Returns the string to indicate the text to be read by screen readers
      default boolean isEnabled()
      Returns true if form field should be enabled, otherwise false.
      default boolean isVisible()
      Returns true if form field should be visible, otherwise false.
      • Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component

        getAppliedCssClasses, getData, getId
    • Method Detail

      • getLabel

        @Nullable
        default @Nullable Label getLabel()
        Returns label of the form field
        Returns:
        label of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getName

        @Nullable
        default @Nullable java.lang.String getName()
        Returns the name of the form field
        Returns:
        name of the form field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getDataRef

        @Nullable
        default @Nullable java.lang.String getDataRef()
        Returns the reference to the data model
        Returns:
        reference to the data model
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getDescription

        @Nullable
        default @Nullable java.lang.String getDescription()
        Returns the description of the field
        Returns:
        the description of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getScreenReaderText

        @Nullable
        default @Nullable java.lang.String getScreenReaderText()
        Returns the string to indicate the text to be read by screen readers
        Returns:
        the screen reader text
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getFieldType

        java.lang.String getFieldType()
        Returns the field type
        Returns:
        the field type
        Since:
        com.adobe.cq.forms.core.components.models.form 1.0.0
      • isVisible

        default boolean isVisible()
        Returns true if form field should be visible, otherwise false.
        Returns:
        true if form field should be visible, otherwise false
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • isEnabled

        default boolean isEnabled()
        Returns true if form field should be enabled, otherwise false.
        Returns:
        true if form field should be enabled, otherwise false
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getConstraintsMessages

        @NotNull
        default @NotNull java.util.Map<Base.ConstraintType,​java.lang.String> getConstraintsMessages()
        Returns map of constraint messages specific to each constraint (like required, minLength etc). The constraint list would change based on the form field type
        Returns:
        map of constraint messages specific to each constraint.
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getExportedType

        @NotNull
        default @NotNull java.lang.String getExportedType()
        Specified by:
        getExportedType in interface com.adobe.cq.wcm.core.components.models.Component
        Specified by:
        getExportedType in interface com.adobe.cq.export.json.ComponentExporter
        Since:
        com.adobe.cq.wcm.core.components.models.form 14.2.0
        See Also:
        ComponentExporter.getExportedType()
      • getProperties

        @NotNull
        default @NotNull java.util.Map<java.lang.String,​java.lang.Object> getProperties()
        Custom Properties
        Since:
        com.adobe.cq.forms.core.components.models.form 1.1.0