Skip to main content

Documentation 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.

The academic request system allows students to file formal petitions — such as certificate requests, career changes, or duplicate ID cards — through PanelSolicitudesEstudiante. Each petition enters a FIFO queue (java.util.Queue<Solicitud> backed by LinkedList), ensuring requests are processed in the order they were submitted. Administrators then work through the queue from PanelAdministradorSolicitudes, resolving each request and recording the resolution timestamp.

The Solicitud Data Model

Each request record captures the submission context and tracks its resolution state.
FieldTypeDescriptionDefault / Constraint
carnetStringCarnet of the student who submitted the request.Non-null (Guava checkNotNull)
tipoStringCategory of the request (see request types below).Non-null
descripcionStringFree-text detail from the student.Empty string if null (Guava Strings.nullToEmpty)
fechaLocalDateTimeSubmission timestamp — set to LocalDateTime.now().Set automatically on creation
atendidabooleanWhether the request has been resolved by an admin.false on creation
fechaAtencionLocalDateTimeResolution timestamp — set by the admin when processing.null until attended
The short constructor used when a student submits a new request:
public Solicitud(String carnet, String tipo, String descripcion) {
    this(carnet, tipo, descripcion, LocalDateTime.now(), false, null);
}

Available Request Types

The student panel offers the following types via a combo-box:
  • Certificado de matrícula
  • Constancia de estudiante activo
  • Cambio de carrera
  • Cambio de grupo o curso
  • Duplicado de carnet
  • Información adicional

Student Workflow — PanelSolicitudesEstudiante

1

Submit a Request

The student fills in their Carnet, selects a Tipo de solicitud from the combo-box, and enters a Descripción. Clicking Enviar Solicitud triggers the submission logic.The panel validates that carnet and descripcion are non-empty using Guava Strings.isNullOrEmpty, then creates the Solicitud and enqueues it:
// Validation via Guava
if (Strings.isNullOrEmpty(carnet) || Strings.isNullOrEmpty(descripcion)) {
    JOptionPane.showMessageDialog(this, "⚠️ Por favor completa todos los campos.");
    return;
}

Solicitud solicitud = new Solicitud(carnet, tipo, descripcion);
colaSolicitudes.offer(solicitud); // FIFO enqueue
A confirmation dialog displays the carnet, request type, and submission timestamp (formatted via getFechaFormateada()).
2

View Own Requests

The student’s request history is visible within the confirmation dialog shown immediately after submission. A full listing panel filtered by carnet can be built by iterating the queue and matching solicitud.getCarnet().equals(carnet).
In the current implementation, PanelSolicitudesEstudiante is a submission-only form. The admin panel (PanelAdministradorSolicitudes) holds the split-view of pending and attended requests.

Administrator Workflow — PanelAdministradorSolicitudes

The administrator panel is accessible only to users with the admin role. Access from MenuPrincipal checks the role before instantiating the panel:
if (!(rolClick.equals("admin") || rolClick.equals("administrador"))) {
    JOptionPane.showMessageDialog(this, "Acceso restringido solo para administradores.");
    return;
}
The panel is divided into two tables by a JSplitPane:

Solicitudes Pendientes

Lists all requests still in the queue (atendida = false), displayed in FIFO order. Columns: Carnet, Tipo, Descripción, Fecha de Envío.

Solicitudes Atendidas

Lists all requests resolved in the current session (moved out of the queue), stored in a local List<Solicitud>. Columns: Carnet, Tipo, Descripción, Fecha de Envío, Fecha de Atención.
1

View All Pending Requests

On load, actualizarTablas() iterates the Queue<Solicitud> (without consuming it) to populate the pending table. Requests appear in FIFO order — the oldest request is at the top.
for (Solicitud s : colaSolicitudes) {
    modeloPendientes.addRow(new Object[]{
        s.getCarnet(), s.getTipo(),
        s.getDescripcion(), s.getFechaFormateada()
    });
}
2

Mark as Attended

Click Atender Siguiente. The panel calls colaSolicitudes.poll() to dequeue the oldest request (FIFO), marks it as attended, records the resolution timestamp, and moves it to the attended list:
Solicitud s = colaSolicitudes.poll(); // removes from queue
s.setAtendida(true);
s.setFechaAtencion(LocalDateTime.now());
solicitudesAtendidas.add(s);
actualizarTablas(); // refreshes both tables
Both tables are immediately refreshed to reflect the change.

Queue Behaviour

The queue is instantiated in MenuPrincipal as a LinkedList and passed by reference to both panels:
// MenuPrincipal.java
private Queue<Solicitud> colaSolicitudes = new LinkedList<>();
OperationMethodEffect
Enqueueoffer(solicitud)Adds to the tail of the queue (student submission).
Inspectfor-eachIterates without consuming — used for table display.
Dequeuepoll()Removes and returns the head (admin resolution).
Check emptyisEmpty()Returns true if no pending requests remain.

Date Formatting

Solicitud exposes two formatted date helpers, both using the pattern "yyyy-MM-dd HH:mm":
// Submission timestamp
public String getFechaFormateada() {
    return fecha.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
}

// Resolution timestamp (empty string if not yet attended)
public String getFechaAtencionFormateada() {
    return (fechaAtencion != null)
        ? fechaAtencion.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))
        : "";
}
These methods are called directly by both panels when populating the table rows.

Persistence

PersistenciaAcademica can save and reload solicitudes to a tab-separated file (solicitudes.tsv) located under ~/.proyecto_utp_aed_datos/. The file has six tab-separated columns:
Column 1Column 2Column 3Column 4Column 5Column 6
carnettipodescripcionfecha (ISO_LOCAL_DATE_TIME)atendida (0/1)fechaAtencion (ISO_LOCAL_DATE_TIME or empty)
atendida is serialised as 0 (false) or 1 (true). fechaAtencion is an empty string when null. Dates use DateTimeFormatter.ISO_LOCAL_DATE_TIME (e.g. 2024-01-15T10:30:00).
The queue is shared in memory between PanelSolicitudesEstudiante and PanelAdministradorSolicitudes via the same Queue<Solicitud> reference held in MenuPrincipal. MenuPrincipal does not automatically call PersistenciaAcademica.guardar() — if the application is restarted without explicitly persisting, any queued but unattended requests that have not been saved will be lost.

Build docs developers (and LLMs) love