FieldType
- the field type
AnnotationType
- the type
public static interface AnnotatedFieldMapper.OngoingMapping<FieldType,AnnotationType>
Modifier and Type | Method and Description |
---|---|
AnnotationType |
getAnnotation() |
Map<Class<? extends Annotation>,Annotation> |
getAnnotationsOfField() |
Field |
getField() |
Class<?> |
getFieldType() |
Class<?> |
getFieldTypeParameter() |
Object |
getModel() |
org.apache.sling.api.resource.ValueMap |
getProperties() |
String |
getRepositoryPath() |
FieldType |
getResolvedValue() |
org.apache.sling.api.resource.Resource |
getResource() |
@CheckForNull FieldType getResolvedValue()
null
if no value could be resolved for the field. This value
has not been set to the field
at this point.@Nonnull AnnotationType getAnnotation()
the annotation this mapper is registered for
.
Never null
.@Nonnull Object getModel()
null
.@Nonnull Field getField()
null
. The field's value was not changed at this point, i.e. it is likely to
deviate from getResolvedValue()
. Note: do not rely on this field's type
but use the provided field type
instead, as these types may be different, for instance in case
of Lazy
fields.@Nonnull Map<Class<? extends Annotation>,Annotation> getAnnotationsOfField()
null
.@Nonnull Class<?> getFieldType()
Lazy
, this
type is the component type, i.e. the type targeted by the optional field. However, field mappers
are not applied optional fields but to the subsequent mapping, when the lazy value is actually mapped
.
Never null
.@CheckForNull Class<?> getFieldTypeParameter()
field type
, or null
if
no such parameter exists.@Nonnull String getRepositoryPath()
path annotation
. Placeholders
in the path are resolved at this point. Never null
.@Nonnull org.apache.sling.api.resource.Resource getResource()
null
, but may be a synthetic resource.@CheckForNull org.apache.sling.api.resource.ValueMap getProperties()
ValueMap
representation of the resource
.
This value map does support primitive types, e.g. int
. May be null
if the resource
has no properties, e.g. if it is synthetic.Copyright © 2024. All rights reserved.