| Package | Description |
|---|---|
| org.apache.sling.models.factory | |
| org.apache.sling.models.spi |
| Modifier and Type | Method and Description |
|---|---|
<ModelType> |
ModelFactory.createModel(Object adaptable,
Class<ModelType> type)
Instantiates the given Sling Model class from the given adaptable.
|
<T> T |
ModelFactory.exportModelForRequest(SlingHttpServletRequest request,
String exporterName,
Class<T> targetClass,
Map<String,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(Resource resource,
String exporterName,
Class<T> targetClass,
Map<String,String> options)
Export the model object registered to the resource's type using the defined target class using the named exporter.
|
Object |
ModelFactory.getModelFromRequest(SlingHttpServletRequest request)
Obtain an adapted model class based on the resource type of the request's resource.
|
Object |
ModelFactory.getModelFromResource(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(Object adaptable,
Class<ModelType> modelClass,
boolean required)
Triggers validation for the given model on the given adaptable
|
Copyright © 2017 The Apache Software Foundation. All rights reserved.