Index

A B C D E F G I K L M P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

ADMIN - Enum constant in enum class com.example.demo.appuser.AppUserRole
Administrative user role with full access and management privileges.
App - Class in com.example.demo.calorie
The main application class for the calorie tracker.
App() - Constructor for class com.example.demo.calorie.App
 
AppUser - Class in com.example.demo.appuser
Represents a user entity in the application, implementing Spring Security's UserDetails interface.
AppUser(String, String, String, String, AppUserRole) - Constructor for class com.example.demo.appuser.AppUser
Constructs a new AppUser with essential details.
AppUserRole - Enum Class in com.example.demo.appuser
Enumeration representing the predefined roles (authorities) a user can have within the application.
AppUserService - Class in com.example.demo.appuser
Service class that manages business logic for AppUser entities.
AppUserService() - Constructor for class com.example.demo.appuser.AppUserService
 

B

bCryptPasswordEncoder() - Method in class com.example.demo.security.PasswordEncoder
Creates and gives a BCryptPasswordEncoder to the Spring application context.

C

CalorieLog - Class in com.example.demo.calorie
Represents a single log entry in a user's calorie diary.
CalorieLog() - Constructor for class com.example.demo.calorie.CalorieLog
 
CalorieLogRepository - Interface in com.example.demo.calorie
Repository interface for CalorieLog entities.
CaloriePrompts - Class in com.example.demo.calorie
Provides static methods for displaying prompts and reading user input from the console.
CaloriePrompts() - Constructor for class com.example.demo.calorie.CaloriePrompts
 
CalorieUtil - Class in com.example.demo.calorie
Utility class containing shared resources and constants used across the calorie package.
CalorieUtil() - Constructor for class com.example.demo.calorie.CalorieUtil
 
com.example.demo - package com.example.demo
 
com.example.demo.appuser - package com.example.demo.appuser
 
com.example.demo.calorie - package com.example.demo.calorie
 
com.example.demo.db - package com.example.demo.db
 
com.example.demo.email - package com.example.demo.email
 
com.example.demo.registration - package com.example.demo.registration
 
com.example.demo.registration.token - package com.example.demo.registration.token
 
com.example.demo.security - package com.example.demo.security
 
com.example.demo.security.config - package com.example.demo.security.config
 
confirm(String) - Method in class com.example.demo.registration.RegistrationController
Confirms a user's account using a unique confirmation token.
ConfirmationToken - Class in com.example.demo.registration.token
JPA Entity representing a confirmation token.
ConfirmationToken(String, LocalDateTime, LocalDateTime, AppUser) - Constructor for class com.example.demo.registration.token.ConfirmationToken
Constructs a new ConfirmationToken instance.
ConfirmationTokenRepository - Interface in com.example.demo.registration.token
Repository interface for entities.
ConfirmationTokenService - Class in com.example.demo.registration.token
Service class that handles the core business logic for ConfirmationToken operations.
ConfirmationTokenService() - Constructor for class com.example.demo.registration.token.ConfirmationTokenService
 
confirmToken(String) - Method in class com.example.demo.registration.RegistrationService
Confirms the account registration using a valid token.

D

daoAuthenticationProvider() - Method in class com.example.demo.security.config.WebSecurityConfig
 
DemoApplication - Class in com.example.demo
The main application class for the Spring Boot project.
DemoApplication() - Constructor for class com.example.demo.DemoApplication
 

E

EmailSender - Interface in com.example.demo.email
Interface defining the functionality for sending emails, for sending a plain text or HTML email to a specified recipient.
EmailService - Class in com.example.demo.email
Concrete implementation of the EmailSender interface, utilizing Spring Boot's JavaMailSender to dispatch emails.
EmailService() - Constructor for class com.example.demo.email.EmailService
 
EmailValidator - Class in com.example.demo.registration
Service class that implements the Predicate interface to validate the format of an email address.
EmailValidator() - Constructor for class com.example.demo.registration.EmailValidator
 
