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.voidsetAllowableActionsBuilder(EntityConfigurationAllowableActionsBuilder allowableActionsBuilder) Set the builder for theAllowableActionsof this entity configuration.voidsetDisplayName(String displayName) Set the default display name for this entity type.voidsetEntityMessageCodeResolver(EntityMessageCodeResolver entityMessageCodeResolver) Set the message code resolver.voidsetEntityModel(EntityModel<T, Serializable> entityModel) Set theEntityModelfor interacting with the entity repository.voidsetHidden(boolean hidden) Should this configuration be shown in UI implementations?voidsetPropertyRegistry(MutableEntityPropertyRegistry propertyRegistry) Set the property registry for this configuration.Methods inherited from interface org.springframework.core.AttributeAccessor
attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttributeMethods inherited from interface com.foreach.across.modules.entity.registry.ConfigurableEntityViewRegistry
registerView, removeViewMethods inherited from interface com.foreach.across.modules.entity.registry.EntityConfiguration
getAllowableActions, getAllowableActions, getAssociations, getDisplayName, getEntityMessageCodeResolver, getEntityModel, getEntityType, getId, getIdType, getLabel, getName, hasEntityModel, isHidden, isNewMethods inherited from interface com.foreach.across.modules.entity.registry.EntityViewRegistry
getViewFactory, getViewNames, hasViewMethods inherited from interface com.foreach.across.core.support.ReadableAttributes
attributeMap, attributeNames, getAttribute, getAttribute, getAttribute, hasAttribute, hasAttributeMethods 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 theEntityModelfor 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 theAllowableActionsof this entity configuration.- Parameters:
allowableActionsBuilder- instance
-
association
Retrieve a named association as aMutableEntityAssociation.- Specified by:
associationin 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:
getPropertyRegistryin 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
-