Index

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

A

addOrder(OrderDTO) - Method in class com.minicrm.mini_crm_api.controllers.OrderController
Accepts a new order for asynchronous processing.
addOrder(OrderDTO) - Method in class com.minicrm.mini_crm_api.services.OrderService
Adds a new order and updates the associated customer's aggregated data.
AIClientConfig - Class in com.minicrm.mini_crm_api.config
Configuration class to explicitly create the ChatClient bean.
AIClientConfig() - Constructor for class com.minicrm.mini_crm_api.config.AIClientConfig
 
AIController - Class in com.minicrm.mini_crm_api.controllers
REST controller for handling the audience rules generation.
AIController() - Constructor for class com.minicrm.mini_crm_api.controllers.AIController
 
AIController.PromptDTO - Record Class in com.minicrm.mini_crm_api.controllers
DTO for the prompt input.
AIResponseParsingException - Exception in com.minicrm.mini_crm_api.exceptions
A custom runtime exception thrown when the response from the AI service cannot be parsed as valid JSON.
AIResponseParsingException(String, Throwable) - Constructor for exception com.minicrm.mini_crm_api.exceptions.AIResponseParsingException
Constructs a new AIResponseParsingException with the specified detail message and cause.
AIService - Class in com.minicrm.mini_crm_api.services
Service responsible for interacting with the AI model to generate rules from natural language prompts.
AIService() - Constructor for class com.minicrm.mini_crm_api.services.AIService
 
averageOrderValue - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
averageOrderValue: The average value of a customer's orders.

B

batchListenerFactory(SimpleRabbitListenerContainerFactoryConfigurer, ConnectionFactory) - Method in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
This is the specialized factory for listeners that consume messages in batches.

C

Campaign - Class in com.minicrm.mini_crm_api.models
Represents a single marketing campaign, defined by a set of rules for its target audience.
Campaign() - Constructor for class com.minicrm.mini_crm_api.models.Campaign
 
CAMPAIGN_EXCHANGE_NAME - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
CAMPAIGN_PROCESSING_QUEUE_NAME - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
CAMPAIGN_PROCESSING_ROUTING_KEY - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
CampaignController - Class in com.minicrm.mini_crm_api.controllers
REST controller for managing campaigns, including audience preview and campaign creation.
CampaignController() - Constructor for class com.minicrm.mini_crm_api.controllers.CampaignController
 
CampaignDTO - Class in com.minicrm.mini_crm_api.dtos
Data Transfer Object for creating a new Campaign.
CampaignDTO() - Constructor for class com.minicrm.mini_crm_api.dtos.CampaignDTO
 
CampaignEventListener - Class in com.minicrm.mini_crm_api.messaging
A background worker that listens for campaign processing events from RabbitMQ
CampaignEventListener() - Constructor for class com.minicrm.mini_crm_api.messaging.CampaignEventListener
 
CampaignEventPublisher - Class in com.minicrm.mini_crm_api.messaging
A dedicated service for publishing campaign-related events to RabbitMQ.
CampaignEventPublisher() - Constructor for class com.minicrm.mini_crm_api.messaging.CampaignEventPublisher
 
CampaignRepository - Interface in com.minicrm.mini_crm_api.repositories
Repository interface for Campaign entities, providing CRUD operations and custom query methods.
CampaignService - Class in com.minicrm.mini_crm_api.services
Service layer containing the core business logic for creating and managing campaigns.
CampaignService() - Constructor for class com.minicrm.mini_crm_api.services.CampaignService
 
CampaignStatsDTO - Class in com.minicrm.mini_crm_api.dtos
Data Transfer Object representing campaign delivery statistics.
CampaignStatsDTO() - Constructor for class com.minicrm.mini_crm_api.dtos.CampaignStatsDTO
 
chatClient(OpenAiChatModel) - Method in class com.minicrm.mini_crm_api.config.AIClientConfig
Creates a ChatClient bean using the auto-configured OpenAiChatModel.
ChatRequest - Class in com.minicrm.mini_crm_api.dtos.openai
Represents a request payload for OpenAI chat API.
ChatRequest() - Constructor for class com.minicrm.mini_crm_api.dtos.openai.ChatRequest
 
ChatResponse - Class in com.minicrm.mini_crm_api.dtos.openai
Represents a response from the OpenAI chat API.
ChatResponse() - Constructor for class com.minicrm.mini_crm_api.dtos.openai.ChatResponse
 
