Interface EntityAttributeRegistrars
public interface EntityAttributeRegistrars
Contains common
AttributeRegistrar
returning functions
for things like EntityConfiguration
, EntityPropertyDescriptor
, EntityViewFactory
etc.- Since:
- 3.0.0
- Author:
- Arne Vandamme
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeRegistrar<EntityViewFactory>
Register a default view menu item with the registered path.static AttributeRegistrar<EntityViewFactory>
adminMenu
(String menuPath, Consumer<com.foreach.across.modules.web.menu.PathBasedMenuBuilder.PathBasedMenuItemBuilder> itemCustomizer) Register a default view menu item with the registered path.static <S> AttributeRegistrar<EntityViewFactory>
adminMenu
(Consumer<EntityAdminMenuEvent<S>> menuEventConsumer) Register a custom menu event consumer.static <U extends com.foreach.across.core.support.ReadableAttributes>
AttributeRegistrar<U>templateValue
(@NonNull EntityPropertyTemplateValueResolver resolver) Register aEntityPropertyTemplateValueResolver
that should be used to resolve the value for a template control of a property.static <U extends com.foreach.across.core.support.ReadableAttributes>
AttributeRegistrar<U>templateValue
(@NonNull Supplier<Object> supplier) Register a value supplier that should be used when fetching the value for a template control of a property.static <U extends com.foreach.across.core.support.ReadableAttributes>
AttributeRegistrar<U>templateValue
(Object value) Register a fixed value as the value that should be used for a template control of a property.
-
Method Details
-
adminMenu
Register a default view menu item with the registered path.- Parameters:
menuPath
- for the item- Returns:
- view attribute registrar
-
adminMenu
static AttributeRegistrar<EntityViewFactory> adminMenu(String menuPath, Consumer<com.foreach.across.modules.web.menu.PathBasedMenuBuilder.PathBasedMenuItemBuilder> itemCustomizer) Register a default view menu item with the registered path.- Parameters:
menuPath
- for the itemitemCustomizer
- for additional customization of the menu item- Returns:
- view attribute registrar
-
adminMenu
static <S> AttributeRegistrar<EntityViewFactory> adminMenu(Consumer<EntityAdminMenuEvent<S>> menuEventConsumer) Register a custom menu event consumer.- Type Parameters:
S
- entity type- Parameters:
menuEventConsumer
- for handling the menu- Returns:
- view attribute registrar
-
templateValue
static <U extends com.foreach.across.core.support.ReadableAttributes> AttributeRegistrar<U> templateValue(Object value) Register a fixed value as the value that should be used for a template control of a property. Mainly relevant for indexer property descriptors: list member, map key or map value.- Type Parameters:
U
- attribute target- Parameters:
value
- to use- Returns:
- attribute registrar
-
templateValue
static <U extends com.foreach.across.core.support.ReadableAttributes> AttributeRegistrar<U> templateValue(@NonNull @NonNull Supplier<Object> supplier) Register a value supplier that should be used when fetching the value for a template control of a property. Mainly relevant for indexer property descriptors: list member, map key or map value.- Type Parameters:
U
- attribute target- Parameters:
supplier
- to call- Returns:
- attribute registrar
-
templateValue
static <U extends com.foreach.across.core.support.ReadableAttributes> AttributeRegistrar<U> templateValue(@NonNull @NonNull EntityPropertyTemplateValueResolver resolver) Register aEntityPropertyTemplateValueResolver
that should be used to resolve the value for a template control of a property. Mainly relevant for indexer property descriptors: list member, map key or map value.- Type Parameters:
U
- attribute target- Parameters:
resolver
- to use- Returns:
- attribute registrar
-