Class ProjectOwnerService
java.lang.Object
callofproject.dev.project.service.ProjectOwnerService
- All Implemented Interfaces:
IProjectOwnerService
Service class for project owner-related operations.
It implements the IProjectOwnerService interface.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectOwnerService
(callofproject.dev.data.project.dal.ProjectServiceHelper projectServiceHelper, callofproject.dev.nosql.dal.ProjectTagServiceHelper projectTagServiceHelper, com.fasterxml.jackson.databind.ObjectMapper objectMapper, KafkaProducer kafkaProducer, IProjectMapper projectMapper, IProjectParticipantMapper projectParticipantMapper, callofproject.dev.nosql.dal.NotificationServiceHelper notificationServiceHelper) Constructor for ProjectOwnerService. -
Method Summary
Modifier and TypeMethodDescriptioncallofproject.dev.data.common.clas.ResponseMessage<Boolean>
Adds a participant to a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
approveParticipantRequest
(ParticipantRequestDTO requestDTO) Approves a participant's request to join a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
Callback for approving a participant's request to join a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
changeProjectStatus
(UUID userId, UUID projectId, callofproject.dev.data.project.entity.enums.EProjectStatus projectStatus) Changes the status of a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
finishProject
(UUID userId, UUID projectId) Marks a project as finished.callofproject.dev.data.common.clas.ResponseMessage<Object>
removeParticipant
(UUID projectId, UUID userId) Removes a participant from a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
removeParticipantCallback
(UUID projectId, UUID userId) Callback for removing a participant from a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
removeProject
(UUID userId, UUID projectId) Removes a project.callofproject.dev.data.common.clas.ResponseMessage<Object>
removeProjectCallback
(UUID userId, UUID projectId) Removes a project.
-
Constructor Details
-
ProjectOwnerService
public ProjectOwnerService(callofproject.dev.data.project.dal.ProjectServiceHelper projectServiceHelper, callofproject.dev.nosql.dal.ProjectTagServiceHelper projectTagServiceHelper, com.fasterxml.jackson.databind.ObjectMapper objectMapper, KafkaProducer kafkaProducer, IProjectMapper projectMapper, IProjectParticipantMapper projectParticipantMapper, callofproject.dev.nosql.dal.NotificationServiceHelper notificationServiceHelper) Constructor for ProjectOwnerService.- Parameters:
projectServiceHelper
- The ProjectServiceHelper to be injected.projectTagServiceHelper
- The ProjectTagServiceHelper to be injected.objectMapper
- The ObjectMapper to be injected.kafkaProducer
- The KafkaProducer to be injected.projectMapper
- The IProjectMapper to be injected.projectParticipantMapper
- The IProjectParticipantMapper to be injected.notificationServiceHelper
- The NotificationServiceHelper to be injected.
-
-
Method Details
-
addParticipant
public callofproject.dev.data.common.clas.ResponseMessage<Boolean> addParticipant(SaveProjectParticipantDTO dto) Adds a participant to a project.- Specified by:
addParticipant
in interfaceIProjectOwnerService
- Parameters:
dto
- Data Transfer Object containing details for saving a project participant.- Returns:
- A ResponseMessage containing a Boolean result of the operation.
-
removeParticipant
public callofproject.dev.data.common.clas.ResponseMessage<Object> removeParticipant(UUID projectId, UUID userId) Removes a participant from a project.- Specified by:
removeParticipant
in interfaceIProjectOwnerService
- Parameters:
projectId
- The UUID of the project.userId
- The UUID of the user to be removed.- Returns:
- A ResponseMessage containing the result of the operation.
-
approveParticipantRequest
public callofproject.dev.data.common.clas.ResponseMessage<Object> approveParticipantRequest(ParticipantRequestDTO requestDTO) Approves a participant's request to join a project.- Specified by:
approveParticipantRequest
in interfaceIProjectOwnerService
- Parameters:
requestDTO
- Data Transfer Object containing the participant request details.- Returns:
- A ResponseMessage containing the result of the approval operation.
-
finishProject
public callofproject.dev.data.common.clas.ResponseMessage<Object> finishProject(UUID userId, UUID projectId) Marks a project as finished.- Specified by:
finishProject
in interfaceIProjectOwnerService
- Parameters:
userId
- The UUID of the user who is finishing the project.projectId
- The UUID of the project to be finished.- Returns:
- A ResponseMessage containing the result of the finish operation.
-
changeProjectStatus
public callofproject.dev.data.common.clas.ResponseMessage<Object> changeProjectStatus(UUID userId, UUID projectId, callofproject.dev.data.project.entity.enums.EProjectStatus projectStatus) Changes the status of a project.- Specified by:
changeProjectStatus
in interfaceIProjectOwnerService
- Parameters:
userId
- The UUID of the user changing the project status.projectId
- The UUID of the project whose status is being changed.projectStatus
- The new status of the project.- Returns:
- A ResponseMessage containing the result of the status change.
-
removeProject
public callofproject.dev.data.common.clas.ResponseMessage<Object> removeProject(UUID userId, UUID projectId) Removes a project.- Specified by:
removeProject
in interfaceIProjectOwnerService
- Parameters:
userId
- The UUID of the user removing the project.projectId
- The UUID of the project to be removed.- Returns:
- A ResponseMessage containing the result of the remove operation.
-
approveParticipantRequestCallback
public callofproject.dev.data.common.clas.ResponseMessage<Object> approveParticipantRequestCallback(ParticipantRequestDTO requestDTO) Callback for approving a participant's request to join a project.- Specified by:
approveParticipantRequestCallback
in interfaceIProjectOwnerService
- Parameters:
requestDTO
- Data Transfer Object containing the participant request details.- Returns:
- A ResponseMessage containing the result of the approval operation callback.
-
removeParticipantCallback
public callofproject.dev.data.common.clas.ResponseMessage<Object> removeParticipantCallback(UUID projectId, UUID userId) Callback for removing a participant from a project.- Specified by:
removeParticipantCallback
in interfaceIProjectOwnerService
- Parameters:
projectId
- The UUID of the project.userId
- The UUID of the user to be removed.- Returns:
- A ResponseMessage containing the result of the remove operation callback.
-
removeProjectCallback
public callofproject.dev.data.common.clas.ResponseMessage<Object> removeProjectCallback(UUID userId, UUID projectId) Removes a project.- Parameters:
userId
- The UUID of the user removing the project.projectId
- The UUID of the project to be removed.- Returns:
- A ResponseMessage containing the result of the remove operation.
-