Class TicketService


  • public class TicketService
    extends BaseService
    Created by The eXo Platform SAS
    Since:
    Apr 27, 2016
    Author:
    boubaker.khanfir@exoplatform.com
    • Constructor Detail

      • TicketService

        public TicketService​(org.exoplatform.forum.service.ForumService forumService,
                             TicketAttachmentService ticketAttachmentService,
                             org.exoplatform.services.listener.ListenerService listenerService,
                             org.exoplatform.task.service.ProjectService projectService,
                             org.exoplatform.task.service.StatusService statusService,
                             org.exoplatform.task.service.TaskService taskService,
                             SlaService slaService,
                             EnvironmentDAO environmentDAO,
                             SpaceDAO spaceDAO,
                             TopicDAO topicDAO,
                             LogDAO logDAO,
                             org.exoplatform.social.core.manager.IdentityManager identityManager)
    • Method Detail

      • getTicketsByEnvironment

        public List<TicketDTO> getTicketsByEnvironment​(Long id)
      • getTicketsEntityByEnvironment

        public List<TopicEntity> getTicketsEntityByEnvironment​(Long id)
      • getAllTicketsWithPagination

        public List<TicketDTO> getAllTicketsWithPagination​(int offset,
                                                           int limit)
      • updateTicket

        public TicketDTO updateTicket​(TicketDTO ticketDTO,
                                      org.exoplatform.services.organization.User user)
                               throws Exception
        Update Ticket
        Parameters:
        ticketDTO - the customer ticket
        user - The user who updated the ticket
        Returns:
        TicketDTO updated
        Throws:
        Exception - if broadcasting the event failed
      • updateTicketCreator

        public void updateTicketCreator​(TicketDTO ticketDTO,
                                        String creator)
                                 throws Exception
        Update the creator on the entity
        Parameters:
        ticketDTO - the ticket to update
        creator - the creator of the ticket
        Throws:
        Exception
      • updateTicketSatisfaction

        public void updateTicketSatisfaction​(TicketDTO ticketDTO,
                                             String userId)
                                      throws Exception
        Update the creator on the entity
        Parameters:
        ticketDTO - the ticket to update
        Throws:
        Exception
      • updateTicketOwner

        public void updateTicketOwner​(TicketDTO ticketDTO,
                                      Owner owner)
                               throws Exception
        Update the creator on the entity
        Parameters:
        ticketDTO - the ticket to update
        owner - the creator of the ticket
        Throws:
        Exception
      • updateTicketAssignee

        public void updateTicketAssignee​(TicketDTO ticketDTO,
                                         String assignee)
                                  throws Exception
        Update the creator on the entity
        Parameters:
        ticketDTO - the ticket to update
        assignee - the assignee of the ticket
        Throws:
        Exception
      • cancelTicketWarning

        public void cancelTicketWarning​(TicketDTO ticketDTO)
                                 throws Exception
        CancelTicketWarning
        Parameters:
        ticketDTO - the ticket to update
        Throws:
        Exception
      • updateTicketLink

        public void updateTicketLink​(TicketDTO ticket,
                                     String link)
        Update the link on the entity
        Parameters:
        ticket - the ticket to update
        link - the link of the ticket
      • createTicket

        public void createTicket​(TicketDTO ticketDTO,
                                 org.exoplatform.services.organization.User user,
                                 String spaceLink)
                          throws Exception
        Throws:
        Exception
      • deleteTicket

        public void deleteTicket​(TicketDTO ticket)
        Delete a ticket and the related task or forum topic
        Parameters:
        ticket - The ticket to delete
      • notifyCustomerRate

        public void notifyCustomerRate​(TicketDTO ticketDTO,
                                       String raterUsername,
                                       boolean isRatedFromMail)
      • countCustomerTicketsGroupdBySpace

        public List<Object[]> countCustomerTicketsGroupdBySpace​(boolean internal)
      • countCustomerTicketsGroupdByOwner

        public List<Object[]> countCustomerTicketsGroupdByOwner​(boolean internal)
      • countCustomerTicketsGroupdByStatus

        public List<Object[]> countCustomerTicketsGroupdByStatus​(boolean internal)
      • getCustomerOpenTicketsCount

        public Long getCustomerOpenTicketsCount​(boolean internal)
      • getCustomerClosedTicketsCount

        public Long getCustomerClosedTicketsCount​(boolean internal)
      • getCustomerOpenTicketsCountByDates

        public Long getCustomerOpenTicketsCountByDates​(boolean internal,
                                                       Calendar from,
                                                       Calendar to)
      • getCustomerClosedTicketsCountByDates

        public Long getCustomerClosedTicketsCountByDates​(boolean internal,
                                                         Calendar from,
                                                         Calendar to)
      • countCustomerTicketsGroupdByStatusAndDates

        public List<Object[]> countCustomerTicketsGroupdByStatusAndDates​(boolean internal,
                                                                         Calendar from,
                                                                         Calendar to)
      • countSatisfiedTicketNumber

        public Long countSatisfiedTicketNumber​(boolean internal)
      • countSatisfiedTicketNumberByDates

        public Long countSatisfiedTicketNumberByDates​(boolean internal,
                                                      Calendar from,
                                                      Calendar to)
      • countNotSatisfiedTicketNumber

        public Long countNotSatisfiedTicketNumber​(boolean internal)
      • countNotSatisfiedTicketNumberByDates

        public Long countNotSatisfiedTicketNumberByDates​(boolean internal,
                                                         Calendar from,
                                                         Calendar to)
      • getTimeToFirstResponseAvg

        public Double getTimeToFirstResponseAvg​(boolean internal)
      • getTimeToResolutionAvg

        public Double getTimeToResolutionAvg​(boolean internal)
      • countSpaceTicketsGroupdByStatus

        public List<Object[]> countSpaceTicketsGroupdByStatus​(String space)
      • countSpaceTicketsGroupdByOwner

        public List<Object[]> countSpaceTicketsGroupdByOwner​(String space)
      • countSpaceTicketsGroupdByAssignee

        public List<Object[]> countSpaceTicketsGroupdByAssignee​(String space)
      • countCustomerTicketsGroupdByAssigneeAndDates

        public List<Object[]> countCustomerTicketsGroupdByAssigneeAndDates​(boolean internal,
                                                                           Calendar from,
                                                                           Calendar to)
      • countCustomerTicketsGroupdByAssigne

        public List<Object[]> countCustomerTicketsGroupdByAssigne​(boolean internal)
      • countCustomerTicketsGroupdBySeverityAndDates

        public List<Object[]> countCustomerTicketsGroupdBySeverityAndDates​(boolean internal,
                                                                           Calendar from,
                                                                           Calendar to)
      • countCustomerTicketsGroupdBySeverity

        public List<Object[]> countCustomerTicketsGroupdBySeverity​(boolean internal)
      • countSpaceSatisfiedTicketNumber

        public Long countSpaceSatisfiedTicketNumber​(String space)
      • countSpaceSatisfiedTicketNumberByDates

        public Long countSpaceSatisfiedTicketNumberByDates​(String space,
                                                           Calendar from,
                                                           Calendar to)
      • countSpaceNotSatisfiedTicketNumber

        public Long countSpaceNotSatisfiedTicketNumber​(String space)
      • countSpaceNotSatisfiedTicketNumberByDates

        public Long countSpaceNotSatisfiedTicketNumberByDates​(String space,
                                                              Calendar from,
                                                              Calendar to)
      • getSpaceTimeToFirstResponseAvg

        public Double getSpaceTimeToFirstResponseAvg​(String space)
      • getSpaceTimeToResolutionAvg

        public Double getSpaceTimeToResolutionAvg​(String space)