ChatResponse.Choice - Class in com.minicrm.mini_crm_api.dtos.openai
Represents a message in the chat response, including its role and content.
Choice() - Constructor for class com.minicrm.mini_crm_api.dtos.openai.ChatResponse.Choice
 
com.minicrm.mini_crm_api - package com.minicrm.mini_crm_api
 
com.minicrm.mini_crm_api.config - package com.minicrm.mini_crm_api.config
 
com.minicrm.mini_crm_api.controllers - package com.minicrm.mini_crm_api.controllers
 
com.minicrm.mini_crm_api.dtos - package com.minicrm.mini_crm_api.dtos
 
com.minicrm.mini_crm_api.dtos.openai - package com.minicrm.mini_crm_api.dtos.openai
 
com.minicrm.mini_crm_api.exceptions - package com.minicrm.mini_crm_api.exceptions
 
com.minicrm.mini_crm_api.messaging - package com.minicrm.mini_crm_api.messaging
 
com.minicrm.mini_crm_api.models - package com.minicrm.mini_crm_api.models
 
com.minicrm.mini_crm_api.models.enums - package com.minicrm.mini_crm_api.models.enums
 
com.minicrm.mini_crm_api.models.rules - package com.minicrm.mini_crm_api.models.rules
 
com.minicrm.mini_crm_api.repositories - package com.minicrm.mini_crm_api.repositories
 
com.minicrm.mini_crm_api.services - package com.minicrm.mini_crm_api.services
 
com.minicrm.mini_crm_api.util - package com.minicrm.mini_crm_api.util
 
CommunicationLog - Class in com.minicrm.mini_crm_api.models
Logs each communication attempt to a customer for auditing and tracking purposes.
CommunicationLog() - Constructor for class com.minicrm.mini_crm_api.models.CommunicationLog
 
CommunicationLogRepository - Interface in com.minicrm.mini_crm_api.repositories
Spring Data MongoDB repository for managing CommunicationLog entities.
CommunicationLogService - Class in com.minicrm.mini_crm_api.services
Service for managing the lifecycle of CommunicationLog entries.
CommunicationLogService() - Constructor for class com.minicrm.mini_crm_api.services.CommunicationLogService
 
Condition - Class in com.minicrm.mini_crm_api.models.rules
Represents a single condition in a campaign rule.
Condition() - Constructor for class com.minicrm.mini_crm_api.models.rules.Condition
 
ConditionField - Enum Class in com.minicrm.mini_crm_api.models.enums
Represents the valid fields that can be used in a campaign rule condition.
countByCampaignIdAndStatus(String, String) - Method in interface com.minicrm.mini_crm_api.repositories.CommunicationLogRepository
Counts the number of communication logs for a given campaign and status.
createCampaign(CampaignDTO, OAuth2User) - Method in class com.minicrm.mini_crm_api.controllers.CampaignController
Creates and launches a new campaign.
createCampaign(CampaignDTO, OAuth2User) - Method in class com.minicrm.mini_crm_api.services.CampaignService
Creates a new campaign and publishes an event to process it asynchronously.
createCustomer(CustomerDTO) - Method in class com.minicrm.mini_crm_api.controllers.CustomerController
Accepts a new customer for asynchronous processing.
createCustomer(CustomerDTO) - Method in class com.minicrm.mini_crm_api.services.CustomerService
Creates a new customer if the email does not already exist.
createLog(String, String) - Method in class com.minicrm.mini_crm_api.services.CommunicationLogService
Creates a new communication log entry with a 'PENDING' status.
Customer - Class in com.minicrm.mini_crm_api.models
Represents an end-customer in the CRM system.
Customer() - Constructor for class com.minicrm.mini_crm_api.models.Customer
 
CUSTOMER_INGESTION_QUEUE_NAME - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
CUSTOMER_INGESTION_ROUTING_KEY - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
CustomerController - Class in com.minicrm.mini_crm_api.controllers
REST controller for managing campaigns, including audience preview and campaign creation.
CustomerController() - Constructor for class com.minicrm.mini_crm_api.controllers.CustomerController
 
CustomerDTO - Class in com.minicrm.mini_crm_api.dtos
Data Transfer Object for creating a new Customer.
CustomerDTO() - Constructor for class com.minicrm.mini_crm_api.dtos.CustomerDTO
 
