Interface SirenEntityRelProvider
-
public interface SirenEntityRelProvider
SPI to provide information about the relationship of a Siren entity to it's parent.- Since:
- 1.0.0
- Author:
- Ingo Griebsch
- See Also:
- Siren Entity Rel
-
-
Field Summary
Fields Modifier and Type Field Description static SirenEntityRelProvider
DEFAULT_INSTANCE
The default instance that can be used if no specific implementation of this interface is necessary.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default List<org.springframework.hateoas.LinkRelation>
get(@NonNull org.springframework.hateoas.RepresentationModel<?> model, org.springframework.hateoas.RepresentationModel<?> parent)
Returns therelations
explaining the relationship between the model and it's parent.
-
-
-
Field Detail
-
DEFAULT_INSTANCE
static final SirenEntityRelProvider DEFAULT_INSTANCE
The default instance that can be used if no specific implementation of this interface is necessary.
-
-
Method Detail
-
get
default List<org.springframework.hateoas.LinkRelation> get(@NonNull @NonNull org.springframework.hateoas.RepresentationModel<?> model, @Nullable org.springframework.hateoas.RepresentationModel<?> parent)
Returns therelations
explaining the relationship between the model and it's parent.The default implementation returns the
item
relation if the model is a child object.- Parameters:
model
- theRepresentationModel
that is transfered into a Siren entity. Is never null.parent
- the parentRepresentationModel
of the model. Can be null.- Returns:
- the
relations
explaining the relationship between the model and it's parent.
-
-