Class DefaultTicketService
- java.lang.Object
-
- de.hybris.platform.ticket.service.impl.DefaultTicketService
-
- All Implemented Interfaces:
TicketService
public class DefaultTicketService extends java.lang.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 Summary
Constructors Constructor Description DefaultTicketService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CsAgentGroupModel>getAgentGroups()Retrieves a list of the AgentGroups.java.util.List<CsAgentGroupModel>getAgentGroupsForBaseStore(BaseStoreModel store)Retrieves a list of the AgentGroups for the provided BaseStorejava.util.List<EmployeeModel>getAgents()Retrieves a list of the Agents as Employees.java.util.List<EmployeeModel>getAgentsForBaseStore(BaseStoreModel store)Retrieves a list of the Agents as Employees for the provided BaseStoreAbstractOrderModelgetAssociatedObject(java.lang.String associatedCode, java.lang.String userUid, java.lang.String siteUid)Extract associatedTo object as AbstractOrderModelprotected java.util.Map<java.lang.String,TicketAssociatedObjectResolver>getAssociatedTicketObjectResolverMap()java.util.List<CsEventReason>getEventReasons()Retrieves all available Event Reasons in the system.java.util.List<CsTicketEventModel>getEventsForTicket(CsTicketModel ticket)Gets all ticket events forCsTicketModelobject.java.util.List<CsInterventionType>getInterventionTypes()Retrieves all available Intervention Types in the system.java.util.List<CsResolutionType>getResolutionTypes()Retrieves all available Resolution Types in the system.java.util.List<CsTicketCategory>getTicketCategories()Retrieves all available Ticket Categories in the system.java.util.List<CsTicketEventModel>getTicketEventsForCustomerByTicket(CsTicketModel ticket)Gets all ticket events forCsTicketModelobject excluding private messages.CsTicketModelgetTicketForTicketEvent(CsTicketEventModel ticketEvent)Gets the ticket for givenCsTicketEventModelobject.CsTicketModelgetTicketForTicketId(java.lang.String ticketId)Lookup a specific ticket by ticket IDjava.util.List<CsTicketPriority>getTicketPriorities()Retrieves all available Ticket Priorities in the system.java.util.List<CsTicketModel>getTicketsForAgent(EmployeeModel agent)Find all the tickets that are assigned to the Agent.java.util.List<CsTicketModel>getTicketsForAgentGroup(CsAgentGroupModel agentGroup)Find all the tickets assigned to the AgentGroup.java.util.List<CsTicketModel>getTicketsForCategory(CsTicketCategory... category)Find all the tickets that have the provided categories.java.util.List<CsTicketModel>getTicketsForCustomer(UserModel customer)Find all tickets that are associated with the customer.java.util.List<CsTicketModel>getTicketsForCustomerOrderByModifiedTime(UserModel user)Find all tickets that are associated with the customer in order by Modified date and time.SearchPageData<CsTicketModel>getTicketsForCustomerOrderByModifiedTime(UserModel user, BaseSiteModel baseSite, PageableData pageableData)Find all tickets that are associated with the customer in order by Modified date and time.java.util.List<CsTicketModel>getTicketsForOrder(OrderModel order)Find all the tickets that are associated with the order.java.util.List<CsTicketModel>getTicketsForPriority(CsTicketPriority... priority)Find all the tickets that have the provided priorities.java.util.List<CsTicketModel>getTicketsForResolutionType(CsResolutionType... resolutionType)Find all the tickets that have the provided Resolution Type(s).java.util.List<CsTicketModel>getTicketsForState(CsTicketState... state)Find all the tickets that are in the provided states.java.util.List<CsTicketState>getTicketStates()Retrieves all available Ticket States in the system.CommentTypeModelgetTicketType(java.lang.String type)Get the comment type given the code of that typevoidsetAgentDao(AgentDao agentDao)voidsetAssociatedTicketObjectResolverMap(java.util.Map<java.lang.String,TicketAssociatedObjectResolver> associatedTicketObjectResolverMap)voidsetCommentService(CommentService commentService)voidsetEnumerationService(EnumerationService enumerationService)voidsetTicketDao(TicketDao ticketDao)voidsetTicketSystemComponent(java.lang.String ticketSystemComponent)voidsetTicketSystemDomain(java.lang.String ticketSystemDomain)
-
-
-
Method Detail
-
getAgentGroups
public java.util.List<CsAgentGroupModel> getAgentGroups()
Retrieves a list of the AgentGroups.- Specified by:
getAgentGroupsin interfaceTicketService- Returns:
- The list of AgentGroups
-
getAgentGroupsForBaseStore
public java.util.List<CsAgentGroupModel> getAgentGroupsForBaseStore(BaseStoreModel store)
Retrieves a list of the AgentGroups for the provided BaseStore- Specified by:
getAgentGroupsForBaseStorein interfaceTicketService- Parameters:
store- The BaseStore to retrieve AgentGroups for- Returns:
- The list of AgentGroups
-
getAgents
public java.util.List<EmployeeModel> getAgents()
Retrieves a list of the Agents as Employees.- Specified by:
getAgentsin interfaceTicketService- Returns:
- The list of Agents
-
getAgentsForBaseStore
public java.util.List<EmployeeModel> getAgentsForBaseStore(BaseStoreModel store)
Retrieves a list of the Agents as Employees for the provided BaseStore- Specified by:
getAgentsForBaseStorein interfaceTicketService- Parameters:
store- The BaseStore to retrieve Agents for- Returns:
- The list of Agents
-
getEventReasons
public java.util.List<CsEventReason> getEventReasons()
Retrieves all available Event Reasons in the system.- Specified by:
getEventReasonsin interfaceTicketService- Returns:
- The list of Event Reasons
-
getEventsForTicket
public java.util.List<CsTicketEventModel> getEventsForTicket(CsTicketModel ticket)
Gets all ticket events forCsTicketModelobject.- Specified by:
getEventsForTicketin interfaceTicketService- Parameters:
ticket- theCsTicketModelfor which to return ticket events.- Returns:
- A list of ticket events.
-
getTicketEventsForCustomerByTicket
public java.util.List<CsTicketEventModel> getTicketEventsForCustomerByTicket(CsTicketModel ticket)
Gets all ticket events forCsTicketModelobject excluding private messages.- Specified by:
getTicketEventsForCustomerByTicketin interfaceTicketService- Parameters:
ticket- theCsTicketModelfor which to return ticket events.- Returns:
- A list of ticket events.
-
getInterventionTypes
public java.util.List<CsInterventionType> getInterventionTypes()
Retrieves all available Intervention Types in the system.- Specified by:
getInterventionTypesin interfaceTicketService- Returns:
- The list of Intervention Types
-
getResolutionTypes
public java.util.List<CsResolutionType> getResolutionTypes()
Retrieves all available Resolution Types in the system.- Specified by:
getResolutionTypesin interfaceTicketService- Returns:
- The list of Resolution Types
-
getTicketCategories
public java.util.List<CsTicketCategory> getTicketCategories()
Retrieves all available Ticket Categories in the system.- Specified by:
getTicketCategoriesin interfaceTicketService- Returns:
- The list of Ticket Categories
-
getTicketForTicketEvent
public CsTicketModel getTicketForTicketEvent(CsTicketEventModel ticketEvent)
Gets the ticket for givenCsTicketEventModelobject.- Specified by:
getTicketForTicketEventin interfaceTicketService- Parameters:
ticketEvent- the ticket event- Returns:
- the ticket
-
getTicketForTicketId
public CsTicketModel getTicketForTicketId(java.lang.String ticketId)
Lookup a specific ticket by ticket ID- Specified by:
getTicketForTicketIdin interfaceTicketService- Parameters:
ticketId- The id of the ticket to lookup- Returns:
- The ticket with that Id
-
getTicketPriorities
public java.util.List<CsTicketPriority> getTicketPriorities()
Retrieves all available Ticket Priorities in the system.- Specified by:
getTicketPrioritiesin interfaceTicketService- Returns:
- The list of Ticket Priorities
-
getTicketsForAgent
public java.util.List<CsTicketModel> getTicketsForAgent(EmployeeModel agent)
Find all the tickets that are assigned to the Agent.- Specified by:
getTicketsForAgentin interfaceTicketService- Parameters:
agent- The agent to find assigned tickets for- Returns:
- A list of tickets matching search criteria
-
getTicketsForAgentGroup
public java.util.List<CsTicketModel> getTicketsForAgentGroup(CsAgentGroupModel agentGroup)
Find all the tickets assigned to the AgentGroup.- Specified by:
getTicketsForAgentGroupin interfaceTicketService- Parameters:
agentGroup- The AgentGroup to find assigned tickets for- Returns:
- A list of tickets matching search criteria
-
getTicketsForCategory
public java.util.List<CsTicketModel> getTicketsForCategory(CsTicketCategory... category)
Find all the tickets that have the provided categories.- Specified by:
getTicketsForCategoryin interfaceTicketService- 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 java.util.List<CsTicketModel> getTicketsForCustomer(UserModel customer)
Find all tickets that are associated with the customer.- Specified by:
getTicketsForCustomerin interfaceTicketService- Parameters:
customer- The customer to find tickets for- Returns:
- A list of tickets matching search criteria
-
getTicketsForCustomerOrderByModifiedTime
public java.util.List<CsTicketModel> getTicketsForCustomerOrderByModifiedTime(UserModel user)
Find all tickets that are associated with the customer in order by Modified date and time.- Specified by:
getTicketsForCustomerOrderByModifiedTimein interfaceTicketService- 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:TicketServiceFind all tickets that are associated with the customer in order by Modified date and time.- Specified by:
getTicketsForCustomerOrderByModifiedTimein interfaceTicketService- Parameters:
user- the UserModel whose tickets to be returnedbaseSite- the base sitepageableData- the pageable data- Returns:
- List
-
getTicketsForOrder
public java.util.List<CsTicketModel> getTicketsForOrder(OrderModel order)
Find all the tickets that are associated with the order.- Specified by:
getTicketsForOrderin interfaceTicketService- Parameters:
order- The order to find tickets for- Returns:
- A list of tickets matching search criteria
-
getTicketsForPriority
public java.util.List<CsTicketModel> getTicketsForPriority(CsTicketPriority... priority)
Find all the tickets that have the provided priorities.- Specified by:
getTicketsForPriorityin interfaceTicketService- 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 java.util.List<CsTicketModel> getTicketsForResolutionType(CsResolutionType... resolutionType)
Find all the tickets that have the provided Resolution Type(s).- Specified by:
getTicketsForResolutionTypein interfaceTicketService- 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 java.util.List<CsTicketModel> getTicketsForState(CsTicketState... state)
Find all the tickets that are in the provided states.- Specified by:
getTicketsForStatein interfaceTicketService- 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 java.util.List<CsTicketState> getTicketStates()
Description copied from interface:TicketServiceRetrieves all available Ticket States in the system.- Specified by:
getTicketStatesin interfaceTicketService- Returns:
- The list of Ticket States
-
getTicketType
public CommentTypeModel getTicketType(java.lang.String type)
Description copied from interface:TicketServiceGet the comment type given the code of that type- Specified by:
getTicketTypein interfaceTicketService- Parameters:
type- The type code of comment type to get- Returns:
- The comment type represented by the type code
-
getAssociatedObject
public AbstractOrderModel getAssociatedObject(java.lang.String associatedCode, java.lang.String userUid, java.lang.String siteUid)
Description copied from interface:TicketServiceExtract associatedTo object as AbstractOrderModel- Specified by:
getAssociatedObjectin interfaceTicketService- Parameters:
associatedCode- code of associated objectsiteUid- optionalsiteUid- optionaluserUid- optional- Returns:
- AbstractOrderModel
-
getAssociatedTicketObjectResolverMap
protected java.util.Map<java.lang.String,TicketAssociatedObjectResolver> getAssociatedTicketObjectResolverMap()
-
setAssociatedTicketObjectResolverMap
public void setAssociatedTicketObjectResolverMap(java.util.Map<java.lang.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(java.lang.String ticketSystemComponent)
-
setTicketSystemDomain
public void setTicketSystemDomain(java.lang.String ticketSystemDomain)
-
-