CustomerRepository - Interface in com.minicrm.mini_crm_api.repositories
Repository interface for Customer entities, providing CRUD operations and custom query methods.
CustomerService - Class in com.minicrm.mini_crm_api.services
Service for managing customers.
CustomerService() - Constructor for class com.minicrm.mini_crm_api.services.CustomerService
 
CustomOAuth2UserService - Class in com.minicrm.mini_crm_api.services
 
CustomOAuth2UserService() - Constructor for class com.minicrm.mini_crm_api.services.CustomOAuth2UserService
 

D

DeliveryReceiptDTO - Class in com.minicrm.mini_crm_api.dtos
A Data Transfer Object representing a delivery receipt message to be sent through the message queue.
DeliveryReceiptDTO() - Constructor for class com.minicrm.mini_crm_api.dtos.DeliveryReceiptDTO
 
DummyVendorController - Class in com.minicrm.mini_crm_api.controllers
This controller simulates an external vendor API for sending messages.
DummyVendorController() - Constructor for class com.minicrm.mini_crm_api.controllers.DummyVendorController
 

E

equals(Object) - Method in record class com.minicrm.mini_crm_api.controllers.AIController.PromptDTO
Indicates whether some other object is "equal to" this one.
existsByName(String) - Method in interface com.minicrm.mini_crm_api.repositories.CampaignRepository
Checks if a campaign with the given name already exists.

F

FAILED - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.Status
 
filterChain(HttpSecurity) - Method in class com.minicrm.mini_crm_api.config.SecurityConfig
 
findAll(Pageable) - Method in interface com.minicrm.mini_crm_api.repositories.CampaignRepository
Spring Data will automatically handle the query to fetch only the requested page of data.
findAllByOrderByCreatedAtDesc() - Method in interface com.minicrm.mini_crm_api.repositories.CampaignRepository
Finds all campaigns sorted by creation date in descending order.
findAllCampaigns(Pageable) - Method in class com.minicrm.mini_crm_api.services.CampaignService
Retrieves a paginated list of all campaigns.
findAudienceForCampaign(Campaign) - Method in class com.minicrm.mini_crm_api.services.CampaignService
Finds the customer audience for a given campaign.
findByEmail(String) - Method in interface com.minicrm.mini_crm_api.repositories.CustomerRepository
Retrieves a customer by their email address.
findByEmail(String) - Method in interface com.minicrm.mini_crm_api.repositories.UserRepository
 
firstOrderDate - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
firstOrderDate: The date of a customer's first order.

G

generateRules(AIController.PromptDTO) - Method in class com.minicrm.mini_crm_api.controllers.AIController
Generates a structured RuleGroup from a natural language text prompt.
generateRulesFromPrompt(String) - Method in class com.minicrm.mini_crm_api.services.AIService
Generates a structured RuleGroup from a natural language text prompt.
getAllCampaigns(Pageable) - Method in class com.minicrm.mini_crm_api.controllers.CampaignController
Retrieves a paginated list of all saved campaigns.
getAudienceSize(RuleGroup) - Method in class com.minicrm.mini_crm_api.services.CampaignService
Calculates the size of the audience matching the given nested rules.
getCampaignStats(String) - Method in class com.minicrm.mini_crm_api.controllers.CampaignController
Fetches the latest delivery statistics for a specific campaign.
getCampaignStats(String) - Method in class com.minicrm.mini_crm_api.services.CommunicationLogService
Calculates the delivery statistics for a given campaign.
getUser(OAuth2User) - Method in class com.minicrm.mini_crm_api.controllers.UserController
Returns the authenticated user's details.
GlobalExceptionHandler - Class in com.minicrm.mini_crm_api.exceptions
A global exception handler to catch and process exceptions across the entire application.
GlobalExceptionHandler() - Constructor for class com.minicrm.mini_crm_api.exceptions.GlobalExceptionHandler
 

H

