public class DefaultTicketBusinessService extends java.lang.Object implements TicketBusinessService
| Constructor and Description |
|---|
DefaultTicketBusinessService() |
| Modifier and Type | Method and Description |
|---|---|
CsCustomerEventModel |
addCustomerEmailToTicket(CsTicketModel ticket,
CsEventReason reason,
java.lang.String subject,
java.lang.String emailBody,
java.util.Collection<MediaModel> attachments)
Add a customer email to the specified ticket.
|
CsCustomerEventModel |
addNoteToTicket(CsTicketModel ticket,
CsInterventionType intervention,
CsEventReason reason,
java.lang.String note,
java.util.Collection<MediaModel> attachments)
Add a note to the specified ticket.
|
CsTicketModel |
assignTicketToAgent(CsTicketModel ticket,
EmployeeModel agent)
Sets the assignedAgent of the Ticket, i.e.
|
CsTicketModel |
assignTicketToGroup(CsTicketModel ticket,
CsAgentGroupModel group)
Sets the assignedGroup of the Ticket, i.e.
|
CsTicketModel |
createTicket(CsTicketModel ticket,
CsCustomerEventModel creationEvent)
Deprecated.
since 6.0 use
createTicket(CsTicketParameter) instead |
CsTicketModel |
createTicket(CsTicketParameter ticketParameter)
Create a new ticket with the parameters defined in
CsTicketParameter |
protected CsTicketModel |
createTicketInternal(CsTicketModel ticket,
CsCustomerEventModel creationEvent) |
BaseSiteService |
getBaseSiteService() |
CsTicketEventModel |
getLastEvent(CsTicketModel ticket)
Returns the last event on the ticket.
|
protected ModelService |
getModelService() |
protected TicketAttachmentsService |
getTicketAttachmentsService() |
TicketEventEmailStrategy |
getTicketEventEmailStrategy() |
java.util.List<CsTicketState> |
getTicketNextStates(CsTicketModel ticket)
Returns a list of states that the passed ticket can move to according to configured rules.
|
java.util.List<CsTicketState> |
getTicketNextStates(CsTicketState state)
Get the list of states which can come after the passed on
|
protected Converter<CsTicketParameter,CsTicketModel> |
getTicketParameterConverter() |
protected TimeService |
getTimeService() |
protected UserService |
getUserService() |
boolean |
isTicketClosed(CsTicketModel ticket)
Find out whether a ticket is closed.
|
boolean |
isTicketResolvable(CsTicketModel ticket)
Find out whether a ticket is resolvable.
|
protected CsTicketModel |
populateTicketDetails(UserModel customer,
AbstractOrderModel abstractOrder,
CsTicketCategory category,
CsTicketPriority priority,
EmployeeModel assignedAgent,
CsAgentGroupModel assignedGroup,
java.lang.String headline) |
java.lang.String |
renderTicketEventText(CsTicketEventModel ticketEvent)
Get a description of a ticket for rendering on front ends
|
CsTicketResolutionEventModel |
resolveTicket(CsTicketModel ticket,
CsInterventionType intervention,
CsResolutionType resolutionType,
java.lang.String note)
Resolve a ticket and add the associated resolution event.
|
CsTicketResolutionEventModel |
resolveTicket(CsTicketModel ticket,
CsInterventionType intervention,
CsResolutionType resolutionType,
java.lang.String note,
java.util.Collection<MediaModel> attachments)
Resolve a ticket and add the associated resolution event.
|
void |
setBaseSiteService(BaseSiteService baseSiteService) |
void |
setModelService(ModelService modelService) |
void |
setTicketAttachmentsService(TicketAttachmentsService ticketAttachmentsService) |
void |
setTicketEventEmailStrategy(TicketEventEmailStrategy ticketEventEmailStrategy) |
void |
setTicketEventStrategy(TicketEventStrategy ticketEventStrategy) |
void |
setTicketParameterConverter(Converter<CsTicketParameter,CsTicketModel> ticketParameterConverter) |
void |
setTicketRenderStrategy(TicketRenderStrategy ticketRenderStrategy) |
void |
setTicketResolutionStrategy(TicketResolutionStrategy ticketResolutionStrategy) |
CsTicketModel |
setTicketState(CsTicketModel ticket,
CsTicketState newState)
Set the state of a ticket.
|
CsTicketModel |
setTicketState(CsTicketModel ticket,
CsTicketState newState,
java.lang.String note)
Set the state of a ticket.
|
void |
setTicketUpdateStrategy(TicketUpdateStrategy ticketUpdateStrategy) |
void |
setTimeService(TimeService timeService) |
void |
setUserService(UserService userService) |
CsCustomerEventModel |
unResolveTicket(CsTicketModel ticket,
CsInterventionType intervention,
CsEventReason reason,
java.lang.String note)
Reverse the resolution of a ticket and add a note to it.
|
CsCustomerEventModel |
unResolveTicket(CsTicketModel ticket,
CsInterventionType intervention,
CsEventReason reason,
java.lang.String note,
java.util.Collection<MediaModel> attachments)
Reverse the resolution of a ticket and add a note to it.
|
CsTicketModel |
updateTicket(CsTicketModel ticket)
Update the details of a ticket.
|
CsTicketModel |
updateTicket(CsTicketModel ticket,
java.lang.String note)
Update the details of a ticket.
|
public CsTicketModel createTicket(CsTicketParameter ticketParameter)
TicketBusinessServiceCsTicketParametercreateTicket in interface TicketBusinessServiceticketParameter - Ticker creation parameters@Deprecated public CsTicketModel createTicket(CsTicketModel ticket, CsCustomerEventModel creationEvent)
createTicket(CsTicketParameter) insteadcreateTicket in interface TicketBusinessServiceticket - The new ticketcreationEvent - The creation event to associate with the new ticketprotected CsTicketModel createTicketInternal(CsTicketModel ticket, CsCustomerEventModel creationEvent)
protected CsTicketModel populateTicketDetails(UserModel customer, AbstractOrderModel abstractOrder, CsTicketCategory category, CsTicketPriority priority, EmployeeModel assignedAgent, CsAgentGroupModel assignedGroup, java.lang.String headline)
public CsTicketModel updateTicket(CsTicketModel ticket) throws TicketException
TicketBusinessServiceupdateTicket in interface TicketBusinessServiceticket - The ticket to update the details ofTicketException - If the ticket is null or the update is not permittedpublic CsTicketModel updateTicket(CsTicketModel ticket, java.lang.String note) throws TicketException
TicketBusinessServiceupdateTicket in interface TicketBusinessServiceticket - The ticket to update the details ofnote - The note to associate with the updateTicketException - TicketException
In case if:
1)the ticket is null
2)the note is null or empty
3)the update is not permittedpublic CsTicketModel setTicketState(CsTicketModel ticket, CsTicketState newState) throws TicketException
TicketBusinessServicesetTicketState in interface TicketBusinessServiceticket - The ticket to change the state ofnewState - The new state of the ticketTicketException - If the ticket has been modifiedpublic CsTicketModel setTicketState(CsTicketModel ticket, CsTicketState newState, java.lang.String note) throws TicketException
TicketBusinessServicesetTicketState in interface TicketBusinessServiceticket - The ticket to change the state ofnewState - The new state of the ticketnote - The note to associate with the state changeTicketException - If the ticket has been modifiedpublic java.util.List<CsTicketState> getTicketNextStates(CsTicketModel ticket)
TicketBusinessServicegetTicketNextStates in interface TicketBusinessServiceticket - The current state of the ticketpublic java.util.List<CsTicketState> getTicketNextStates(CsTicketState state)
TicketBusinessServicegetTicketNextStates in interface TicketBusinessServicestate - The state to get the next states frompublic CsTicketModel assignTicketToAgent(CsTicketModel ticket, EmployeeModel agent) throws TicketException
TicketBusinessServiceassignTicketToAgent in interface TicketBusinessServiceticket - The Ticket to assignagent - The Agent to assign the ticket toTicketException - If the ticket has been modifiedpublic CsTicketModel assignTicketToGroup(CsTicketModel ticket, CsAgentGroupModel group) throws TicketException
TicketBusinessServiceassignTicketToGroup in interface TicketBusinessServiceticket - The Ticket to assigngroup - The Group to assign the ticket toTicketException - If the ticket has been modifiedpublic CsCustomerEventModel addNoteToTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.String note, java.util.Collection<MediaModel> attachments)
TicketBusinessServiceaddNoteToTicket in interface TicketBusinessServiceticket - The ticket to add the note tointervention - The interventionType of the notereason - The reason for the interventionnote - The note to addattachments - The attachments to add to the notepublic CsCustomerEventModel addCustomerEmailToTicket(CsTicketModel ticket, CsEventReason reason, java.lang.String subject, java.lang.String emailBody, java.util.Collection<MediaModel> attachments)
TicketBusinessServiceaddCustomerEmailToTicket in interface TicketBusinessServiceticket - The ticket to add the email toreason - The reason for the emailsubject - The subject of the emailemailBody - The body of the emailattachments - The attachments to add to the emailpublic CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note) throws TicketException
TicketBusinessServiceresolveTicket in interface TicketBusinessServiceticket - The ticket to be resolvedintervention - Intervention TyperesolutionType - The resolution reason for the ticketnote - messageTicketException - if the ticket is null or missing arguments required to resolve ticketpublic CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note, java.util.Collection<MediaModel> attachments) throws TicketException
TicketBusinessServiceresolveTicket in interface TicketBusinessServiceticket - The ticket to be resolvedintervention - Intervention TyperesolutionType - The resolution reason for the ticketnote - messageattachments - as attachmentsTicketException - if the ticket is null or missing arguments required to resolve ticketpublic CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.String note) throws TicketException
TicketBusinessServiceunResolveTicket in interface TicketBusinessServiceticket - The ticket to 'unresolve'intervention - The interventionType for the eventreason - The reason for the eventnote - The content of the note to add to the ticketTicketException - if the ticket is null or missing arguments required to unresolve ticketpublic CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.String note, java.util.Collection<MediaModel> attachments) throws TicketException
TicketBusinessServiceunResolveTicket in interface TicketBusinessServiceticket - The ticket to 'unresolve'intervention - The interventionType for the eventreason - The reason for the eventnote - The content of the note to add to the ticketattachments - as ticket attachmentsTicketException - if the ticket is null or missing arguments required to resolve ticketpublic boolean isTicketClosed(CsTicketModel ticket)
TicketBusinessServiceisTicketClosed in interface TicketBusinessServiceticket - The ticket to checkpublic boolean isTicketResolvable(CsTicketModel ticket)
TicketBusinessServiceisTicketResolvable in interface TicketBusinessServiceticket - The ticket to checkpublic CsTicketEventModel getLastEvent(CsTicketModel ticket)
TicketBusinessServicegetLastEvent in interface TicketBusinessServiceticket - The ticket to retrieve the last event forpublic java.lang.String renderTicketEventText(CsTicketEventModel ticketEvent)
TicketBusinessServicerenderTicketEventText in interface TicketBusinessServiceticketEvent - The ticket to get the description ofpublic void setTicketUpdateStrategy(TicketUpdateStrategy ticketUpdateStrategy)
public void setTicketEventStrategy(TicketEventStrategy ticketEventStrategy)
public void setTicketEventEmailStrategy(TicketEventEmailStrategy ticketEventEmailStrategy)
public void setTicketResolutionStrategy(TicketResolutionStrategy ticketResolutionStrategy)
public void setTicketRenderStrategy(TicketRenderStrategy ticketRenderStrategy)
public TicketEventEmailStrategy getTicketEventEmailStrategy()
public BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
baseSiteService - the baseSiteService to setprotected Converter<CsTicketParameter,CsTicketModel> getTicketParameterConverter()
public void setTicketParameterConverter(Converter<CsTicketParameter,CsTicketModel> ticketParameterConverter)
protected UserService getUserService()
public void setUserService(UserService userService)
protected TicketAttachmentsService getTicketAttachmentsService()
public void setTicketAttachmentsService(TicketAttachmentsService ticketAttachmentsService)
protected TimeService getTimeService()
public void setTimeService(TimeService timeService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.