Class DefaultTicketService

java.lang.Object
de.hybris.platform.ticket.service.impl.DefaultTicketService
All Implemented Interfaces:
TicketService

public class DefaultTicketService extends Object implements TicketService
This service class provides mechanism to find CsTickets by various attributes. Also provides methods to retrieve lists of Agents, AgentGroups, Priorities, States, Intervention Types and Reasons based on the available instances at runtime.
  • Constructor Details

    • DefaultTicketService

      public DefaultTicketService()
  • Method Details

    • getAgentGroups

      public List<CsAgentGroupModel> getAgentGroups()
      Retrieves a list of the AgentGroups.
      Specified by:
      getAgentGroups in interface TicketService
      Returns:
      The list of AgentGroups
    • getAgentGroupsForBaseStore

      public List<CsAgentGroupModel> getAgentGroupsForBaseStore(BaseStoreModel store)
      Retrieves a list of the AgentGroups for the provided BaseStore
      Specified by:
      getAgentGroupsForBaseStore in interface TicketService
      Parameters:
      store - The BaseStore to retrieve AgentGroups for
      Returns:
      The list of AgentGroups
    • getAgents

      public List<EmployeeModel> getAgents()
      Retrieves a list of the Agents as Employees.
      Specified by:
      getAgents in interface TicketService
      Returns:
      The list of Agents
    • getAgentsForBaseStore

      public List<EmployeeModel> getAgentsForBaseStore(BaseStoreModel store)
      Retrieves a list of the Agents as Employees for the provided BaseStore
      Specified by:
      getAgentsForBaseStore in interface TicketService
      Parameters:
      store - The BaseStore to retrieve Agents for
      Returns:
      The list of Agents
    • getEventReasons

      public List<CsEventReason> getEventReasons()
      Retrieves all available Event Reasons in the system.
      Specified by:
      getEventReasons in interface TicketService
      Returns:
      The list of Event Reasons
    • getEventsForTicket

      public List<CsTicketEventModel> getEventsForTicket(CsTicketModel ticket)
      Gets all ticket events for CsTicketModel object.
      Specified by:
      getEventsForTicket in interface TicketService
      Parameters:
      ticket - the CsTicketModel for which to return ticket events.
      Returns:
      A list of ticket events.
    • getTicketEventsForCustomerByTicket

      public List<CsTicketEventModel> getTicketEventsForCustomerByTicket(CsTicketModel ticket)
      Gets all ticket events for CsTicketModel object excluding private messages.
      Specified by:
      getTicketEventsForCustomerByTicket in interface TicketService
      Parameters:
      ticket - the CsTicketModel for which to return ticket events.
      Returns:
      A list of ticket events.
    • getTicketEventsByTicketEventCode

      public CsTicketEventModel getTicketEventsByTicketEventCode(CsTicketModel ticket, String eventCode)
      Gets a ticket event for given CsTicketModel object and an event code.
      Specified by:
      getTicketEventsByTicketEventCode in interface TicketService
      Parameters:
      ticket - the CsTicketModel for which to return the ticket event.
      eventCode - the eventCode for which to return the ticket event.
      Returns:
      The ticket event.
    • getTicketEventsForCustomerByTicketEventCode

      public CsTicketEventModel getTicketEventsForCustomerByTicketEventCode(CsTicketModel ticket, String eventCode)
      Gets a ticket event, excluding private messages, for given CsTicketModel object and an event code.
      Specified by:
      getTicketEventsForCustomerByTicketEventCode in interface TicketService
      Parameters:
      ticket - the CsTicketModel for which to return the ticket event.
      eventCode - the eventCode for which to return the ticket event.
      Returns:
      The ticket event.
    • getInterventionTypes

      public List<CsInterventionType> getInterventionTypes()
      Retrieves all available Intervention Types in the system.
      Specified by:
      getInterventionTypes in interface TicketService
      Returns:
      The list of Intervention Types
    • getResolutionTypes

      public List<CsResolutionType> getResolutionTypes()
      Retrieves all available Resolution Types in the system.
      Specified by:
      getResolutionTypes in interface TicketService
      Returns:
      The list of Resolution Types
    • getTicketCategories

      public List<CsTicketCategory> getTicketCategories()
      Retrieves all available Ticket Categories in the system.
      Specified by:
      getTicketCategories in interface TicketService
      Returns:
      The list of Ticket Categories
    • getTicketForTicketEvent

      public CsTicketModel getTicketForTicketEvent(CsTicketEventModel ticketEvent)
      Gets the ticket for given CsTicketEventModel object.
      Specified by:
      getTicketForTicketEvent in interface TicketService
      Parameters:
      ticketEvent - the ticket event
      Returns:
      the ticket
    • getTicketForTicketId

      public CsTicketModel getTicketForTicketId(String ticketId)
      Lookup a specific ticket by ticket ID
      Specified by:
      getTicketForTicketId in interface TicketService
      Parameters:
      ticketId - The id of the ticket to lookup
      Returns:
      The ticket with that Id
    • getTicketPriorities

      public List<CsTicketPriority> getTicketPriorities()
      Retrieves all available Ticket Priorities in the system.
      Specified by:
      getTicketPriorities in interface TicketService
      Returns:
      The list of Ticket Priorities
    • getTicketsForAgent

      public List<CsTicketModel> getTicketsForAgent(EmployeeModel agent)
      Find all the tickets that are assigned to the Agent.
      Specified by:
      getTicketsForAgent in interface TicketService
      Parameters:
      agent - The agent to find assigned tickets for
      Returns:
      A list of tickets matching search criteria
    • getTicketsForAgentGroup

      public List<CsTicketModel> getTicketsForAgentGroup(CsAgentGroupModel agentGroup)
      Find all the tickets assigned to the AgentGroup.
      Specified by:
      getTicketsForAgentGroup in interface TicketService
      Parameters:
      agentGroup - The AgentGroup to find assigned tickets for
      Returns:
      A list of tickets matching search criteria
    • getTicketsForCategory

      public List<CsTicketModel> getTicketsForCategory(CsTicketCategory... category)
      Find all the tickets that have the provided categories.
      Specified by:
      getTicketsForCategory in interface TicketService
      Parameters:
      category - The category/categories for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • getTicketsForCustomer

      public List<CsTicketModel> getTicketsForCustomer(UserModel customer)
      Find all tickets that are associated with the customer.
      Specified by:
      getTicketsForCustomer in interface TicketService
      Parameters:
      customer - The customer to find tickets for
      Returns:
      A list of tickets matching search criteria
    • getTicketsForCustomerOrderByModifiedTime

      public List<CsTicketModel> getTicketsForCustomerOrderByModifiedTime(UserModel user)
      Find all tickets that are associated with the customer in order by Modified date and time.
      Specified by:
      getTicketsForCustomerOrderByModifiedTime in interface TicketService
      Parameters:
      user - the UserModel whose tickets to be returned
      Returns:
      List
    • getTicketsForCustomerOrderByModifiedTime

      public SearchPageData<CsTicketModel> getTicketsForCustomerOrderByModifiedTime(UserModel user, BaseSiteModel baseSite, PageableData pageableData)
      Description copied from interface: TicketService
      Find all tickets that are associated with the customer in order by Modified date and time.
      Specified by:
      getTicketsForCustomerOrderByModifiedTime in interface TicketService
      Parameters:
      user - the UserModel whose tickets to be returned
      baseSite - the base site
      pageableData - the pageable data
      Returns:
      List
    • getTicketsForOrder

      public List<CsTicketModel> getTicketsForOrder(OrderModel order)
      Find all the tickets that are associated with the order.
      Specified by:
      getTicketsForOrder in interface TicketService
      Parameters:
      order - The order to find tickets for
      Returns:
      A list of tickets matching search criteria
    • getTicketsForPriority

      public List<CsTicketModel> getTicketsForPriority(CsTicketPriority... priority)
      Find all the tickets that have the provided priorities.
      Specified by:
      getTicketsForPriority in interface TicketService
      Parameters:
      priority - The priority/priorities for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • getTicketsForResolutionType

      public List<CsTicketModel> getTicketsForResolutionType(CsResolutionType... resolutionType)
      Find all the tickets that have the provided Resolution Type(s).
      Specified by:
      getTicketsForResolutionType in interface TicketService
      Parameters:
      resolutionType - The Resolution Type(s) for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • getTicketsForState

      public List<CsTicketModel> getTicketsForState(CsTicketState... state)
      Find all the tickets that are in the provided states.
      Specified by:
      getTicketsForState in interface TicketService
      Parameters:
      state - The state(s) for which to return tickets. The number of arguments is variable and may be zero, although zero arguments will return an empty list.
      Returns:
      A list of tickets matching search criteria
    • getTicketStates

      public List<CsTicketState> getTicketStates()
      Description copied from interface: TicketService
      Retrieves all available Ticket States in the system.
      Specified by:
      getTicketStates in interface TicketService
      Returns:
      The list of Ticket States
    • getTicketType

      public CommentTypeModel getTicketType(String type)
      Description copied from interface: TicketService
      Get the comment type given the code of that type
      Specified by:
      getTicketType in interface TicketService
      Parameters:
      type - The type code of comment type to get
      Returns:
      The comment type represented by the type code
    • getAssociatedObject

      public AbstractOrderModel getAssociatedObject(String associatedCode, String userUid, String siteUid)
      Description copied from interface: TicketService
      Extract associatedTo object as AbstractOrderModel
      Specified by:
      getAssociatedObject in interface TicketService
      Parameters:
      associatedCode - code of associated object
      siteUid - optional
      siteUid - optional
      userUid - optional
      Returns:
      AbstractOrderModel
    • getAssociatedTicketObjectResolverMap

      protected Map<String,TicketAssociatedObjectResolver> getAssociatedTicketObjectResolverMap()
    • setAssociatedTicketObjectResolverMap

      public void setAssociatedTicketObjectResolverMap(Map<String,TicketAssociatedObjectResolver> associatedTicketObjectResolverMap)
    • setAgentDao

      public void setAgentDao(AgentDao agentDao)
    • setCommentService

      public void setCommentService(CommentService commentService)
    • setEnumerationService

      public void setEnumerationService(EnumerationService enumerationService)
    • setTicketDao

      public void setTicketDao(TicketDao ticketDao)
    • setTicketSystemComponent

      public void setTicketSystemComponent(String ticketSystemComponent)
    • setTicketSystemDomain

      public void setTicketSystemDomain(String ticketSystemDomain)