TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/kenri89/PROYECTO_UTP_AED_1_1/llms.txt
Use this file to discover all available pages before exploring further.
PanelHistorial panel provides a reverse-chronological log of every enrollment operation performed during the current session. It is backed by PilaAcciones_U3 — a custom LIFO stack implemented as a singly-linked list, where each node holds an AccionMatricula record. Because the stack is traversed non-destructively for display (using a copy), the undo functionality in PanelMatricula remains fully operational even after the history panel has been viewed many times.
The AccionMatricula Record
Each entry in the stack captures two pieces of information: the type of operation and a snapshot of the Matricula object at the time it was performed.
| Field | Type | Values | Description |
|---|---|---|---|
tipo | String | "REGISTRO", "ELIMINACIÓN", "ACTUALIZACIÓN" | The action performed on the enrollment. |
matricula | Matricula | Any valid Matricula instance | The enrollment state captured at action time. |
How PilaAcciones_U3 Works
PilaAcciones_U3 is a custom singly-linked stack (not java.util.Stack). Each internal Nodo holds an AccionMatricula and a pointer to the next node. The tope field always points to the most recently pushed action.
Push — apilar()
Creates a new node, sets its
siguiente to the current tope, then advances tope to the new node. O(1).Pop — desapilar()
Reads the action at
tope, advances tope to tope.siguiente, and returns the action. Returns null if empty. O(1).Traverse — recorrer()
Iterates from
tope downward, passing each AccionMatricula to the provided Consumer. Non-destructive — tope is not modified. Used for audit display.Copy — copiar()
Creates a full structural copy in two passes (invert into auxiliary, re-invert into result) so the copy has the same top-to-bottom order as the original. Used by
PanelHistorial to avoid destroying the stack during display.Display in PanelHistorial
When the panel loads (or when Filtrar is clicked), cargarHistorial() calls pilaHistorial.copiar() to obtain a safe copy, then pops every action from the copy to populate the table. Because items are popped from the copy’s top, the most recent actions appear first:
Filtering by Student
A combo-box at the top of the panel (populated fromArbolEstudiantes.inorden()) allows filtering by carnet. Selecting a specific carnet shows only that student’s actions; selecting “Todos” shows the full history.
Access by Role
Panel visibility is controlled inMenuPrincipal based on Usuario.getRol():
| Role | Can see PanelHistorial? |
|---|---|
admin | ✅ Yes |
secretaria | ❌ No |
estudiante | ✅ Yes |
docente | ✅ Yes |
Session-Only Persistence
The history stack is session-scoped.
PilaAcciones_U3 lives entirely in heap memory — it is not written to any TSV file or SQL Server table. Closing and reopening the application resets it to an empty state. Only the underlying Matricula changes themselves are durable (via MatriculaDAO); the action log is ephemeral.