handleBusinessException(RuntimeException) - Method in class com.minicrm.mini_crm_api.exceptions.GlobalExceptionHandler
Handles exceptions thrown when business logic rules are violated, such as trying to create a customer with an email that already exists.
handleCampaignProcessEvent(String) - Method in class com.minicrm.mini_crm_api.messaging.CampaignEventListener
Listens for campaign processing events from RabbitMQ and processes the campaign.
handleCustomerIngestion(CustomerDTO) - Method in class com.minicrm.mini_crm_api.messaging.IngestionEventListener
Listens to the customer ingestion queue.
handleDeliveryReceipt(Map<String, String>) - Method in class com.minicrm.mini_crm_api.controllers.WebhookController
Accepts a delivery receipt and publishes it to a message queue for asynchronous batch processing.
handleGenericException(Exception) - Method in class com.minicrm.mini_crm_api.exceptions.GlobalExceptionHandler
Handles any other unexpected runtime exceptions.
handleOrderIngestion(OrderDTO) - Method in class com.minicrm.mini_crm_api.messaging.IngestionEventListener
Listens to the order ingestion queue.
handleReceiptBatch(List<DeliveryReceiptDTO>) - Method in class com.minicrm.mini_crm_api.messaging.ReceiptBatchProcessor
Listens to the delivery receipt queue and consumes messages in batches.
handleSendMessage(Map<String, String>) - Method in class com.minicrm.mini_crm_api.controllers.DummyVendorController
The core logic of the vendor simulation.
handleValidationExceptions(MethodArgumentNotValidException) - Method in class com.minicrm.mini_crm_api.exceptions.GlobalExceptionHandler
Handles exceptions thrown by the @Valid annotation when request body validation fails.
hashCode() - Method in record class com.minicrm.mini_crm_api.controllers.AIController.PromptDTO
Returns a hash code value for this object.

I

INGESTION_EXCHANGE_NAME - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
IngestionEventListener - Class in com.minicrm.mini_crm_api.messaging
A background worker that listens for data ingestion events from RabbitMQ and processes them asynchronously.
IngestionEventListener() - Constructor for class com.minicrm.mini_crm_api.messaging.IngestionEventListener
 
IngestionEventPublisher - Class in com.minicrm.mini_crm_api.messaging
A dedicated service for publishing data ingestion events to RabbitMQ.
IngestionEventPublisher() - Constructor for class com.minicrm.mini_crm_api.messaging.IngestionEventPublisher
 

L

lastOrderDate - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
lastOrderDate: The date of a customer's last order.
loadUser(OAuth2UserRequest) - Method in class com.minicrm.mini_crm_api.services.CustomOAuth2UserService
 

M

main(String[]) - Static method in class com.minicrm.mini_crm_api.MiniCrmApiApplication
The main method that starts the Spring Boot application.
Message - Class in com.minicrm.mini_crm_api.dtos.openai
 
Message() - Constructor for class com.minicrm.mini_crm_api.dtos.openai.Message
 
messageConverter() - Method in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
Defines a MessageConverter bean that will be used by RabbitTemplate and RabbitListener to serialize and deserialize message payloads.
MessageDeliveryService - Class in com.minicrm.mini_crm_api.services
Service responsible for sending messages to the external vendor.
MessageDeliveryService() - Constructor for class com.minicrm.mini_crm_api.services.MessageDeliveryService
 
MiniCrmApiApplication - Class in com.minicrm.mini_crm_api
 
MiniCrmApiApplication() - Constructor for class com.minicrm.mini_crm_api.MiniCrmApiApplication
 

O

Order - Class in com.minicrm.mini_crm_api.models
Represents a single transaction/order event from a customer.
Order() - Constructor for class com.minicrm.mini_crm_api.models.Order
 
ORDER_INGESTION_QUEUE_NAME - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
ORDER_INGESTION_ROUTING_KEY - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
OrderController - Class in com.minicrm.mini_crm_api.controllers
REST controller for adding orders, used by the data seeder.
OrderController() - Constructor for class com.minicrm.mini_crm_api.controllers.OrderController
 
OrderDTO - Class in com.minicrm.mini_crm_api.dtos
Data Transfer Object for ingesting a new Order.
OrderDTO() - Constructor for class com.minicrm.mini_crm_api.dtos.OrderDTO
 
OrderRepository - Interface in com.minicrm.mini_crm_api.repositories
Repository interface for Order entities, providing CRUD operations.
OrderService - Class in com.minicrm.mini_crm_api.services
Service for managing orders and updating customer aggregated data.
OrderService() - Constructor for class com.minicrm.mini_crm_api.services.OrderService
 

P

PENDING - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.Status
 
