Class DefaultTicketResolutionStrategy

java.lang.Object
de.hybris.platform.ticket.strategies.impl.DefaultTicketResolutionStrategy
All Implemented Interfaces:
TicketResolutionStrategy

public class DefaultTicketResolutionStrategy extends Object implements TicketResolutionStrategy
Implementation of Ticket Resolution Strategy
  • 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: TicketResolutionStrategy
      Create 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:
      resolveTicket in interface TicketResolutionStrategy
      Parameters:
      ticket - The ticket to mark as resolved
      intervention - The intervention of the resolution
      resolutionType - The type of the resolution
      note - 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: TicketResolutionStrategy
      Create 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:
      resolveTicket in interface TicketResolutionStrategy
      Parameters:
      ticket - The ticket to mark as resolved
      intervention - The intervention of the resolution
      resolutionType - The type of the resolution
      note - The text note to add agsint the resolution
      Returns:
      The resolution event
      Throws:
      TicketException
    • addAttachmentsToEvent

      protected void addAttachmentsToEvent(CsTicketEventModel event, Collection<MediaModel> attachments)
    • unResolveTicket

      public CsCustomerEventModel unResolveTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, String note) throws TicketException
      Description copied from interface: TicketResolutionStrategy
      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.
      Specified by:
      unResolveTicket in interface TicketResolutionStrategy
      Parameters:
      ticket - The ticket to un-resolve
      intervention - The intervention that caused the ticket's resolution to be removed
      reason - The reason for unresolving the ticket
      note - 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: TicketResolutionStrategy
      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.
      Specified by:
      unResolveTicket in interface TicketResolutionStrategy
      Parameters:
      ticket - The ticket to un-resolve
      intervention - The intervention that caused the ticket's resolution to be removed
      reason - The reason for unresolving the ticket
      note - The note to add when the ticket is unresolved.
      Returns:
      The note created against the ticket.
      Throws:
      TicketException
    • filterTicketStatesToRemovedClosedStates

      public List<CsTicketState> filterTicketStatesToRemovedClosedStates(List<CsTicketState> states)
      Description copied from interface: TicketResolutionStrategy
      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.
      Specified by:
      filterTicketStatesToRemovedClosedStates in interface TicketResolutionStrategy
      Parameters:
      states - The states to filter
      Returns:
      A list with any states removed
    • isTicketClosed

      public boolean isTicketClosed(CsTicketModel ticket)
      Description copied from interface: TicketResolutionStrategy
      Find out if a ticket is considered 'closed'. This allows for specific implementations to use different rules around reporting a closed ticket.
      Specified by:
      isTicketClosed in interface TicketResolutionStrategy
      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: TicketResolutionStrategy
      Find out whether a ticket is resolvable. This allows for specific implementations to use different rules.
      Specified by:
      isTicketResolvable in interface TicketResolutionStrategy
      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(String resolveEventType)
    • setUnresolveEventType

      public void setUnresolveEventType(String unresolveEventType)
    • setAgentNoteEventType

      public void setAgentNoteEventType(String agentNoteEventType)
      Parameters:
      agentNoteEventType - the agentNoteEventType to set
    • setTicketAttributeChangeEventStrategy

      public void setTicketAttributeChangeEventStrategy(TicketAttributeChangeEventStrategy ticketAttributeChangeEventStrategy)
    • getAgentNoteEventType

      public String getAgentNoteEventType()
      Returns:
      the agentNoteEventType
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)