Package | Description |
---|---|
org.apache.sling.models.factory | |
org.apache.sling.models.spi | |
org.apache.sling.models.validation |
Modifier and Type | Method and Description |
---|---|
<ModelType> |
ModelFactory.createModel(@NotNull java.lang.Object adaptable,
@NotNull java.lang.Class<ModelType> type)
Instantiates the given Sling Model class from the given adaptable.
|
<T> T |
ModelFactory.exportModelForRequest(@NotNull SlingHttpServletRequest request,
@NotNull java.lang.String exporterName,
@NotNull java.lang.Class<T> targetClass,
@NotNull java.util.Map<java.lang.String,java.lang.String> options)
Export the model object registered to the request's resource's type using the defined target class using the named exporter.
|
<T> T |
ModelFactory.exportModelForResource(@NotNull Resource resource,
@NotNull java.lang.String exporterName,
@NotNull java.lang.Class<T> targetClass,
@NotNull java.util.Map<java.lang.String,java.lang.String> options)
Export the model object registered to the resource's type using the defined target class using the named exporter.
|
@NotNull java.lang.Object |
ModelFactory.getModelFromRequest(@NotNull SlingHttpServletRequest request)
Obtain an adapted model class based on the resource type of the request's resource.
|
@NotNull java.lang.Object |
ModelFactory.getModelFromResource(@NotNull Resource resource)
Obtain an adapted model class based on the resource type of the provided resource.
|
Modifier and Type | Method and Description |
---|---|
<ModelType> |
ModelValidation.validate(java.lang.Object adaptable,
java.lang.Class<ModelType> modelClass,
boolean required)
Triggers validation for the given model on the given adaptable
|
Modifier and Type | Class and Description |
---|---|
class |
InvalidResourceException
Exception embedding a
ValidationResult from Sling Validation. |
Copyright © 2022 The Apache Software Foundation. All rights reserved.