previewAudience(RuleGroup) - Method in class com.minicrm.mini_crm_api.controllers.CampaignController
Calculates the audience size for a given set of rules.
prompt() - Method in record class com.minicrm.mini_crm_api.controllers.AIController.PromptDTO
Returns the value of the prompt record component.
PromptDTO(String) - Constructor for record class com.minicrm.mini_crm_api.controllers.AIController.PromptDTO
Creates an instance of a PromptDTO record class.
publishCampaignProcessEvent(String) - Method in class com.minicrm.mini_crm_api.messaging.CampaignEventPublisher
Publishes an event to the message queue, indicating that a new campaign needs to be processed by a background worker.
publishCustomerIngestionEvent(CustomerDTO) - Method in class com.minicrm.mini_crm_api.messaging.IngestionEventPublisher
Publishes an event to ingest a new customer.
publishOrderIngestionEvent(OrderDTO) - Method in class com.minicrm.mini_crm_api.messaging.IngestionEventPublisher
Publishes an event to ingest a new order.

R

RabbitMqConfiguration - Class in com.minicrm.mini_crm_api.config
Configures the neccessary RabbitMQ exhanges, queues and bindings
RabbitMqConfiguration() - Constructor for class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
RECEIPT_QUEUE_NAME - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
RECEIPT_ROUTING_KEY - Static variable in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
 
ReceiptBatchProcessor - Class in com.minicrm.mini_crm_api.messaging
A dedicated background worker that consumes delivery receipts from a queue in batches and processes them for efficient database updates.
ReceiptBatchProcessor() - Constructor for class com.minicrm.mini_crm_api.messaging.ReceiptBatchProcessor
 
Rule - Interface in com.minicrm.mini_crm_api.models.rules
A marker interface for polymorphism, allowing a rule to be either a Condition or a RuleGroup.
RuleGroup - Class in com.minicrm.mini_crm_api.models.rules
Represents a group of rules combined with a logical operator (AND/OR).
RuleGroup() - Constructor for class com.minicrm.mini_crm_api.models.rules.RuleGroup
 

S

SecurityConfig - Class in com.minicrm.mini_crm_api.config
Configures security settings for the application, including OAuth2 login.
SecurityConfig() - Constructor for class com.minicrm.mini_crm_api.config.SecurityConfig
 
send(Map<String, String>) - Method in class com.minicrm.mini_crm_api.controllers.DummyVendorController
The public-facing API endpoint that simulates receiving a message request from our application.
sendMessage(Customer, CommunicationLog) - Method in class com.minicrm.mini_crm_api.services.MessageDeliveryService
Asynchronously sends a message to the external vendor for delivery.
SENT - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.Status
 
singleListenerFactory(ConnectionFactory, SimpleRabbitListenerContainerFactoryConfigurer) - Method in class com.minicrm.mini_crm_api.config.RabbitMqConfiguration
This is the default factory for listeners that consume one message at a time.
Status - Enum Class in com.minicrm.mini_crm_api.models.enums
Represents the possible delivery statuses for a communication log entry.

T

tags - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
tags: A list of tags associated with a customer.
toString() - Method in record class com.minicrm.mini_crm_api.controllers.AIController.PromptDTO
Returns a string representation of this record class.
totalOrders - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
totalOrders: The total number of orders a customer has placed.
totalSpend - Enum constant in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
totalSpend: The total amount of money a customer has spent.

U

updateLogStatus(String, String) - Method in class com.minicrm.mini_crm_api.services.CommunicationLogService
Updates the status of an existing communication log.
updateLogStatusInBatch(List<DeliveryReceiptDTO>) - Method in class com.minicrm.mini_crm_api.services.CommunicationLogService
Update status of multiple communication logs in a single efficient batch operation.
User - Class in com.minicrm.mini_crm_api.models
Represents a user in the system.
User() - Constructor for class com.minicrm.mini_crm_api.models.User
 
UserController - Class in com.minicrm.mini_crm_api.controllers
REST controller for retrieving authenticated user details.
UserController() - Constructor for class com.minicrm.mini_crm_api.controllers.UserController
 
UserRepository - Interface in com.minicrm.mini_crm_api.repositories
Repository interface for User entities.

V

valueOf(String) - Static method in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class com.minicrm.mini_crm_api.models.enums.Status
Returns the enum constant of this class with the specified name.
values() - Static method in enum class com.minicrm.mini_crm_api.models.enums.ConditionField
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class com.minicrm.mini_crm_api.models.enums.Status
Returns an array containing the constants of this enum class, in the order they are declared.

W

WebhookController - Class in com.minicrm.mini_crm_api.controllers
Controller for handling incoming webhooks from external services.
WebhookController() - Constructor for class com.minicrm.mini_crm_api.controllers.WebhookController
 
A B C D E F G H I L M O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form