Package io.levysworks.endpoints.pages
Class AdminPage
java.lang.Object
io.levysworks.endpoints.pages.AdminPage
Endpoint serving the admin interface, including the dashboard, user profiles, and user creation form.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Responseadmin()Handles GET requests to the admin page.jakarta.ws.rs.core.ResponseHandles GET requests to the create page.jakarta.ws.rs.core.ResponsehandleUserProfileRequest(String query_user) Handles GET requests for an individual user's profile page.
-
Constructor Details
-
AdminPage
public AdminPage()
-
-
Method Details
-
admin
Handles GET requests to the admin page.Renders system-wide admin dashboard with statistics, user/request/key data, and logs.
- Returns:
- HTML response with rendered admin view
- Throws:
SQLException- if a database access error occurs
-
handleUserProfileRequest
@GET @Path("/user/{query_user}") @Produces("text/html") public jakarta.ws.rs.core.Response handleUserProfileRequest(@PathParam("query_user") String query_user) throws SQLException Handles GET requests for an individual user's profile page.Retrieves user data and associated keys by UUID. If the user is not found, renders a not-found page.
- Parameters:
query_user- the UUID of the user- Returns:
- rendered HTML response with the user profile or not-found page
- Throws:
SQLException- if a database access error occurs
-
handleCreateUserAction
@GET @Path("/create") @Produces("text/html") public jakarta.ws.rs.core.Response handleCreateUserAction() throws SQLExceptionHandles GET requests to the create page.Renders user creation form.
- Returns:
- HTML response with rendered user creation form view
- Throws:
SQLException- if a database access error occurs
-