Interface MutableEntityConfiguration<T>
- All Superinterfaces:
org.springframework.core.AttributeAccessor
,ConfigurableEntityViewRegistry
,EntityConfiguration<T>
,EntityViewRegistry
,com.foreach.across.core.support.ReadableAttributes
,com.foreach.across.core.support.WritableAttributes
- All Known Implementing Classes:
EntityConfigurationImpl
public interface MutableEntityConfiguration<T>
extends EntityConfiguration<T>, com.foreach.across.core.support.WritableAttributes, ConfigurableEntityViewRegistry
Manageable version of a
EntityConfiguration
,
implementations must allow the configuration to be modified through this interface, without
changing the core properties like EntityConfiguration.getEntityType()
and EntityConfiguration.getName()
.- Since:
- 1.0.0
- Author:
- Arne Vandamme
-
Method Summary
Modifier and TypeMethodDescriptionassociation
(String name) Retrieve a named association as aMutableEntityAssociation
.createAssociation
(String name) Register a new association with a specific name.Get the property registry as aMutableEntityPropertyRegistry
.void
setAllowableActionsBuilder
(EntityConfigurationAllowableActionsBuilder allowableActionsBuilder) Set the builder for theAllowableActions
of this entity configuration.void
setDisplayName
(String displayName) Set the default display name for this entity type.void
setEntityMessageCodeResolver
(EntityMessageCodeResolver entityMessageCodeResolver) Set the message code resolver.void
setEntityModel
(EntityModel<T, Serializable> entityModel) Set theEntityModel
for interacting with the entity repository.void
setHidden
(boolean hidden) Should this configuration be shown in UI implementations?void
setPropertyRegistry
(MutableEntityPropertyRegistry propertyRegistry) Set the property registry for this configuration.Methods inherited from interface org.springframework.core.AttributeAccessor
attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttribute
Methods inherited from interface com.foreach.across.modules.entity.registry.ConfigurableEntityViewRegistry
registerView, removeView
Methods inherited from interface com.foreach.across.modules.entity.registry.EntityConfiguration
getAllowableActions, getAllowableActions, getAssociations, getDisplayName, getEntityMessageCodeResolver, getEntityModel, getEntityType, getId, getIdType, getLabel, getName, hasEntityModel, isHidden, isNew
Methods inherited from interface com.foreach.across.modules.entity.registry.EntityViewRegistry
getViewFactory, getViewNames, hasView
Methods inherited from interface com.foreach.across.core.support.ReadableAttributes
attributeMap, attributeNames, getAttribute, getAttribute, getAttribute, hasAttribute, hasAttribute
Methods inherited from interface com.foreach.across.core.support.WritableAttributes
removeAttribute, setAttribute, setAttributes
-
Method Details
-
setDisplayName
Set the default display name for this entity type.- Parameters:
displayName
- value
-
setHidden
void setHidden(boolean hidden) Should this configuration be shown in UI implementations?- Parameters:
hidden
- true if this configuration should not be shown in UI implementations
-
setEntityModel
Set theEntityModel
for interacting with the entity repository. Required for auto-generated administration UI.- Parameters:
entityModel
- instance
-
setPropertyRegistry
Set the property registry for this configuration.- Parameters:
propertyRegistry
- instancce
-
setEntityMessageCodeResolver
Set the message code resolver.- Parameters:
entityMessageCodeResolver
- instance
-
setAllowableActionsBuilder
Set the builder for theAllowableActions
of this entity configuration.- Parameters:
allowableActionsBuilder
- instance
-
association
Retrieve a named association as aMutableEntityAssociation
.- Specified by:
association
in interfaceEntityConfiguration<T>
- Parameters:
name
- of the association- Returns:
- mutable instance of the association (or null if non existing)
-
getPropertyRegistry
MutableEntityPropertyRegistry getPropertyRegistry()Get the property registry as aMutableEntityPropertyRegistry
.- Specified by:
getPropertyRegistry
in interfaceEntityConfiguration<T>
- Returns:
- mutable instance of the property registry
-
createAssociation
Register a new association with a specific name. Should return any already existing association with that name.- Parameters:
name
- of the association- Returns:
- mutable instance of the association
-
getAllowableActionsBuilder
EntityConfigurationAllowableActionsBuilder getAllowableActionsBuilder()- Returns:
- the allowable actions builder instance
-