Index

A C D E F G H I J L M N P R S T U W 
All Classes and Interfaces|All Packages

A

Account - Class in io.github.sigmacasino.routes
The Account class handles the account route, displaying the user's account information.
Account(App) - Constructor for class io.github.sigmacasino.routes.Account
Constructs an Account route with the specified application.
addRoutes() - Method in class io.github.sigmacasino.App
Registers all routes in the routes array with Spark.
app - Variable in class io.github.sigmacasino.HTTPRoute
The App object that the route is associated with.
App - Class in io.github.sigmacasino
The main class of the Sigma Casino application.
App() - Constructor for class io.github.sigmacasino.App
The constructor of the App class.

C

checkValidEmail(String) - Method in class io.github.sigmacasino.App
Checks if an email is valid by ensuring it contains an "@" and a "." and is between 5 and 100 characters long.
checkValidUsername(String) - Method in class io.github.sigmacasino.routes.RegisterPost
Checks if the username is valid.
close() - Method in class io.github.sigmacasino.LocalDatabase
 
connect(String) - Method in class io.github.sigmacasino.LocalDatabase
Connects to the PostgreSQL database using the given password via JDBC.
connection - Variable in class io.github.sigmacasino.LocalDatabase
The JDBC connection to the PostgreSQL database.

D

database - Variable in class io.github.sigmacasino.LocalDatabase
The name of the database to connect to.
db - Variable in class io.github.sigmacasino.App
The database connection used by the application.
Docs - Class in io.github.sigmacasino.routes
The route for the docs main page.
Docs(App) - Constructor for class io.github.sigmacasino.routes.Docs
 
domain - Variable in class io.github.sigmacasino.App
The domain of the application, e.g.

E

ER - Class in io.github.sigmacasino.routes.docs
The route for the ER diagrams page.
ER(App) - Constructor for class io.github.sigmacasino.routes.docs.ER
 

F

fulfillCheckout(String) - Method in class io.github.sigmacasino.routes.StripeWebhook
Fulfills a Checkout Session if it is completed.

G

Games - Class in io.github.sigmacasino.routes
The route for the games page.
Games(App) - Constructor for class io.github.sigmacasino.routes.Games
 
generateSalt() - Method in class io.github.sigmacasino.routes.RegisterPost
Generates a random salt for password hashing.
getConnection() - Method in class io.github.sigmacasino.LocalDatabase
Gets the raw connection to the PostgreSQL database.
getDatabase() - Method in class io.github.sigmacasino.App
Returns the database connection used by the application.
getDatabaseName() - Method in class io.github.sigmacasino.LocalDatabase
Gets the name of the database to connect to.
getDomain() - Method in class io.github.sigmacasino.App
Returns the domain of the application, e.g.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.HTMLTemplateRoute
Returns the path to the Jinjava HTML template.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.Account
Returns the path to the HTML template for the account page.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.account.ResetPassword
Returns the path to the HTML template for the reset password page.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.ER
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.Docs
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.Interfaces
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.Requirements
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.RiskAnalysis
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.Structure
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.SystemArchitecture
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.TechStack
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.Tests
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.docs.UML
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.Games
 
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.games.Horses
Returns the path to the HTML template for the horse racing page.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.games.Roulette
Returns the path to the HTML template for the roulette game page.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.Login
Returns the path to the HTML template for the login page.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.Register
Returns the path to the HTML template for the registration page.
getHTMLTemplatePath(Request) - Method in class io.github.sigmacasino.routes.Root
 
getJinjava() - Method in class io.github.sigmacasino.App
Returns the Jinjava template engine used by the application.
getNotificationDefinitions() - Method in class io.github.sigmacasino.HTMLTemplateRoute
Returns a map of notification definitions to be used in the Jinjava HTML template.
getNotificationDefinitions() - Method in class io.github.sigmacasino.routes.Account
 
getNotificationDefinitions() - Method in class io.github.sigmacasino.routes.account.ResetPassword
 
getNotificationDefinitions() - Method in class io.github.sigmacasino.routes.games.Horses
 
getNotificationDefinitions() - Method in class io.github.sigmacasino.routes.games.Roulette
 
getNotificationDefinitions() - Method in class io.github.sigmacasino.routes.Login
 
getNotificationDefinitions() - Method in class io.github.sigmacasino.routes.Register
 
getPort() - Method in class io.github.sigmacasino.LocalDatabase
Gets the port number of the PostgreSQL database.
GetRoute - Class in io.github.sigmacasino
A route that handles GET requests.
GetRoute(App, String) - Constructor for class io.github.sigmacasino.GetRoute
Creates a new GET route.
getUser() - Method in class io.github.sigmacasino.LocalDatabase
Gets the username to connect to the PostgreSQL database.

