Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/17Franco/CulturarteWeb/llms.txt

Use this file to discover all available pages before exploring further.

The /Colaboraciones and /bajaColaboracion servlets manage the full collaboration lifecycle on CulturarteWeb. A Colaborador can view all their active contributions to proposals through /Colaboraciones, and then cancel any unpaid collaboration at any time using /bajaColaboracion. Both endpoints communicate with the back-end via the ControllerWS SOAP service, whose connection details (host, port, and service path) are resolved at runtime from config.properties.

GET /Colaboraciones

Retrieves all collaborations associated with a given user nick and forwards the result to Colaboraciones.jsp for rendering.

Query parameters

nick
string
required
The username (nick) whose collaborations are to be listed. Passed directly to portU.colaboraciones(nick) on the SOAP service. The request is skipped entirely if this value is an empty string.
tipo
string
required
The user’s profile type (e.g. Colaborador or Proponente). This value is set as a request attribute and used by the JSP to conditionally render role-specific UI elements.

Behavior

  1. Reads WEB_SERVICES_HOST, WEB_SERVICES_PORT, and SERVICE from config.properties to build the WSDL URL dynamically.
  2. Calls portU.colaboraciones(nick) on the ControllerWS SOAP port, which returns a List<DtoColaboracion>.
  3. Sets the following request attributes before forwarding:
AttributeTypeValue
ColaboracionesList<DtoColaboracion>Full list of collaborations for the user
nickStringThe value of the nick query parameter
tipoStringThe value of the tipo query parameter
paginaStringThe literal string "Colaboraciones"
  1. Forwards the request to /Colaboraciones.jsp.
Only doGet is implemented — there is no doPost on this servlet.

Example request

GET /Colaboraciones?nick=juanperez&tipo=Colaborador HTTP/1.1
Host: localhost:8080

What Colaboraciones.jsp renders

The JSP iterates over the Colaboraciones attribute and renders a card for each entry. Each card displays the proposal title, amount, creation date, and chosen return type (TipoRetorno). The JSP also conditionally shows two action buttons for the logged-in owner of each collaboration:
  • Eliminar — triggers the bajaColaboracion.js script (DELETE via fetch) to cancel the collaboration.
  • Generar PDF de pago — visible only when colab.getDatosPago() != null (i.e., the collaboration has been paid). Opens a preview modal that POSTs to /GenerarConstancia.

DELETE /bajaColaboracion

Cancels (withdraws) a collaboration by its numeric ID. Invoked asynchronously by bajaColaboracion.js via fetch with method: 'DELETE'.

Query parameters

id
string
required
The numeric ID of the collaboration to cancel. Internally cast to Long and passed to portU.cancelarColaboracion(Long.valueOf(id)) on the SOAP service.

Behavior

  1. Sets the response Content-Type to application/json; charset=UTF-8.
  2. Calls portU.cancelarColaboracion(Long.valueOf(id)) on the SOAP port.
  3. Returns a JSON body in all cases:
On success:
{ "resp": true }
On failure (exception):
{ "resp": false, "error": "<exception message>" }
The front-end JavaScript (bajaColaboracion.js) removes the collaboration card from the DOM when resp is true, without reloading the page.

Example request

DELETE /bajaColaboracion?id=42 HTTP/1.1
Host: localhost:8080

Example success response

{ "resp": true }

Example error response

{ "resp": false, "error": "Colaboracion no encontrada con id: 42" }
A collaboration cannot be withdrawn after it has been paid. Once DtoColaboracion.getDatosPago() is non-null (i.e., a DtoPago record exists for the collaboration), the SOAP service will reject the cancellation. Ensure that users are shown the delete button only for unpaid collaborations.

Build docs developers (and LLMs) love