Class LeadsManagementService
- java.lang.Object
-
- org.exoplatform.leadcapture.services.LeadsManagementService
-
public class LeadsManagementService extends Object
-
-
Constructor Summary
Constructors Constructor Description LeadsManagementService(LeadDAO leadDAO, FormDAO formDAO, FieldDAO fieldDAO, ResponseDAO responseDAO, org.exoplatform.task.service.TaskService taskService, org.exoplatform.task.service.StatusService statusService, org.exoplatform.task.service.ProjectService projectService, org.exoplatform.task.service.LabelService labelService, org.exoplatform.task.service.CommentService commentService, LeadCaptureSettingsService leadCaptureSettingsService, org.exoplatform.services.listener.ListenerService listenerService)
-
Method Summary
-
-
-
Constructor Detail
-
LeadsManagementService
public LeadsManagementService(LeadDAO leadDAO, FormDAO formDAO, FieldDAO fieldDAO, ResponseDAO responseDAO, org.exoplatform.task.service.TaskService taskService, org.exoplatform.task.service.StatusService statusService, org.exoplatform.task.service.ProjectService projectService, org.exoplatform.task.service.LabelService labelService, org.exoplatform.task.service.CommentService commentService, LeadCaptureSettingsService leadCaptureSettingsService, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Detail
-
addLeadInfo
public LeadEntity addLeadInfo(FormInfo leadInfo, boolean broadcast) throws Exception
- Throws:
Exception
-
createLead
public LeadEntity createLead(LeadDTO lead)
-
deleteLead
public void deleteLead(LeadEntity lead) throws Exception
- Throws:
Exception
-
deleteAllLeads
public void deleteAllLeads(List<LeadEntity> leadEntityList) throws Exception
- Throws:
Exception
-
assigneLead
public void assigneLead(Long leadId, String assignee) throws Exception
- Throws:
Exception
-
suspendLead
public LeadEntity suspendLead(String mail, String cause) throws Exception
- Throws:
Exception
-
updateStatus
public LeadEntity updateStatus(Long leadId, String status, String userName) throws Exception
- Throws:
Exception
-
getLeads
public LeadsAccessList getLeads(String search, String status, String owner, String captureMethod, String from, String to, String zone, int min, int max, Boolean notassigned, String sortBy, Boolean sortDesc, int page, int limit, Boolean export)
-
getResponses
public org.json.JSONArray getResponses(long leadId)
-
getTimeLine
public org.json.JSONArray getTimeLine(long leadId)
-
addResponse
public void addResponse(ResponseDTO responseDTO, LeadEntity leadEntity) throws Exception
- Throws:
Exception
-
getAllResponses
public List<ResponseEntity> getAllResponses()
-
createForm
public FormEntity createForm(FormEntity formEntity)
-
updateForm
public FormEntity updateForm(FormEntity formEntity)
-
createResponse
public ResponseEntity createResponse(ResponseEntity responseEntity)
-
getLeadbyId
public LeadEntity getLeadbyId(long id)
-
getLeadByMail
public LeadEntity getLeadByMail(String mail)
-
getLeadByTask
public LeadEntity getLeadByTask(Long taslId)
-
getLeadsByStatus
public List<LeadEntity> getLeadsByStatus(String status)
-
getTaskComments
public org.json.JSONArray getTaskComments(long taskId)
-
getTask
public org.exoplatform.task.dto.TaskDto getTask(long taskId) throws Exception- Throws:
Exception
-
addTaskComment
public org.json.JSONObject addTaskComment(long taskId, String username, String comment) throws Exception- Throws:
Exception
-
updateTaskStatus
public void updateTaskStatus(Long taskId, String status) throws Exception
- Throws:
Exception
-
createTask
public org.exoplatform.task.dto.TaskDto createTask(LeadEntity lead) throws Exception
- Throws:
Exception
-
getPersonalTasks
public List<PersonalTask> getPersonalTasks(long id, String userId) throws Exception
- Throws:
Exception
-
createPersonalTask
public PersonalTask createPersonalTask(PersonalTask personalTask) throws Exception
- Throws:
Exception
-
updatePersonalTask
public org.exoplatform.task.dto.TaskDto updatePersonalTask(PersonalTask pTask) throws Exception
- Throws:
Exception
-
mergeLead
public LeadEntity mergeLead(LeadEntity leadEntity, LeadDTO leadDTO)
-
toFormJson
public org.json.JSONObject toFormJson(FormEntity formEntity) throws org.json.JSONException
- Throws:
org.json.JSONException
-
toLeadDto
public LeadDTO toLeadDto(LeadEntity leadEntity)
-
toLeadEntity
public LeadEntity toLeadEntity(LeadDTO leadDTO)
-
toFieldDto
public FieldDTO toFieldDto(FieldEntity fieldEntity)
-
toFieldEntity
public FieldEntity toFieldEntity(FieldDTO fieldDTO)
-
toFormDto
public FormDTO toFormDto(FormEntity formEntity)
-
toFormEntity
public FormEntity toFormEntity(FormDTO formDTO)
-
toResponseDto
public ResponseDTO toResponseDto(ResponseEntity responseEntity)
-
toResponseEntity
public ResponseEntity toResponseEntity(ResponseDTO responseDTO)
-
-