H

handle(Request, Response) - Method in class io.github.sigmacasino.GetRoute
Handles a GET request by running super.handle() and then calling handleGet().
handle(Request, Response) - Method in class io.github.sigmacasino.HTTPRoute
Handles the request and returns the response.
handle(Request, Response) - Method in class io.github.sigmacasino.PostRoute
Runs super.handle() and then calls handlePost().
handleGet(Request, Response) - Method in class io.github.sigmacasino.GetRoute
Handles a GET request.
handleGet(Request, Response) - Method in class io.github.sigmacasino.HTMLTemplateRoute
Renders a Jinjava HTML template.
handleGet(Request, Response) - Method in class io.github.sigmacasino.routes.account.StripeResult
Redirects the user to the account page with a success or error message.
handleGet(Request, Response) - Method in class io.github.sigmacasino.routes.Index
Redirects the user to the main page.
handleGet(Request, Response) - Method in class io.github.sigmacasino.routes.Logout
Handles the GET request for logging out the user.
handlePost(Request, Response) - Method in class io.github.sigmacasino.PostRoute
Handles a POST request.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.account.ResetPasswordPost
Handles the POST request to reset the user's password.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.account.StripeDeposit
Initiates a Stripe purchase session and redirects the user to the Stripe Checkout page.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.account.StripeWithdraw
Currently redirects the user to the result page with an error.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.games.HorsesPost
Handles the POST request for the horse racing game.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.games.RoulettePost
Handles the POST request for the roulette game.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.LoginPost
Handles the POST request for the login form submission.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.RegisterPost
Handles the POST request for the registration form submission.
handlePost(Request, Response) - Method in class io.github.sigmacasino.routes.StripeWebhook
Handles a POST request to the Stripe webhook endpoint.
hashPassword(String, String) - Method in class io.github.sigmacasino.App
Hashes a password using the SHA-256 algorithm and a salt.
Horses - Class in io.github.sigmacasino.routes.games
Handles the "/games/horses" route, fetching horse race data based on a replay ID and populating the HTML template with the race details or an error flag.
Horses(App) - Constructor for class io.github.sigmacasino.routes.games.Horses
Initializes the route handler with the app instance and sets the route path.
HorsesPost - Class in io.github.sigmacasino.routes.games
Handles the "/games/horses" POST request, managing user bets, updating the user's balance, and registering a new horse racing game.
HorsesPost(App) - Constructor for class io.github.sigmacasino.routes.games.HorsesPost
Initializes the route handler with the app instance and sets the route path.
HTMLTemplateRoute - Class in io.github.sigmacasino
A GET route that renders a Jinjava HTML template.
HTMLTemplateRoute(App, String) - Constructor for class io.github.sigmacasino.HTMLTemplateRoute
Creates a new HTMLTemplateRoute.
HTTPRoute - Class in io.github.sigmacasino
HTTPRoute is an abstract class that represents a route in the HTTP server.
HTTPRoute(App, String) - Constructor for class io.github.sigmacasino.HTTPRoute
Constructor for the HTTPRoute class.

I

Index - Class in io.github.sigmacasino.routes
Redirects the user to the main page.
Index(App) - Constructor for class io.github.sigmacasino.routes.Index
 
initializeDatabase() - Method in class io.github.sigmacasino.App
Initializes the database connection using the environment variables.
initializeSpark() - Method in class io.github.sigmacasino.App
Initializes the Spark web server by setting the port and the static files location.
initializeStripe() - Method in class io.github.sigmacasino.App
Initializes the Stripe API with the secret key generated in the Dashboard.
Interfaces - Class in io.github.sigmacasino.routes.docs
The route for the interfaces documentation page.
Interfaces(App) - Constructor for class io.github.sigmacasino.routes.docs.Interfaces
 
io.github.sigmacasino - package io.github.sigmacasino
Root package of the application.
io.github.sigmacasino.routes - package io.github.sigmacasino.routes
Classes that define the main routes of the casino.
io.github.sigmacasino.routes.account - package io.github.sigmacasino.routes.account
Classes that handle account-related routes.
io.github.sigmacasino.routes.docs - package io.github.sigmacasino.routes.docs
Classes for routes documenting the project.
io.github.sigmacasino.routes.games - package io.github.sigmacasino.routes.games
Classes that handle games the casino offers.

J

jinjava - Variable in class io.github.sigmacasino.App
The Jinjava template engine used by the application.

L

