Class AbstractWritableAttributesAndViewsBuilder<T extends com.foreach.across.core.support.ReadableAttributes>
java.lang.Object
com.foreach.across.modules.entity.config.builders.AbstractWritableAttributesBuilder<T>
com.foreach.across.modules.entity.config.builders.AbstractWritableAttributesAndViewsBuilder<T>
- Direct Known Subclasses:
EntityAssociationBuilder
,EntityConfigurationBuilder
public abstract class AbstractWritableAttributesAndViewsBuilder<T extends com.foreach.across.core.support.ReadableAttributes>
extends AbstractWritableAttributesBuilder<T>
Support class for builders building types that implement
ConfigurableEntityViewRegistry
.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyViews
(ConfigurableEntityViewRegistry viewRegistry) Configure a default create form view builder for the entity being configured.createFormView
(Consumer<EntityViewFactoryBuilder> consumer) Configure the create form view builder for the entity being configured.Configure the form view builder for the default create and update forms of the entity being configured.protected abstract <U extends EntityViewFactoryBuilder>
UcreateViewFactoryBuilder
(Class<U> builderType) Configure a default delete view builder for the entity being configured.deleteFormView
(Consumer<EntityViewFactoryBuilder> consumer) Configure the default delete form view builder for the entity being configured.Configure a default detail view builder for the entity being configured.detailView
(Consumer<EntityViewFactoryBuilder> consumer) Configure the default detail view builder for the entity being configured.formView
(String viewName, Consumer<EntityViewFactoryBuilder> consumer) Configure the named form view builder for the entity being configured.protected abstract <U extends EntityViewFactoryBuilder>
voidinitializeViewFactoryBuilder
(String viewName, String templateName, U builder) listView()
Configure a default list view builder for the entity being configured.listView
(@NonNull String viewName, @NonNull Consumer<EntityListViewFactoryBuilder> consumer) Returns the named list view builder for the entity being configured.listView
(Consumer<EntityListViewFactoryBuilder> consumer) Configure the default list view builder for the entity being configured.Configure a default update form view builder for the entity being configured.updateFormView
(Consumer<EntityViewFactoryBuilder> consumer) Configure the default update form view builder for the entity being configured.view
(String viewName, Consumer<EntityViewFactoryBuilder> consumer) Configure the named simple view builder for the entity being configured.Methods inherited from class com.foreach.across.modules.entity.config.builders.AbstractWritableAttributesBuilder
applyAttributes, attribute, attribute, attribute, getAttributes
-
Constructor Details
-
AbstractWritableAttributesAndViewsBuilder
public AbstractWritableAttributesAndViewsBuilder()
-
-
Method Details
-
listView
Configure a default list view builder for the entity being configured. Does not customize the builder but ensures the view gets created using the default builder.- Returns:
- current builder
-
listView
public AbstractWritableAttributesAndViewsBuilder listView(Consumer<EntityListViewFactoryBuilder> consumer) Configure the default list view builder for the entity being configured. A default list view is usually available.- Parameters:
consumer
- for configuring the view builder- Returns:
- current builder
-
listView
public AbstractWritableAttributesAndViewsBuilder listView(@NonNull @NonNull String viewName, @NonNull @NonNull Consumer<EntityListViewFactoryBuilder> consumer) Returns the named list view builder for the entity being configured. If the view is not available, it will be created.- Parameters:
viewName
- name of the viewconsumer
- for configuring the view builder- Returns:
- builder instance
-
createOrUpdateFormView
public AbstractWritableAttributesAndViewsBuilder createOrUpdateFormView(Consumer<EntityViewFactoryBuilder> consumer) Configure the form view builder for the default create and update forms of the entity being configured. Create and update forms are usually available.- Parameters:
consumer
- for configuring the view builder- Returns:
- current builder
-
createFormView
Configure a default create form view builder for the entity being configured. Does not customize the builder but ensures the view gets created using the default builder.- Returns:
- current builder
-
createFormView
public AbstractWritableAttributesAndViewsBuilder createFormView(Consumer<EntityViewFactoryBuilder> consumer) Configure the create form view builder for the entity being configured. A default create form view is usually available.- Parameters:
consumer
- for configuring the view builder- Returns:
- current builder
-
updateFormView
Configure a default update form view builder for the entity being configured. Does not customize the builder but ensures the view gets created using the default builder.- Returns:
- current builder
-
updateFormView
public AbstractWritableAttributesAndViewsBuilder updateFormView(Consumer<EntityViewFactoryBuilder> consumer) Configure the default update form view builder for the entity being configured. A default update form view is usually available.- Parameters:
consumer
- for configuring the view builder- Returns:
- current builder
-
deleteFormView
Configure a default delete view builder for the entity being configured. Does not customize the builder but ensures the view gets created using the default builder.- Returns:
- current builder
-
deleteFormView
public AbstractWritableAttributesAndViewsBuilder deleteFormView(Consumer<EntityViewFactoryBuilder> consumer) Configure the default delete form view builder for the entity being configured. A default delete form view is usually available.- Parameters:
consumer
- for configuring the view builder- Returns:
- current builder
-
detailView
Configure a default detail view builder for the entity being configured. Does not customize the builder but ensures the view gets created using the default builder.- Returns:
- current builder
-
detailView
public AbstractWritableAttributesAndViewsBuilder detailView(Consumer<EntityViewFactoryBuilder> consumer) Configure the default detail view builder for the entity being configured. A default detail view is usually available.- Parameters:
consumer
- for configuring the view builder- Returns:
- current builder
-
formView
public AbstractWritableAttributesAndViewsBuilder formView(String viewName, Consumer<EntityViewFactoryBuilder> consumer) Configure the named form view builder for the entity being configured. If the view is not available, it will be created.- Parameters:
viewName
- name of the viewconsumer
- for configuring the view builder- Returns:
- current builder
-
view
public AbstractWritableAttributesAndViewsBuilder view(String viewName, Consumer<EntityViewFactoryBuilder> consumer) Configure the named simple view builder for the entity being configured. If the view is not available, it will be created.- Parameters:
viewName
- name of the viewconsumer
- for configuring the view builder- Returns:
- current builder
-
applyViews
-
createViewFactoryBuilder
protected abstract <U extends EntityViewFactoryBuilder> U createViewFactoryBuilder(Class<U> builderType) -
initializeViewFactoryBuilder
protected abstract <U extends EntityViewFactoryBuilder> void initializeViewFactoryBuilder(String viewName, String templateName, U builder)
-