Class DefaultTicketResolutionStrategy
- java.lang.Object
-
- de.hybris.platform.ticket.strategies.impl.DefaultTicketResolutionStrategy
-
- All Implemented Interfaces:
TicketResolutionStrategy
public class DefaultTicketResolutionStrategy extends java.lang.Object implements TicketResolutionStrategy
Implementation of Ticket Resolution Strategy
-
-
Constructor Summary
Constructors Constructor Description DefaultTicketResolutionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAttachmentsToEvent(CsTicketEventModel event, java.util.Collection<MediaModel> attachments)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.java.lang.StringgetAgentNoteEventType()protected ModelServicegetModelService()booleanisTicketClosed(CsTicketModel ticket)Find out if a ticket is considered 'closed'.booleanisTicketResolvable(CsTicketModel ticket)Find out whether a ticket is resolvable.CsTicketResolutionEventModelresolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.String note)Create a resolution event against a ticket and associate it with the ticket.CsTicketResolutionEventModelresolveTicket(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.voidsetAgentNoteEventType(java.lang.String agentNoteEventType)voidsetDefaultResolvedTicketState(CsTicketState defaultResolvedTicketState)voidsetDefaultUnresolvedTicketState(CsTicketState defaultUnresolvedTicketState)voidsetModelService(ModelService modelService)voidsetResolveEventType(java.lang.String resolveEventType)voidsetTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy)voidsetTicketEventFactory(TicketEventFactory ticketEventFactory)voidsetTicketUpdateStrategy(TicketUpdateStrategy ticketUpdateStrategy)voidsetUnresolveEventType(java.lang.String unresolveEventType)CsCustomerEventModelunResolveTicket(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.CsCustomerEventModelunResolveTicket(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
public CsTicketResolutionEventModel resolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsResolutionType resolutionType, java.lang.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, java.lang.String note, java.util.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
protected void addAttachmentsToEvent(CsTicketEventModel event, java.util.Collection<MediaModel> attachments)
-
unResolveTicket
public CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, java.lang.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, java.lang.String note, java.util.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
public java.util.List<CsTicketState> filterTicketStatesToRemovedClosedStates(java.util.List<CsTicketState> states)
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
public boolean isTicketClosed(CsTicketModel ticket)
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
public boolean isTicketResolvable(CsTicketModel ticket)
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
public void setDefaultResolvedTicketState(CsTicketState defaultResolvedTicketState)
-
setDefaultUnresolvedTicketState
public void setDefaultUnresolvedTicketState(CsTicketState defaultUnresolvedTicketState)
-
setTicketUpdateStrategy
public void setTicketUpdateStrategy(TicketUpdateStrategy ticketUpdateStrategy)
-
setTicketEventFactory
public void setTicketEventFactory(TicketEventFactory ticketEventFactory)
-
setResolveEventType
public void setResolveEventType(java.lang.String resolveEventType)
-
setUnresolveEventType
public void setUnresolveEventType(java.lang.String unresolveEventType)
-
setAgentNoteEventType
public void setAgentNoteEventType(java.lang.String agentNoteEventType)
- Parameters:
agentNoteEventType- the agentNoteEventType to set
-
setTicketAttributeChangeEventStrategy
public void setTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy)
-
getAgentNoteEventType
public java.lang.String getAgentNoteEventType()
- Returns:
- the agentNoteEventType
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
-