Annotation Type ApiModel
- 
@Target(TYPE) @Retention(RUNTIME) public @interface ApiModelRegisters a model with the Api Framework. This is the starting point for further processing. This binds either a sling:resourceType or some programmatically mapped Pojo to a resource in Sling.- See Also:
 ModelLookup
 
- 
- 
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringcategoryThe category this API belongs to is the first token in the URL after the api root. 
- 
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringdefaultConverterMediaTypeThe default media type to use to find a HypermediaConverter to serialize the model.booleanisDefaultMark this as the default model for the category.java.lang.Class<?>modelClassUse this to signal to the framework to managed this object via a different interface.java.lang.Class<? extends ModelLookup>modelLookupIf a Pojo can't be simply bound to a sling resource type or no resource types exist for the resource then pass this lookup class back and programmatically return the Pojos to use.java.lang.StringresourceTypeThe sling:resourcetype to bind this Model to.java.lang.String[]typeReturns a list of classes that will be used when Siren serializes this Pojo to JS. 
 - 
 
- 
- 
- 
modelLookup
java.lang.Class<? extends ModelLookup> modelLookup
If a Pojo can't be simply bound to a sling resource type or no resource types exist for the resource then pass this lookup class back and programmatically return the Pojos to use.- Returns:
 - class that will manage the lookups for this model
 
- Default:
 - com.adobe.granite.haf.apimodel.impl.NullModelLookup.class
 
 
 - 
 
- 
- 
defaultConverterMediaType
java.lang.String defaultConverterMediaType
The default media type to use to find a HypermediaConverter to serialize the model. This will be used if the accepts header in the request doesn't request a specific media type that can be satisfied by one of the registered converters in the system.- Returns:
 - The media type used to look up the HypermediaConverter to use as a default.
 
- Default:
 - ""
 
 
 - 
 
- 
- 
isDefault
boolean isDefault
Mark this as the default model for the category. If no model is found in the resource type registration or in the model lookup calls a model with this attribute set to true will be used. Only one default model is allowed per category.- Returns:
 - if the model is the default
 
- Default:
 - false
 
 
 - 
 
- 
- 
modelClass
java.lang.Class<?> modelClass
Use this to signal to the framework to managed this object via a different interface. This is especially useful if this model also uses SlingModels. This value should track one of the adapters registrations.- Returns:
 - the model class
 
- Default:
 - java.lang.Object.class
 
 
 - 
 
 -