LocalDatabase - Class in io.github.sigmacasino
A simple wrapper around a PostgreSQL database connection.
LocalDatabase(int, String, String, String) - Constructor for class io.github.sigmacasino.LocalDatabase
Creates a new LocalDatabase object and connects to the PostgreSQL database.
logger - Variable in class io.github.sigmacasino.App
The logger for this class.
logger - Variable in class io.github.sigmacasino.LocalDatabase
The logger for this class.
logger - Variable in class io.github.sigmacasino.routes.account.ResetPasswordPost
The logger for the ResetPasswordPost class.
logger - Variable in class io.github.sigmacasino.routes.games.HorsesPost
The logger used to log the user's horse racing games.
logger - Variable in class io.github.sigmacasino.routes.games.RoulettePost
The logger for the RoulettePost class.
logger - Variable in class io.github.sigmacasino.routes.LoginPost
The logger for this class.
logger - Variable in class io.github.sigmacasino.routes.RegisterPost
The logger for this class.
logger - Variable in class io.github.sigmacasino.routes.StripeWebhook
The logger used to log events from this class.
Login - Class in io.github.sigmacasino.routes
The Login class handles the GET request for displaying the login page.
Login(App) - Constructor for class io.github.sigmacasino.routes.Login
Constructs a Login route with the specified application.
LoginPost - Class in io.github.sigmacasino.routes
The LoginPost class handles the POST request for processing the login form submission.
LoginPost(App) - Constructor for class io.github.sigmacasino.routes.LoginPost
Constructs a LoginPost route with the specified application.
loginRequired - Variable in class io.github.sigmacasino.HTTPRoute
Whether the route requires the user to be logged in.
Logout - Class in io.github.sigmacasino.routes
The Logout class handles the GET request for logging out the user.
Logout(App) - Constructor for class io.github.sigmacasino.routes.Logout
Constructs a Logout route with the specified application.

M

main(String[]) - Static method in class io.github.sigmacasino.App
The main method of the application.

N

notificationDefinitions - Variable in class io.github.sigmacasino.HTMLTemplateRoute
A map of notification definitions to be used in the Jinjava HTML template.

P

parseBodyParams(Request) - Static method in class io.github.sigmacasino.PostRoute
Parses the body of a POST request into a map of key-value pairs.
passwordHasher - Variable in class io.github.sigmacasino.App
The SHA-256 password hasher used by the application.
path - Variable in class io.github.sigmacasino.HTTPRoute
The path of the route, e.g.
populateContext(Request, Response) - Method in class io.github.sigmacasino.HTMLTemplateRoute
Returns additional context to populate the Jinjava HTML template with.
populateContext(Request, Response) - Method in class io.github.sigmacasino.routes.Account
Populates the context for the account page with the user's balance as "balance" and recent transactions, including deposits, withdrawals and game results, as a submap containing operation type, identifier, date and amount.
populateContext(Request, Response) - Method in class io.github.sigmacasino.routes.docs.ER
 
