Class AbstractFieldImpl
- java.lang.Object
-
- com.adobe.cq.forms.core.components.util.AbstractComponentImpl
-
- com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl
-
- com.adobe.cq.forms.core.components.util.AbstractBaseImpl
-
- com.adobe.cq.forms.core.components.util.AbstractFieldImpl
-
- All Implemented Interfaces:
com.adobe.cq.export.json.ComponentExporter,Base,BaseConstraint,Field,FormComponent,Component
- Direct Known Subclasses:
AbstractCaptchaImpl,AbstractOptionsFieldImpl
public abstract class AbstractFieldImpl extends AbstractBaseImpl implements Field
Abstract class which can be used as base class forFieldimplementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.adobe.cq.forms.core.components.models.form.BaseConstraint
BaseConstraint.Type
-
-
Field Summary
-
Fields inherited from class com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl
CUSTOM_DOR_PROPERTY_WRAPPER, CUSTOM_JCR_PATH_PROPERTY_WRAPPER, CUSTOM_RULE_PROPERTY_WRAPPER
-
Fields inherited from interface com.adobe.cq.forms.core.components.models.form.Base
DATE_FORMATTER, DEFAULT_LANGUAGE
-
Fields inherited from interface com.adobe.cq.forms.core.components.models.form.FormComponent
CUSTOM_PROPERTY_WRAPPER
-
-
Constructor Summary
Constructors Constructor Description AbstractFieldImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetDataFormat()The format in which the value will be exported or submitted.java.lang.Object[]getDefault()The value of the field when no value is provided by the end user or data model.@Nullable java.lang.StringgetDisplayFormat()The format in which the value will be displayed to the user on screen in the field.@Nullable java.lang.StringgetDisplayValueExpression()The expression that when evaluated would determine what the displayValue of a field would be@Nullable java.lang.StringgetEditFormat()The format in which the value will be edited by the user.@Nullable java.lang.StringgetPlaceHolder()The placeholder to show on the field.java.lang.BooleangetReadOnlyIfPresent()java.lang.BooleangetRequiredIfPresent()@Nullable java.lang.BooleanisReadOnly()Checks if the field should be rendered read only.@Nullable java.lang.BooleanisRequired()Returnstrueif field is required, otherwisefalse.-
Methods inherited from class com.adobe.cq.forms.core.components.util.AbstractBaseImpl
getConstraintMessages, getCustomLayoutProperties, getDescription, getEnabledIfPresent, getExportedType, getHtmlScreenReaderText, getLabel, getLang, getScreenReaderText, getTooltip, getTooltipText, getType, getValidationExpression, isEnabled, isTooltipVisible
-
Methods inherited from class com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl
getData, getDataRef, getDorProperties, getEvents, getFieldType, getLinkUrl, getName, getPath, getProperties, getRules, getText, getTitle, getVisibleIfPresent, isVisible, setI18n
-
Methods inherited from class com.adobe.cq.forms.core.components.util.AbstractComponentImpl
getAppliedCssClasses, getId
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adobe.cq.forms.core.components.models.form.Base
getConstraintMessages, getDescription, getExportedType, getHtmlScreenReaderText, getLabel, getLang, getScreenReaderText, getTooltip, isEnabled, isTooltipVisible
-
Methods inherited from interface com.adobe.cq.forms.core.components.models.form.BaseConstraint
getType, getValidationExpression
-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getId
-
Methods inherited from interface com.adobe.cq.forms.core.components.models.form.FormComponent
getDataRef, getDorProperties, getEvents, getFieldType, getName, getPath, getProperties, getRules, isVisible, setI18n
-
-
-
-
Method Detail
-
isReadOnly
@Nullable public @Nullable java.lang.Boolean isReadOnly()
Description copied from interface:FieldChecks if the field should be rendered read only.- Specified by:
isReadOnlyin interfaceField- Returns:
trueif the field should be read-only,falseotherwise
-
getReadOnlyIfPresent
public java.lang.Boolean getReadOnlyIfPresent()
-
isRequired
@Nullable public @Nullable java.lang.Boolean isRequired()
Description copied from interface:BaseConstraintReturnstrueif field is required, otherwisefalse.- Specified by:
isRequiredin interfaceBaseConstraint- Returns:
trueif field is required, otherwisefalse
-
getRequiredIfPresent
public java.lang.Boolean getRequiredIfPresent()
-
getDefault
public java.lang.Object[] getDefault()
Description copied from interface:FieldThe value of the field when no value is provided by the end user or data model. The type of this property should match the value of the type property defined in the Field. If not, then a type coercion will be tried and if that fails, the value will be set to null.- Specified by:
getDefaultin interfaceField- Returns:
- default value of the field
-
getPlaceHolder
@Nullable public @Nullable java.lang.String getPlaceHolder()
Description copied from interface:FieldThe placeholder to show on the field.- Specified by:
getPlaceHolderin interfaceField- Returns:
- placeholder to show on the field
-
getDisplayFormat
@Nullable public @Nullable java.lang.String getDisplayFormat()
Description copied from interface:FieldThe format in which the value will be displayed to the user on screen in the field. For example when using a currency field, the currency sign should be shown to the user.- Specified by:
getDisplayFormatin interfaceField- Returns:
- display format of the field
-
getEditFormat
@Nullable public @Nullable java.lang.String getEditFormat()
Description copied from interface:FieldThe format in which the value will be edited by the user. For instance users in Germany would want to interchange decimal (.) and comma (,) when entering numerical values.- Specified by:
getEditFormatin interfaceField- Returns:
- edit format of the field
-
getDisplayValueExpression
@Nullable public @Nullable java.lang.String getDisplayValueExpression()
Description copied from interface:FieldThe expression that when evaluated would determine what the displayValue of a field would be- Specified by:
getDisplayValueExpressionin interfaceField- Returns:
- display value expression of the field
-
getDataFormat
@Nullable public @Nullable java.lang.String getDataFormat()
Description copied from interface:FieldThe format in which the value will be exported or submitted.- Specified by:
getDataFormatin interfaceField- Returns:
- data format of the field
-
-