Interface ModuleEditHandler<T>
- Type Parameters:
T- module type handled by this service
public interface ModuleEditHandler<T>
Application service contract for edit form rendering, update handling, and delete handling.
Framework boundary: SimplyPages invokes these hooks but does not decide persistence model, approval workflow, or authorization policy.
-
Method Summary
Modifier and TypeMethodDescriptionhandleDelete(String moduleId, EditMode editMode) Handles delete request for a module id.Handles submitted edit payload.renderEditForm(String moduleId) Renders edit UI for a module id.
-
Method Details
-
renderEditForm
-
handleUpdate
Handles submitted edit payload.Implementations typically branch on
editModeto either apply immediately or enqueue approval. Returned component is rendered back to caller/HTMX target.- Parameters:
moduleId- the unique identifier of the module being updatededitData- the submitted edit data (form field name → value)editMode- the edit mode (USER_EDIT or OWNER_EDIT)- Returns:
- Updated module (OWNER_EDIT) or approval message (USER_EDIT)
-
handleDelete
Handles delete request for a module id.Implementations may apply immediate deletion or return approval-state feedback based on
editMode.- Parameters:
moduleId- the unique identifier of the module to deleteeditMode- the edit mode (USER_EDIT or OWNER_EDIT)- Returns:
- Empty component (OWNER_EDIT) or confirmation message (USER_EDIT)
-