Class ValueInspectorService<T extends GenericValue>
java.lang.Object
io.wcm.siteapi.genericedit.builder.ValueInspectorService<T>
- All Implemented Interfaces:
- io.wcm.sling.commons.caservice.ContextAwareService
@ConsumerType
public abstract class ValueInspectorService<T extends GenericValue>
extends Object
implements io.wcm.sling.commons.caservice.ContextAwareService
Allows to customize the inspection process which turns properties in Sling Models instance
 to specific ones e.g. for links, media and rich text.
- 
Field SummaryFields inherited from interface io.wcm.sling.commons.caservice.ContextAwareServicePROPERTY_ACCEPTS_CONTEXT_PATH_EMPTY, PROPERTY_CONTEXT_PATH_BLACKLIST_PATTERN, PROPERTY_CONTEXT_PATH_PATTERN
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionInspect the value of given property to check if a specific value representation can be extracted.protected abstract TinspectValue(@NotNull String key, @NotNull Object rawValue, @NotNull Object instance) Inspects raw value and tries to convert it to the target type.
- 
Constructor Details- 
ValueInspectorServicepublic ValueInspectorService()
 
- 
- 
Method Details- 
inspect@NotNull public @NotNull List<T> inspect(@NotNull @NotNull String key, @NotNull @NotNull List<Object> rawValues, @NotNull @NotNull Object instance) Inspect the value of given property to check if a specific value representation can be extracted.- Parameters:
- key- Property key
- rawValues- Raw property values
- instance- Instance property is read from for further inspection
- Returns:
- List of matching values that are found. Returns empty list if not value was found.
 
- 
inspectValue@Nullable protected abstract T inspectValue(@NotNull @NotNull String key, @NotNull @NotNull Object rawValue, @NotNull @NotNull Object instance) Inspects raw value and tries to convert it to the target type.- Parameters:
- key- Property key
- rawValue- Raw property value
- instance- Instance property is read from for further inspection
- Returns:
- Target type instance or null
 
 
-