enableAppUser(String) - Method in class com.example.demo.appuser.AppUserService
Activates a user account by setting the enabled status to true.
enableAppUser(String) - Method in interface com.example.demo.appuser.UserRepository
Updates the enabled status of an AppUser to TRUE based on their email.

F

findByEmail(String) - Method in interface com.example.demo.appuser.UserRepository
Finds a user by their unique email address.
findByToken(String) - Method in interface com.example.demo.registration.token.ConfirmationTokenRepository
Finds a confirmation token by its unique token string value.
findByUser(AppUser) - Method in interface com.example.demo.calorie.CalorieLogRepository
Retrieves a list of all CalorieLog entries associated with the specified AppUser.
findByUserId(Long) - Method in interface com.example.demo.calorie.CalorieLogRepository
Retrieves a list of all CalorieLog entries associated with the specified user ID.
findByUserIdAndLogDate(Long, LocalDate) - Method in interface com.example.demo.calorie.CalorieLogRepository
Retrieves a list of all CalorieLog entries for a specific user on a specific date.
firstName() - Method in enum class com.example.demo.appuser.AppUserRole
Eventualy will return first name right now just has holder
food() - Static method in class com.example.demo.calorie.CaloriePrompts
Prompts the user to enter the date and the name of the food or drink item to be logged.

G

getAuthorities() - Method in class com.example.demo.appuser.AppUser
Retrieves the authorities (roles) granted to the user.
getCalories() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the total caloric count.
getCarbs() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the amount of carbohydrates in grams.
getFat() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the amount of fat in grams.
getLogDate() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the date of this log entry.
getMealType() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the type of meal logged.
getPassword() - Method in class com.example.demo.appuser.AppUser
Retrieves the password used to authenticate the user.
getProtein() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the amount of protein in grams.
getToken(String) - Method in class com.example.demo.registration.token.ConfirmationTokenService
Retrieves a confirmation token by its unique token string.
getUser() - Method in class com.example.demo.calorie.CalorieLog
Retrieves the user associated with this calorie log.
getUsername() - Method in class com.example.demo.appuser.AppUser
Retrieves the username used to authenticate the user.

I

isAccountNonExpired() - Method in class com.example.demo.appuser.AppUser
Indicates whether the user's account has expired.
isAccountNonLocked() - Method in class com.example.demo.appuser.AppUser
Indicates whether the user is locked or unlocked.
isCredentialsNonExpired() - Method in class com.example.demo.appuser.AppUser
Indicates whether the user's credentials (password) have expired.
isEnabled() - Method in class com.example.demo.appuser.AppUser
Indicates whether the user is enabled or disabled.

K

keyboard - Static variable in class com.example.demo.calorie.CalorieUtil
A global, static Scanner object used to read input from the console (System.in).

L

loadUserByUsername(String) - Method in class com.example.demo.appuser.AppUserService
Locates the user based on the email address.

M

Macro - Class in com.example.demo.calorie
A simple object representing the breakdown of macronutrients (macros) in grams.
Macro() - Constructor for class com.example.demo.calorie.Macro
 
main(String[]) - Static method in class com.example.demo.calorie.App
The main method that executes when the program starts.
main(String[]) - Static method in class com.example.demo.DemoApplication
The main method which uses Spring Boot's method to launch the application.

P

PasswordEncoder - Class in com.example.demo.security
Configuration class that sets up necessary security beans for the application.
PasswordEncoder() - Constructor for class com.example.demo.security.PasswordEncoder
 
prompt - Static variable in class com.example.demo.calorie.CalorieUtil
The constant string containing the main menu prompt displayed to the user at the start of the application.
promptSelector() - Static method in class com.example.demo.calorie.CaloriePrompts
Displays the main menu prompt (from CalorieUtil.prompt) and reads the user's integer selection from the console.

R

