T
- the model's typeS
- the type of the model's identifier (e.g., Long
, String
, etc.)U
- the type of the resource's identifier. It must be a subclass of
Identifier<S>
.V
- the type of the parent model's identifier (e.g., Long
,
String
, etc.)W
- the type of the parent resource's identifier. It must be a
subclass of Identifier<V>
.@ConsumerType public interface NestedCollectionResource<T,S,U extends Identifier<S>,V,W extends Identifier<V>> extends ItemResource<T,S,U>, NestedCollectionRouter<T,S,U,V,W>
Resources behave like an API, so you must add the API's name via the Representable.getName()
method.
The type param provided for the resource ID must be unique in the application.
Representors created by the method Representable.representor(com.liferay.apio.architect.representor.Representor.Builder)
hold all the information needed to write your domain models' hypermedia
representations.
You can add the different supported routes for the collection resource via
the method NestedCollectionRouter.collectionRoutes(
com.liferay.apio.architect.routes.NestedCollectionRoutes.Builder)
.
You can add the different supported routes for the single resource via the
ItemRouter.itemRoutes(com.liferay.apio.architect.routes.ItemRoutes.Builder)
method.
getName, representor
itemRoutes
collectionRoutes