populateContext(Request, Response) - Method in class io.github.sigmacasino.routes.games.Horses
Populates the template context with race data (date, bet amount, user's guess, horse times, and Bezier curves) or redirects the user on error with a correct flag in the URL.
populateContext(Request, Response) - Method in class io.github.sigmacasino.routes.games.Roulette
Populates the template context with roulette game data (date, bet amount, guess, result) or redirects the user on error with a correct flag in the URL.
port - Variable in class io.github.sigmacasino.App
The port on which the application will listen for incoming connections.
port - Variable in class io.github.sigmacasino.LocalDatabase
The port number of the PostgreSQL database.
PostRoute - Class in io.github.sigmacasino
A route that handles POST requests.
PostRoute(App, String) - Constructor for class io.github.sigmacasino.PostRoute
Constructs a new PostRoute.
postRouteLogger - Static variable in class io.github.sigmacasino.PostRoute
The logger for the PostRoute class.
prepareStatement(String) - Method in class io.github.sigmacasino.LocalDatabase
Prepares a statement for the given SQL template.
priceIdentifier - Variable in class io.github.sigmacasino.routes.account.StripeDeposit
 

R

readResource(String) - Method in class io.github.sigmacasino.App
Reads a resource file from the resources directory and returns its contents as a string.
Register - Class in io.github.sigmacasino.routes
The Register class handles the GET request for displaying the registration page.
Register(App) - Constructor for class io.github.sigmacasino.routes.Register
Constructs a Register route with the specified application.
RegisterPost - Class in io.github.sigmacasino.routes
The RegisterPost class handles the POST request for processing the registration form submission.
RegisterPost(App) - Constructor for class io.github.sigmacasino.routes.RegisterPost
Constructs a RegisterPost route with the specified application.
registerSparkRoute() - Method in class io.github.sigmacasino.GetRoute
 
registerSparkRoute() - Method in class io.github.sigmacasino.HTTPRoute
Registers the route with Spark.
registerSparkRoute() - Method in class io.github.sigmacasino.PostRoute
 
Requirements - Class in io.github.sigmacasino.routes.docs
The route for the requirements page.
Requirements(App) - Constructor for class io.github.sigmacasino.routes.docs.Requirements
 
ResetPassword - Class in io.github.sigmacasino.routes.account
The ResetPassword class handles the GET request for displaying the reset password page.
ResetPassword(App) - Constructor for class io.github.sigmacasino.routes.account.ResetPassword
Constructs a ResetPassword route with the specified application.
ResetPasswordPost - Class in io.github.sigmacasino.routes.account
The ResetPasswordPost class handles the POST request for resetting a user's password.
ResetPasswordPost(App) - Constructor for class io.github.sigmacasino.routes.account.ResetPasswordPost
Constructs a ResetPasswordPost route with the specified application.
RiskAnalysis - Class in io.github.sigmacasino.routes.docs
The route for the risk analysis documentation page.
RiskAnalysis(App) - Constructor for class io.github.sigmacasino.routes.docs.RiskAnalysis
 
Root - Class in io.github.sigmacasino.routes
The root route of the application (empty path).
Root(App) - Constructor for class io.github.sigmacasino.routes.Root
 
Roulette - Class in io.github.sigmacasino.routes.games
Handles the "/games/roulette" route, fetching roulette game data based on a replay ID and populating the HTML template with the game details or an error flag.
Roulette(App) - Constructor for class io.github.sigmacasino.routes.games.Roulette
Initializes the route handler with the app instance and sets the route path.
rouletteItems - Variable in class io.github.sigmacasino.routes.games.RoulettePost
A map of roulette numbers and their corresponding colors.
RoulettePost - Class in io.github.sigmacasino.routes.games
Handles the "/games/roulette" POST request, processing user bets, updating the user's balance, and registering a new roulette game result.
RoulettePost(App) - Constructor for class io.github.sigmacasino.routes.games.RoulettePost
Initializes the route handler with the app instance and sets the route path.
routes - Variable in class io.github.sigmacasino.App
An array of routes that the application will handle.
run() - Method in class io.github.sigmacasino.App
Initializes the application by setting up the database, Spark, Stripe, and routes.
runScript(String) - Method in class io.github.sigmacasino.LocalDatabase
Runs the given SQL script by splitting it into individual queries and executing them in a batch statement.

S

saltGenerator - Variable in class io.github.sigmacasino.routes.RegisterPost
A random number generator for generating salts.
StripeDeposit - Class in io.github.sigmacasino.routes.account
A post route which initiates a Stripe payment session.
StripeDeposit(App) - Constructor for class io.github.sigmacasino.routes.account.StripeDeposit
 
StripeResult - Class in io.github.sigmacasino.routes.account
A route that shows the result of a Stripe payment to the user.
StripeResult(App) - Constructor for class io.github.sigmacasino.routes.account.StripeResult
 
StripeWebhook - Class in io.github.sigmacasino.routes
A route that listens for Stripe events.
StripeWebhook(App) - Constructor for class io.github.sigmacasino.routes.StripeWebhook
 
StripeWithdraw - Class in io.github.sigmacasino.routes.account
A post route which initiates a Stripe payout.
StripeWithdraw(App) - Constructor for class io.github.sigmacasino.routes.account.StripeWithdraw
 
Structure - Class in io.github.sigmacasino.routes.docs
The route for the project structure page.
Structure(App) - Constructor for class io.github.sigmacasino.routes.docs.Structure
 
SystemArchitecture - Class in io.github.sigmacasino.routes.docs
The route for the games page.
SystemArchitecture(App) - Constructor for class io.github.sigmacasino.routes.docs.SystemArchitecture
 

T

TechStack - Class in io.github.sigmacasino.routes.docs
The route for the tech stack documentation page.
TechStack(App) - Constructor for class io.github.sigmacasino.routes.docs.TechStack
 
Tests - Class in io.github.sigmacasino.routes.docs
The route for the tests documentation page.
Tests(App) - Constructor for class io.github.sigmacasino.routes.docs.Tests
 

U

UML - Class in io.github.sigmacasino.routes.docs
The route for the UML diagrams page.
UML(App) - Constructor for class io.github.sigmacasino.routes.docs.UML
 
user - Variable in class io.github.sigmacasino.LocalDatabase
The username to connect to the PostgreSQL database.

W

webhookSecret - Variable in class io.github.sigmacasino.routes.StripeWebhook
The webhook secret used to verify events.
A C D E F G H I J L M N P R S T U W 
All Classes and Interfaces|All Packages