Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Package: org.egov.works.service
Source File: ContractNotificationService.java
Dependencies: Spring Framework, Kafka, Lombok
The ContractNotificationService class manages the notification workflow for contract-related actions within the eGov Works module. It processes contract-related Kafka messages and sends appropriate notifications to relevant stakeholders.
notificationServiceConfiguration: Configuration settings for notification services.
restTemplate: Template for making RESTful HTTP requests.
producer: Kafka producer for sending notifications.
mapper: Object mapper for JSON serialization and deserialization.
hrmsUtils: Utility class for HRMS (Human Resource Management System) operations.
estimateServiceUtil: Utility class for estimate-related operations.
projectServiceUtil: Utility class for project-related operations.
locationServiceUtil: Utility class for location-related operations.
organisationServiceUtil: Utility class for organization-related operations.
repository: Repository for service request operations.
localizationUtil: Utility class for localization operations.
contractsUtil: Utility class for contract-related operations.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic): Processes the Kafka message for contract-related actions and sends notifications accordingly.
sendNotification(ContractRequest request): Sends notifications based on the type of contract action.
pushNotificationForRevisedContract(ContractRequest request): Sends notifications for revised contracts.
pushNotificationToOriginator(ContractRequest request, String message, String cboMobileNumber): Sends notifications to the originator.
pushNotificationToCreatorForRejectAction(ContractRequest request): Sends notifications to the creator for reject actions.
pushNotificationToCreatorForApproveAction(ContractRequest request): Sends notifications to the creator for approve actions.
pushNotificationToCreatorForDeclineAction(ContractRequest request): Sends notifications to the creator for decline actions.
pushNotificationToCreatorForAcceptAction(ContractRequest request): Sends notifications to the creator for accept actions.
pushNotificationToCBOForApproveAction(ContractRequest request): Sends notifications to the(CBO) for approve actions.
getDetailsForSMS(ContractRequest request, String uuid): Retrieves details required for SMS notifications.
getProjectNumber(ContractRequest request): Retrieves project details for SMS notifications.
getOrgDetailsForCBOAdmin(ContractRequest request): Retrieves organization details for CBO administrators.
getMessage(ContractRequest request, boolean isCBORole): Retrieves the message based on the contract action.
getMessage(ContractRequest request, String msgCode): Retrieves the message from localization.
buildMessageForRevisedContract(Map<String, String> userDetailsForSMS, String message, Boolean isSendBack): Builds the message for revised contracts.
buildMessageForRejectAction(Contract contract, Map<String, String> userDetailsForSMS, String message): Builds the message for reject actions.
buildMessageForApproveActionWOCBO(Contract contract, Map<String, String> userDetailsForSMS, String message): Builds the message for approve actions by WO creator.
buildMessageForWOCreator(Contract contract, Map<String, String> userDetailsForSMS, String message): Builds the message for WO creator.
buildMessageForDeclineAction_WOCreator(Contract contract, Map<String, String> userDetailsForSMS, String message): Builds the message for decline actions by WO creator.
buildMessageForAcceptAction_WOCreator(Contract contract, Map<String, String> userDetailsForSMS, String message): Builds the message for accept actions by WO creator.
getLocalisedMessages(RequestInfo requestInfo, String tenantId, String locale, String module): Retrieves localized messages.
getShortnerURL(String actualURL): Retrieves the shortened URL.
setAdditionalFields(ContractRequest request, String localizationCode,Map<String, Object> additionalField ): Sets additional fields for notifications.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage, Map<String, Object> additionalField,Map<String,String> smsDetails): Checks additional fields and pushes notifications onto the SMS topic.
Package: org.egov.works.service
Source File: ExpenseNotificationService.java
The ExpenseNotificationService class is responsible for processing notifications related to expenses within the eGov Works module. It handles the generation and sending of notifications for both purchase bills and supervision bills.
producer: Kafka producer for sending notifications.
config: Configuration settings for notification services.
hrmsUtils: Utility class for interacting with the HRMS (Human Resource Management System).
projectServiceUtil: Utility class for project-related operations.
locationServiceUtil: Utility class for location-related operations.
mapper: Object mapper for JSON serialization/deserialization.
repository: Repository for service requests.
notificationUtil: Utility class for notification-related operations.
localizationUtil: Utility class for localization operations.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic): Processes the incoming Kafka message, determining whether it pertains to a purchase bill or a supervision bill, and sends the appropriate notification accordingly.
sendNotificationForPurchaseBill(BillRequest billRequest): Sends notifications for purchase bills, handling approval and rejection actions.
sendNotificationForSupervisionBill(BillRequest billRequest): Sends notifications for supervision bills.
getMessage(RequestInfo requestInfo, String tenantId, String msgCode, Map<String,Object> additionalFields): Retrieves the localized message for a given code and locale, optionally adding additional fields if required.
buildMessageReplaceVariables(String message, String billNumber, String amount): Replaces variables in a message template with actual values.
setAdditionalFields(RequestInfo requestInfo,String tenantId, String localizationCode, Map<String,Object> additionalFields): Sets additional fields for the notification if required.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage, Map<String, Object> additionalFields, String mobileNumber): Checks if additional fields are present and sends the SMS request accordingly.
Instantiate and configure the ExpenseNotificationService class within the application context to handle notifications related to expenses. Ensure that dependencies such as Kafka producer, configuration settings, and utility classes are properly injected.
The SMS Adapter Service, part of the Mukta_IMPL repository, is a crucial component designed to facilitate SMS notifications. It listens for incoming data on specific Kafka topics and triggers the sending of SMS notifications
Repository Name: Mukta_IMPL
Branch: UAT
Branch: click here for branch link
Environment: mukta-uat
Port: 8080
Context Path: /sms-adapter
Database(Postgres): digit_works
Kafka Server
idGenService
attendanceService
workflowService
mdmsService
hrmsService
estimateService
worksProjectManagementSystemService
locationService
contractService
localizationService
urlShortnerService
organisationService
expenseCalculatorService
Package: org.egov.works.service
Source File: NotificationConsumerService.java
Dependencies: Spring Framework, Kafka, Lombok
The NotificationConsumerService class is responsible for routing Kafka messages to specific service components based on the topic they belong to within the eGov Works module.
contractNotificationService: Service for processing contract-related notifications.
estimateNotificationService: Service for processing estimate-related notifications.
notificationServiceConfiguration: Configuration settings for notification services.
expenseNotificationService: Service for processing expense-related notifications.
musterRollNotificationService: Service for processing muster roll related notifications.
measurementNotificationService: Service for processing measurement related notifications.
organizationNotificationService: Service for processing organization related notifications.
individualNotificationService: Service for processing individual related notifications.
fetchServiceBasedOnTopic(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic): Determines the appropriate service handler based on the topic of the received message and delegates the message processing to that specific service.
Instantiate and configure the NotificationConsumer class within the application context to enable message consumption from Kafka topics. Ensure that the NotificationConsumerService class is properly injected into the NotificationConsumer class for seamless message processing.
Package: org.egov.works.service
Source File: EstimateNotificationService.java
Dependencies: Spring Framework, Kafka, Jackson, Lombok, Apache Commons Lang3
The EstimateNotificationService class is a part of the SMS adapter service in the eGov Works module. This service facilitates the sending of notifications related to estimate workflows via SMS.
producer: Kafka producer for sending notifications.
config: NotificationServiceConfiguration for accessing configuration settings.
hrmsUtils: HRMSUtils for fetching employee details.
projectServiceUtil: ProjectServiceUtil for fetching project details.
locationServiceUtil: LocationServiceUtil for fetching location details.
mapper: ObjectMapper for JSON serialization/deserialization.
repository: ServiceRequestRepository for fetching data from external services.
localizationUtil: LocalizationUtil for fetching localized messages.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic): Processes Kafka messages containing EstimateRequest data.
sendNotification(EstimateRequest request): Determines the action type and invokes corresponding notification methods.
pushNotificationToCreatorForRejectAction(EstimateRequest request): Sends a notification for the rejection action in the estimate workflow.
pushNotificationToCreatorForApproveAction(EstimateRequest request): Sends a notification for the approval action in the estimate workflow.
getDetailsForSMS(EstimateRequest request, String uuid): Retrieves details necessary for constructing SMS notifications, such as project and user information.
getMessage(EstimateRequest request): Retrieves the appropriate message template based on the workflow action.
buildMessageForRejectAction(Estimate estimate, Map<String, String> userDetailsForSMS, String message): Constructs the SMS content for the rejection action.
buildMessageForApproveActionCreator(Estimate estimate, Map<String, String> userDetailsForSMS, String message): Constructs the SMS content for the approval action by the estimate creator.
getLocalisedMessages(RequestInfo requestInfo, String rootTenantId, String locale, String module): Retrieves localized messages based on the user's locale and module.
setAdditionalFields(EstimateRequest request, String localizationCode, Map<String, Object> additionalField): Sets additional fields required for customizing SMS content.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage, Map<String, Object> additionalField, Map<String, String> smsDetails): Checks if additional fields are required and pushes the SMS message to the appropriate Kafka topic.
The EstimateNotificationService class is utilized within the eGov Works module for sending SMS notifications related to estimate workflows. It integrates with Kafka for message processing and supports dynamic message construction based on predefined templates and user-specific data.
Package: org.egov.works.kafka
Source File: NotificationConsumer.java
Dependencies: Spring Framework, Kafka, Lombok
The NotificationConsumer class is responsible for consuming messages from Kafka topics and forwarding them to the NotificationConsumerService for further processing within the eGov Works module.
The primary functionality of the NotificationConsumer class includes:
Consuming Kafka Messages: Messages are consumed from specified Kafka topics using Kafka listeners.
Forwarding Messages: Consumed messages are forwarded to the NotificationConsumerService for processing based on the topic.
The NotificationConsumer class acts as a bridge between Kafka topics and the NotificationConsumerService, ensuring seamless message consumption and processing within the eGov Works module.
Package: org.egov.works.service
Source File: OrganizationNotificationService.java
The OrganizationNotificationService class is responsible for handling notifications related to organization management within the eGov Works module. It facilitates the generation and sending of notifications to relevant parties when organizations are created or updated.
mapper: ObjectMapper for JSON serialization/deserialization.
notificationServiceConfiguration: Configuration settings for notification services.
producer: Kafka producer for sending notifications.
restTemplate: RestTemplate for making HTTP requests.
repository: ServiceRequestRepository for fetching data from external services.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic, boolean isCreateOperation): Processes the incoming Kafka message containing organization details and delegates the notification sending process based on whether it's a create or update operation.
sendNotification(OrgRequest request, boolean isCreateOperation): Sends notifications for organization creation or update based on the boolean flag.
pushNotificationForCreate(OrgRequest request): Pushes notifications for organization creation to relevant personnel.
pushNotificationForUpdate(OrgRequest request): Pushes notifications for organization updates to relevant personnel.
getOrganisations(OrgSearchRequest orgSearchRequest): Fetches organization details based on search criteria.
setAdditionalFields(OrgRequest request, String localizationCode, Map<String, Object> additionalField): Sets additional fields for the notification if required.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage, Map<String, Object> additionalField, String mobileNumber): Checks if additional fields are present and pushes the SMS notification accordingly.
getDetailsForSMS(Organisation organisation): Retrieves details necessary for composing the SMS notification for organization creation.
getShortnerURL(String actualURL): Shortens the provided URL using a URL
getSMSDetailsForUpdate(OrgRequest request): Retrieves details necessary for composing the SMS notification for organization update.
getMessage(OrgRequest request, boolean isCreateOperation): Retrieves the localized message for organization creation or update based on the operation type.
getMessage(OrgRequest request, String msgCode): Retrieves the localized message for the specified code and locale.
buildMessageForCreateAction(Map<String, String> userDetailsForSMS, String message): Builds the message for organization creation based on the provided user details.
buildMessageForUpdateAction(Map<String, String> userDetailsForSMS, String message): Builds the message for organization update based on the provided user details.
getLocalisedMessages(RequestInfo requestInfo, String rootTenantId, String locale, String module): Fetches localized messages from the localization service based on the specified parameters.
getShortnerURL(String actualURL): Shortens the provided URL using a URL shortening service.
Instantiate and configure the OrganizationNotificationService class within the application context to handle notifications related to organization management. Ensure that dependencies such as ObjectMapper, configuration settings, Kafka producer, and RestTemplate are properly injected. Additionally, ensure that the ServiceRequestRepository is configured to communicate with external services for fetching data.
Package: org.egov.works.service
Source File: MusterRollNotificationService.java
The MusterRollNotificationService class is responsible for processing notifications related to muster rolls within the eGov Works module. It handles the generation and sending of notifications to CBO (Central Billing Office) personnel based on different actions performed on muster rolls.
producer: Kafka producer for sending notifications.
config: Configuration settings for notification services.
hrmsUtils: A utility class for interacting with the HRMS (Human Resource Management System).
projectServiceUtil: Utility class for project-related operations.
locationServiceUtil: Utility class for location-related operations.
mapper: Object mapper for JSON serialization/deserialization.
repository: Repository for service requests.
notificationUtil: Utility class for notification-related operations.
localizationUtil: Utility class for localization operations.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic): Processes the incoming Kafka message containing muster roll details and delegates the notification sending process to the appropriate method.
sendNotificationToCBO(MusterRollRequest musterRollRequest): Sends notifications to CBO personnel based on the action performed on the muster roll (e.g., send back for correction, approval).
setAdditionalFields(MusterRollRequest request, String localizationCode,Map<String, Object> additionalField ): Sets additional fields for the notification if required.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage , Map<String, Object> additionalField,Map<String,String> smsDetails): Checks if additional fields are present and sends the SMS request accordingly.
getMessage(MusterRollRequest musterRollRequest, String msgCode): Retrieves the localized message for a given code and locale.
buildMessageReplaceVariables(String message, String musterRollName, String amount): Replaces variables in a message template with actual values.
Instantiate and configure the MusterRollNotificationService class within the application context to handle notifications related to muster rolls. Ensure that dependencies such as Kafka producer, configuration settings, and utility classes are properly injected.
Package: org.egov.works.service
Source File: MeasurementNotificationService.java
The MeasurementNotificationService class is responsible for processing notifications related to measurements within the eGov Works module. It handles the generation and sending of notifications to relevant personnel based on different actions performed on measurements, such as approval or rejection.
mapper: ObjectMapper for JSON serialization/deserialization.
notificationServiceConfiguration: Configuration settings for notification services.
measurementServiceUtil: Utility class for measurement-related operations.
producer: Kafka producer for sending notifications.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic): Processes the incoming Kafka message containing measurement details and delegates the notification sending process to the appropriate method.
sendNotification(MeasurementServiceRequest request): Sends notifications to relevant personnel based on the action performed on the measurement (e.g., approval, rejection).
setAdditionalFields(MeasurementServiceRequest request, String localizationCode, Map<String, Object> additionalField): Sets additional fields for the notification if required.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage, Map<String, Object> additionalField, Map<String, String> smsDetails): Checks if additional fields are present and sends the SMS request accordingly.
getCustomMessage(String message, String measurementNumber, String projectNumber): Replaces variables in a message template with actual measurement and project numbers.
getMessage(MeasurementServiceRequest request, String msgCode): Retrieves the localized message for a given code and locale.
Instantiate and configure the MeasurementNotificationService class within the application context to handle notifications related to measurements. Ensure that dependencies such as ObjectMapper, configuration settings, and utility classes are properly injected.
Package: org.egov.works.service
Source File: IndividualNotificationService.java
The IndividualNotificationService class is responsible for managing notifications related to individual entities within the eGov Works module. It handles the generation and sending of notifications when individual entities are created or updated.
config: NotificationServiceConfiguration for accessing configuration settings.
producer: Kafka producer for sending notifications.
repository: ServiceRequestRepository for fetching data from external services.
restTemplate: RestTemplate for making HTTP requests.
mapper: ObjectMapper for JSON serialization/deserialization.
process(final String record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic, boolean isCreateOperation): Processes the incoming Kafka message containing individual details and delegates the notification sending process based on whether it's a create or update operation.
sendNotification(IndividualRequest request, boolean isCreateOperation): Sends notifications for individual creation or update based on the boolean flag.
pushNotificationForCreate(IndividualRequest request): Pushes notifications for individual creation to relevant parties.
pushNotificationForUpdate(IndividualRequest request): Pushes notifications for individual update to relevant parties.
getDetailsForSMS(IndividualRequest request): Retrieves details necessary for composing the SMS notification for individual creation or update.
getMessageForCreate(IndividualRequest request): Retrieves the localized message for individual creation.
getMessageForUpdate(IndividualRequest request): Retrieves the localized message for individual update.
getMessage(IndividualRequest request, String msgCode): Retrieves the localized message for the specified code and locale.
buildMessageForCreate(Map<String, String> userDetailsForSMS, String message): Builds the message for individual creation based on the provided user details.
buildMessageForUpdate(Map<String, String> userDetailsForSMS, String message): Builds the message for individual updates based on the provided user details.
getLocalisedMessages(RequestInfo requestInfo, String rootTenantId, String locale, String module): Fetches localized messages from the localization service based on the specified parameters.
setAdditionalFields(IndividualRequest request, String localizationCode, Map<String, Object> additionalField): Sets additional fields for the notification if required.
checkAdditionalFieldAndPushONSmsTopic(String customizedMessage, Map<String, Object> additionalField, Map<String, String> smsDetails): Checks if additional fields are present and push the SMS notification accordingly.
Instantiate and configure the IndividualNotificationService class within the application context to handle notifications related to individual entities. Ensure that dependencies such as NotificationServiceConfiguration, Kafka producer, ServiceRequestRepository, RestTemplate, and ObjectMapper are properly injected. Additionally, configure the methods to handle individual creation and update notifications as per the application's requirements.