Interface Driver<T,E extends Editor<T,T>>
-
- All Known Implementing Classes:
GroupEditorDriver,RoleEditorDriver,UserEditorDriver
public interface Driver<T,E extends Editor<T,T>>A client side editor's driver.
Drivers are used to isolate the editors hierarchy from the edition logic for an instance of type
T.So do not matter the editors' concrete implementations, same driver can be used agains different client side editors reusing the edition logic.
- Since:
- 0.8.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidedit(T instance, E editor)Edit the instance using the given editor.booleanflush()Flush the editors hierarchy states and perform the validations.TgetValue()The instance after being flush with against the editors hierarchy.voidshow(T instance, E viewer)Show the instance using the given editor.
-
-
-
Method Detail
-
show
void show(T instance, E viewer)
Show the instance using the given editor.- Parameters:
instance- The instance to show.viewer- The viewer for the instance.
-
edit
void edit(T instance, E editor)
Edit the instance using the given editor.- Parameters:
instance- The instance to show.editor- The editor for the instance.
-
flush
boolean flush()
Flush the editors hierarchy states and perform the validations.- Returns:
- The validation violations, if any.
-
getValue
T getValue()
The instance after being flush with against the editors hierarchy.- Returns:
- The instance.
-
-