Class EntityViewLinks
java.lang.Object
com.foreach.across.modules.entity.web.links.EntityViewLinks
Central component for building links to EntityModule views.
A bean of this type is automatically created when AdminWebModule is active,
see
AdminWebConfiguration
.- Since:
- 3.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlinkTo
(EntityConfiguration<?> entityConfiguration) Create a link builder to an entity configuration.Create a link builder to an entity type page.Create a link builder to theEntityView.DETAIL_VIEW_NAME
view for a single entity.Create a link builder for a basic entity type (by name).void
setConversionService
(org.springframework.core.convert.ConversionService conversionService) Set theConversionService
that should be used for converting id objects to string.void
setWebAppLinkBuilder
(com.foreach.across.modules.web.context.WebAppLinkBuilder webAppLinkBuilder) Set theWebAppLinkBuilder
to be used for building the URI string of a link.
-
Constructor Details
-
EntityViewLinks
-
-
Method Details
-
setConversionService
@Autowired(required=false) @Qualifier("mvcConversionService") public void setConversionService(org.springframework.core.convert.ConversionService conversionService) Set theConversionService
that should be used for converting id objects to string. If none is set, thetoString()
method of an object will be used.- Parameters:
conversionService
- to use
-
setWebAppLinkBuilder
@Autowired(required=false) public void setWebAppLinkBuilder(com.foreach.across.modules.web.context.WebAppLinkBuilder webAppLinkBuilder) Set theWebAppLinkBuilder
to be used for building the URI string of a link.- Parameters:
webAppLinkBuilder
- builder
-
linkTo
Create a link builder to an entity type page.- Parameters:
entityType
- type of entity- Returns:
- link builder
-
linkTo
Create a link builder for a basic entity type (by name).- Parameters:
entityName
- of the entity type- Returns:
- link builder
-
linkTo
Create a link builder to theEntityView.DETAIL_VIEW_NAME
view for a single entity.- Parameters:
entity
- instance- Returns:
- link builder
-
linkTo
public EntityViewLinkBuilder.ForEntityConfiguration linkTo(EntityConfiguration<?> entityConfiguration) Create a link builder to an entity configuration.- Parameters:
entityConfiguration
- type of entity- Returns:
- link builder
-