public class DefaultTicketUpdateStrategy extends java.lang.Object implements TicketUpdateStrategy
| Constructor and Description |
|---|
DefaultTicketUpdateStrategy() |
| Modifier and Type | Method and Description |
|---|---|
CsTicketEventModel |
assignTicketToAgent(CsTicketModel ticket,
EmployeeModel agent)
Assign the ticket to a new agent, or null to make the ticket unassigned.
|
CsTicketEventModel |
assignTicketToGroup(CsTicketModel ticket,
CsAgentGroupModel group)
Assign the ticket to a new group, or null to make the ticket unassigned.
|
protected CsTicketEventModel |
createAssignTicketEvent(CsTicketModel ticket,
java.util.Set<CsTicketChangeEventEntryModel> changedValues) |
protected CsTicketEventModel |
createChangeEvent(CsTicketModel ticket,
java.util.Set<CsTicketChangeEventEntryModel> changedValues) |
protected CsTicketEventModel |
createChangeEvent(CsTicketModel ticket,
java.util.Set<CsTicketChangeEventEntryModel> changedValues,
java.lang.String note) |
protected ItemModelContextImpl |
getContext(AbstractItemModel model) |
protected ModelService |
getModelService() |
java.lang.String |
getTicketAssigndEventType() |
java.util.List<CsTicketState> |
getTicketNextStates(CsTicketState currentState)
Get a list of legal states that a ticket can move into.
|
protected boolean |
isValidStateTransition(CsTicketState oldState,
CsTicketState newState) |
protected void |
preChangeTicketAssignment(CsTicketModel ticket,
EmployeeModel agent) |
protected void |
preChangeTicketGroup(CsTicketModel ticket,
CsAgentGroupModel group) |
protected void |
preSetTicketState(CsTicketModel ticket,
CsTicketState newState) |
void |
setAvailableNextStates(java.util.Map<CsTicketState,java.util.List<CsTicketState>> availableNextStates) |
void |
setModelService(ModelService modelService) |
void |
setTicketAssigndEventType(java.lang.String ticketAssigndEventType) |
void |
setTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy) |
void |
setTicketChangeEventType(java.lang.String ticketChangeEventType) |
void |
setTicketEventFactory(TicketEventFactory ticketEventFactory) |
void |
setTicketState(CsTicketModel ticket,
CsTicketState newState)
Set the state of the ticket.
|
void |
setTicketState(CsTicketModel ticket,
CsTicketState newState,
java.lang.String note)
Set the state of the ticket.
|
CsTicketModel |
updateTicket(CsTicketModel ticket)
Store all updated attributes on a ticket.
|
CsTicketModel |
updateTicket(CsTicketModel ticket,
java.lang.String note)
Store all updated attributes on a ticket.
|
public CsTicketModel updateTicket(CsTicketModel ticket) throws TicketException
TicketUpdateStrategyupdateTicket in interface TicketUpdateStrategyticket - The ticket to be updatedTicketException - If the update is not permittedpublic CsTicketModel updateTicket(CsTicketModel ticket, java.lang.String note) throws TicketException
TicketUpdateStrategyupdateTicket in interface TicketUpdateStrategyticket - The ticket to be updatednote - The text of the note to add along with the updateTicketException - If the update is not permittedpublic void setTicketState(CsTicketModel ticket, CsTicketState newState) throws TicketException
TicketUpdateStrategysetTicketState in interface TicketUpdateStrategyticket - The ticket to update the state ofnewState - The state to set the ticket toTicketException - If the ticket has been modified or the state transition is illegalgetTicketNextStates to get list of possible state transitionspublic void setTicketState(CsTicketModel ticket, CsTicketState newState, java.lang.String note) throws TicketException
TicketUpdateStrategysetTicketState in interface TicketUpdateStrategyticket - The ticket to update the state ofnewState - The state to set the ticket tonote - The text of the note to add along with the state changeTicketException - If the ticket has been modified or the state transition is illegalgetTicketNextStates to get list of possible state transitionspublic java.util.List<CsTicketState> getTicketNextStates(CsTicketState currentState)
TicketUpdateStrategygetTicketNextStates in interface TicketUpdateStrategycurrentState - The starting stateprotected boolean isValidStateTransition(CsTicketState oldState, CsTicketState newState)
protected void preSetTicketState(CsTicketModel ticket, CsTicketState newState) throws TicketException
TicketExceptionpublic CsTicketEventModel assignTicketToAgent(CsTicketModel ticket, EmployeeModel agent) throws TicketException
TicketUpdateStrategyassignTicketToAgent in interface TicketUpdateStrategyticket - The ticket to update the state ofagent - The agent to assign the ticket to or null to mark the ticket as unassigned.TicketException - If the ticket has been modified or the assignment is illegalprotected void preChangeTicketAssignment(CsTicketModel ticket, EmployeeModel agent) throws TicketException
TicketExceptionpublic CsTicketEventModel assignTicketToGroup(CsTicketModel ticket, CsAgentGroupModel group) throws TicketException
TicketUpdateStrategyassignTicketToGroup in interface TicketUpdateStrategyticket - The ticket to update the state ofgroup - The agent group to assign the ticket to or null to mark the ticket as unassigned.TicketException - If the ticket has been modified or the assignment is illegalprotected void preChangeTicketGroup(CsTicketModel ticket, CsAgentGroupModel group) throws TicketException
TicketExceptionprotected CsTicketEventModel createAssignTicketEvent(CsTicketModel ticket, java.util.Set<CsTicketChangeEventEntryModel> changedValues)
protected CsTicketEventModel createChangeEvent(CsTicketModel ticket, java.util.Set<CsTicketChangeEventEntryModel> changedValues)
protected CsTicketEventModel createChangeEvent(CsTicketModel ticket, java.util.Set<CsTicketChangeEventEntryModel> changedValues, java.lang.String note)
public void setTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy)
public void setAvailableNextStates(java.util.Map<CsTicketState,java.util.List<CsTicketState>> availableNextStates)
public void setTicketEventFactory(TicketEventFactory ticketEventFactory)
public void setTicketChangeEventType(java.lang.String ticketChangeEventType)
protected ItemModelContextImpl getContext(AbstractItemModel model)
public java.lang.String getTicketAssigndEventType()
public void setTicketAssigndEventType(java.lang.String ticketAssigndEventType)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.