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 BaseStoreAbstractOrderModel
getAssociatedObject(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 forCsTicketModel
object.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 forCsTicketModel
object excluding private messages.CsTicketModel
getTicketForTicketEvent(CsTicketEventModel ticketEvent)
Gets the ticket for givenCsTicketEventModel
object.CsTicketModel
getTicketForTicketId(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.CommentTypeModel
getTicketType(java.lang.String type)
Get the comment type given the code of that typevoid
setAgentDao(AgentDao agentDao)
void
setAssociatedTicketObjectResolverMap(java.util.Map<java.lang.String,TicketAssociatedObjectResolver> associatedTicketObjectResolverMap)
void
setCommentService(CommentService commentService)
void
setEnumerationService(EnumerationService enumerationService)
void
setTicketDao(TicketDao ticketDao)
void
setTicketSystemComponent(java.lang.String ticketSystemComponent)
void
setTicketSystemDomain(java.lang.String ticketSystemDomain)
-
-
-
Method Detail
-
getAgentGroups
public java.util.List<CsAgentGroupModel> getAgentGroups()
Retrieves a list of the AgentGroups.- Specified by:
getAgentGroups
in 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:
getAgentGroupsForBaseStore
in 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:
getAgents
in 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:
getAgentsForBaseStore
in 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:
getEventReasons
in interfaceTicketService
- Returns:
- The list of Event Reasons
-
getEventsForTicket
public java.util.List<CsTicketEventModel> getEventsForTicket(CsTicketModel ticket)
Gets all ticket events forCsTicketModel
object.- Specified by:
getEventsForTicket
in interfaceTicketService
- Parameters:
ticket
- theCsTicketModel
for which to return ticket events.- Returns:
- A list of ticket events.
-
getTicketEventsForCustomerByTicket
public java.util.List<CsTicketEventModel> getTicketEventsForCustomerByTicket(CsTicketModel ticket)
Gets all ticket events forCsTicketModel
object excluding private messages.- Specified by:
getTicketEventsForCustomerByTicket
in interfaceTicketService
- Parameters:
ticket
- theCsTicketModel
for 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:
getInterventionTypes
in interfaceTicketService
- Returns:
- The list of Intervention Types
-
getResolutionTypes
public java.util.List<CsResolutionType> getResolutionTypes()
Retrieves all available Resolution Types in the system.- Specified by:
getResolutionTypes
in interfaceTicketService
- Returns:
- The list of Resolution Types
-
getTicketCategories
public java.util.List<CsTicketCategory> getTicketCategories()
Retrieves all available Ticket Categories in the system.- Specified by:
getTicketCategories
in interfaceTicketService
- Returns:
- The list of Ticket Categories
-
getTicketForTicketEvent
public CsTicketModel getTicketForTicketEvent(CsTicketEventModel ticketEvent)
Gets the ticket for givenCsTicketEventModel
object.- Specified by:
getTicketForTicketEvent
in 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:
getTicketForTicketId
in 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:
getTicketPriorities
in 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:
getTicketsForAgent
in 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:
getTicketsForAgentGroup
in 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:
getTicketsForCategory
in 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:
getTicketsForCustomer
in 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:
getTicketsForCustomerOrderByModifiedTime
in 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:TicketService
Find all tickets that are associated with the customer in order by Modified date and time.- Specified by:
getTicketsForCustomerOrderByModifiedTime
in 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:
getTicketsForOrder
in 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:
getTicketsForPriority
in 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:
getTicketsForResolutionType
in 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:
getTicketsForState
in 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:TicketService
Retrieves all available Ticket States in the system.- Specified by:
getTicketStates
in interfaceTicketService
- Returns:
- The list of Ticket States
-
getTicketType
public CommentTypeModel getTicketType(java.lang.String type)
Description copied from interface:TicketService
Get the comment type given the code of that type- Specified by:
getTicketType
in 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:TicketService
Extract associatedTo object as AbstractOrderModel- Specified by:
getAssociatedObject
in 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)
-
-