Interface TicketResolutionStrategy
-
- All Known Implementing Classes:
DefaultTicketResolutionStrategy
public interface TicketResolutionStrategy
Interface to support the strategies to be considered when moving a note in and out of resolved state and when finding out if a ticket can be considered 'closed'.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<CsTicketState>
filterTicketStatesToRemovedClosedStates(java.util.List<CsTicketState> states)
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.boolean
isTicketClosed(CsTicketModel ticket)
Find out if a ticket is considered 'closed'.boolean
isTicketResolvable(CsTicketModel ticket)
Find out whether a ticket is resolvable.CsTicketResolutionEventModel
resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note)
Create a resolution event against a ticket and associate it with the ticket.CsTicketResolutionEventModel
resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note, java.util.Collection<MediaModel> attachments)
Create a resolution event against a ticket and associate it with the ticket.CsCustomerEventModel
unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.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.CsCustomerEventModel
unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.String note, java.util.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.
-
-
-
Method Detail
-
resolveTicket
CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note) throws TicketException
Create a resolution event against a ticket and associate it with the ticket. This will also set the resolution event on the ticket itself- 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
CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note, java.util.Collection<MediaModel> attachments) throws TicketException
Create a resolution event against a ticket and associate it with the ticket. This will also set the resolution event on the ticket itself- 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
-
unResolveTicket
CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.String note) throws TicketException
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. This method should also update the ticket state to indicate it is no longer resolved if appropriate.- 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
CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.String note, java.util.Collection<MediaModel> attachments) throws TicketException
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. This method should also update the ticket state to indicate it is no longer resolved if appropriate.- 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.attachments
-- Returns:
- The note created against the ticket.
- Throws:
TicketException
-
isTicketClosed
boolean isTicketClosed(CsTicketModel ticket)
Find out if a ticket is considered 'closed'. This allows for specific implementations to use different rules around reporting a closed ticket.- Parameters:
ticket
- The ticket to check- Returns:
- true if the ticket is closed, false otherwise
-
isTicketResolvable
boolean isTicketResolvable(CsTicketModel ticket)
Find out whether a ticket is resolvable. This allows for specific implementations to use different rules.- Parameters:
ticket
- The ticket to check- Returns:
- true if the ticket is resolvable, false otherwise
-
filterTicketStatesToRemovedClosedStates
java.util.List<CsTicketState> filterTicketStatesToRemovedClosedStates(java.util.List<CsTicketState> states)
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. This method must not return a new states.- Parameters:
states
- The states to filter- Returns:
- A list with any states removed
-
-