register(RegistrationRequest) - Method in class com.example.demo.registration.RegistrationController
Handles new user registration requests.
register(RegistrationRequest) - Method in class com.example.demo.registration.RegistrationService
Processes a new user registration request.
RegistrationController - Class in com.example.demo.registration
REST controller that exposes endpoints for user registration and email confirmation.
RegistrationController() - Constructor for class com.example.demo.registration.RegistrationController
 
RegistrationRequest - Class in com.example.demo.registration
A final class acting as a Data Transfer Object for handling incoming user registration data (sign-up requests).
RegistrationRequest() - Constructor for class com.example.demo.registration.RegistrationRequest
 
RegistrationService - Class in com.example.demo.registration
Service class that handles the user registration process.
RegistrationService() - Constructor for class com.example.demo.registration.RegistrationService
 
run(String...) - Method in class com.example.demo.db.SchemaFixRunner
Executes the schema fix logic when the Spring Boot application starts up.

S

saveConfirmationToken(ConfirmationToken) - Method in class com.example.demo.registration.token.ConfirmationTokenService
Saves a new confirmation token to the database.
SchemaFixRunner - Class in com.example.demo.db
A one-time component designed to fix common database schema issues encountered when using JPA with certain database dilects, it uses alot of spring boots code so check their doc to learn more
SchemaFixRunner(JdbcTemplate) - Constructor for class com.example.demo.db.SchemaFixRunner
Constructs the SchemaFixRunner and injects the necessary JdbcTemplate.
securityFilterChain(HttpSecurity) - Method in class com.example.demo.security.config.WebSecurityConfig
 
send(String, String) - Method in interface com.example.demo.email.EmailSender
Sends an email to a specified recipient with the given email content.
send(String, String) - Method in class com.example.demo.email.EmailService
Sends an email asynchronously to a specified recipient with the given HTML content.
setCalories(int) - Method in class com.example.demo.calorie.CalorieLog
Sets the total caloric count.
setCarbs(int) - Method in class com.example.demo.calorie.CalorieLog
Sets the amount of carbohydrates in grams.
setConfirmedAt(String) - Method in class com.example.demo.registration.token.ConfirmationTokenService
Updates the confirmedAt timestamp for a specific token to the current time.
setFat(int) - Method in class com.example.demo.calorie.CalorieLog
Sets the amount of fat in grams.
setLogDate(LocalDate) - Method in class com.example.demo.calorie.CalorieLog
Sets the date of this log entry.
setMealType(String) - Method in class com.example.demo.calorie.CalorieLog
Sets the type of meal logged.
setProtein(int) - Method in class com.example.demo.calorie.CalorieLog
Sets the amount of protein in grams.
setUser(AppUser) - Method in class com.example.demo.calorie.CalorieLog
Sets the user associated with this calorie log.
signUpUser(AppUser) - Method in class com.example.demo.appuser.AppUserService
Handles the user registration process.

T

test(String) - Method in class com.example.demo.registration.EmailValidator
Tests whether the given email string is valid according to the predefined regular expression pattern.

U

updateConfirmedAt(String, LocalDateTime) - Method in interface com.example.demo.registration.token.ConfirmationTokenRepository
Updates the confirmedAt timestamp for a token once it has been successfully used to confirm a user's account.
USER - Enum constant in enum class com.example.demo.appuser.AppUserRole
Standard user role with basic access privileges.
UserRepository - Interface in com.example.demo.appuser
Repository interface for AppUser entities.

V

valueOf(String) - Static method in enum class com.example.demo.appuser.AppUserRole
Returns the enum constant of this class with the specified name.
values() - Static method in enum class com.example.demo.appuser.AppUserRole
Returns an array containing the constants of this enum class, in the order they are declared.

W

WebSecurityConfig - Class in com.example.demo.security.config
 
WebSecurityConfig() - Constructor for class com.example.demo.security.config.WebSecurityConfig
 
A B C D E F G I K L M P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form