Class DefaultTicketResolutionStrategy
java.lang.Object
de.hybris.platform.ticket.strategies.impl.DefaultTicketResolutionStrategy
- All Implemented Interfaces:
TicketResolutionStrategy
Implementation of Ticket Resolution Strategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAttachmentsToEvent(CsTicketEventModel event, Collection<MediaModel> attachments) Filter a given list of ticket states to remove any which represent a resolved state and should only be used by the ticket resolution strategies.protected ModelServicebooleanisTicketClosed(CsTicketModel ticket) Find out if a ticket is considered 'closed'.booleanisTicketResolvable(CsTicketModel ticket) Find out whether a ticket is resolvable.resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, String note) Create a resolution event against a ticket and associate it with the ticket.resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, String note, Collection<MediaModel> attachments) Create a resolution event against a ticket and associate it with the ticket.voidsetAgentNoteEventType(String agentNoteEventType) voidsetDefaultResolvedTicketState(CsTicketState defaultResolvedTicketState) voidsetDefaultUnresolvedTicketState(CsTicketState defaultUnresolvedTicketState) voidsetModelService(ModelService modelService) voidsetResolveEventType(String resolveEventType) voidsetTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy) voidsetTicketEventFactory(TicketEventFactory ticketEventFactory) voidsetTicketUpdateStrategy(TicketUpdateStrategy ticketUpdateStrategy) voidsetUnresolveEventType(String unresolveEventType) unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, String note) Remove the resolution event from the ticket (although keep in in the list of events) and add a note to a ticket to indicate that it is no longer resolved.unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, String note, Collection<MediaModel> attachments) Remove the resolution event from the ticket (although keep in in the list of events) and add a note to a ticket to indicate that it is no longer resolved.
-
Constructor Details
-
DefaultTicketResolutionStrategy
public DefaultTicketResolutionStrategy()
-
-
Method Details
-
resolveTicket
public CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, String note) throws TicketException Description copied from interface:TicketResolutionStrategyCreate a resolution event against a ticket and associate it with the ticket. This will also set the resolution event on the ticket itself- Specified by:
resolveTicketin interfaceTicketResolutionStrategy- Parameters:
ticket- The ticket to mark as resolvedintervention- The intervention of the resolutionresolutionType- The type of the resolutionnote- The text note to add agsint the resolution- Returns:
- The resolution event
- Throws:
TicketException
-
resolveTicket
public CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, String note, Collection<MediaModel> attachments) throws TicketException Description copied from interface:TicketResolutionStrategyCreate a resolution event against a ticket and associate it with the ticket. This will also set the resolution event on the ticket itself- Specified by:
resolveTicketin interfaceTicketResolutionStrategy- Parameters:
ticket- The ticket to mark as resolvedintervention- The intervention of the resolutionresolutionType- The type of the resolutionnote- The text note to add agsint the resolution- Returns:
- The resolution event
- Throws:
TicketException
-
addAttachmentsToEvent
-
unResolveTicket
public CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, String note) throws TicketException Description copied from interface:TicketResolutionStrategyRemove the resolution event from the ticket (although keep in in the list of events) and add a note to a ticket to indicate that it is no longer resolved. This method should also update the ticket state to indicate it is no longer resolved if appropriate.- Specified by:
unResolveTicketin interfaceTicketResolutionStrategy- Parameters:
ticket- The ticket to un-resolveintervention- The intervention that caused the ticket's resolution to be removedreason- The reason for unresolving the ticketnote- The note to add when the ticket is unresolved.- Returns:
- The note created against the ticket.
- Throws:
TicketException
-
unResolveTicket
public CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, String note, Collection<MediaModel> attachments) throws TicketException Description copied from interface:TicketResolutionStrategyRemove the resolution event from the ticket (although keep in in the list of events) and add a note to a ticket to indicate that it is no longer resolved. This method should also update the ticket state to indicate it is no longer resolved if appropriate.- Specified by:
unResolveTicketin interfaceTicketResolutionStrategy- Parameters:
ticket- The ticket to un-resolveintervention- The intervention that caused the ticket's resolution to be removedreason- The reason for unresolving the ticketnote- The note to add when the ticket is unresolved.- Returns:
- The note created against the ticket.
- Throws:
TicketException
-
filterTicketStatesToRemovedClosedStates
Description copied from interface:TicketResolutionStrategyFilter a given list of ticket states to remove any which represent a resolved state and should only be used by the ticket resolution strategies. This method must not return a new states.- Specified by:
filterTicketStatesToRemovedClosedStatesin interfaceTicketResolutionStrategy- Parameters:
states- The states to filter- Returns:
- A list with any states removed
-
isTicketClosed
Description copied from interface:TicketResolutionStrategyFind out if a ticket is considered 'closed'. This allows for specific implementations to use different rules around reporting a closed ticket.- Specified by:
isTicketClosedin interfaceTicketResolutionStrategy- Parameters:
ticket- The ticket to check- Returns:
- true if the ticket is closed, false otherwise
-
isTicketResolvable
Description copied from interface:TicketResolutionStrategyFind out whether a ticket is resolvable. This allows for specific implementations to use different rules.- Specified by:
isTicketResolvablein interfaceTicketResolutionStrategy- Parameters:
ticket- The ticket to check- Returns:
- true if the ticket is resolvable, false otherwise
-
setDefaultResolvedTicketState
-
setDefaultUnresolvedTicketState
-
setTicketUpdateStrategy
-
setTicketEventFactory
-
setResolveEventType
-
setUnresolveEventType
-
setAgentNoteEventType
- Parameters:
agentNoteEventType- the agentNoteEventType to set
-
setTicketAttributeChangeEventStrategy
public void setTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy) -
getAgentNoteEventType
- Returns:
- the agentNoteEventType
-
getModelService
-
setModelService
-