Interface InjectableViewEntity
-
- All Superinterfaces:
ViewEntity
- All Known Implementing Classes:
ConcreteInjectableViewEntity
public interface InjectableViewEntity extends ViewEntity
AnViewEntity
that is capable of injecting its state into a target instance of the entity's model type.- Author:
- Carl Harris
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
InjectableViewEntity.Injector
A collaborator that injects a value into a target object.static interface
InjectableViewEntity.ValueInjector
A collaborator that injects a value into a target object.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
inject(Object target, ScopedViewContext context)
Injects the properties of this entity into a model object.void
put(String name, Object value, InjectableViewEntity.Injector injector)
Puts a property into this entity.-
Methods inherited from interface org.soulwing.prospecto.api.ViewEntity
get, get, getType, inject, nameSet, navigateTo, put, remove
-
-
-
-
Method Detail
-
put
void put(String name, Object value, InjectableViewEntity.Injector injector)
Puts a property into this entity.- Parameters:
name
- name of the propertyvalue
- property valueinjector
- that will be used to injectvalue
into a target model object
-
inject
void inject(Object target, ScopedViewContext context) throws Exception
Injects the properties of this entity into a model object.- Parameters:
target
- the target model objectcontext
- view context- Throws:
Exception
-
-