Class DefaultTicketEventStrategy

java.lang.Object
de.hybris.platform.ticket.strategies.impl.DefaultTicketEventStrategy
All Implemented Interfaces:
TicketEventStrategy

public class DefaultTicketEventStrategy extends Object implements TicketEventStrategy
  • Constructor Details

    • DefaultTicketEventStrategy

      public DefaultTicketEventStrategy()
  • Method Details

    • createNoteForTicket

      public CsCustomerEventModel createNoteForTicket(CsTicketModel ticket, CsInterventionType intervention, CsEventReason reason, String note, Collection<MediaModel> attachments)
      Description copied from interface: TicketEventStrategy
      Create and internal note against the ticket with the specified information
      Specified by:
      createNoteForTicket in interface TicketEventStrategy
      Parameters:
      ticket - The ticket to create the note for
      intervention - The intervention type of the note
      reason - The reason for the note's creation
      note - The text of the note
      attachments - Any attachments which should be added to the note
      Returns:
      The newly create note
    • createAssignAgentToTicket

      public CsCustomerEventModel createAssignAgentToTicket(CsTicketModel ticket)
      Description copied from interface: TicketEventStrategy
      Create a creation event for the specified ticket TO THE CS Agent.
      Specified by:
      createAssignAgentToTicket in interface TicketEventStrategy
      Parameters:
      ticket - The ticket the creation event is for
      Returns:
      CsTicketEventModel
    • createCustomerEmailForTicket

      public CsCustomerEventModel createCustomerEmailForTicket(CsTicketModel ticket, CsEventReason reason, String subject, String emailBody, Collection<MediaModel> attachments)
      Description copied from interface: TicketEventStrategy
      Create a note against the ticket which is sent as an email to the customer the ticket relates to
      Specified by:
      createCustomerEmailForTicket in interface TicketEventStrategy
      Parameters:
      ticket - The ticket to create the note email for
      reason - The reason for the email
      subject - The subject of the email
      emailBody - The body of the email
      attachments - Any attachments should be included with the email
      Returns:
      The newly create email
    • createCreationEventForTicket

      public CsCustomerEventModel createCreationEventForTicket(CsTicketModel ticket, CsEventReason reason, CsInterventionType interventionType, String text)
      Description copied from interface: TicketEventStrategy
      Create a creation event for the specified ticket.
      Specified by:
      createCreationEventForTicket in interface TicketEventStrategy
      Parameters:
      ticket - The ticket to create the creation event for
      reason - The reson for the ticket event
      interventionType - The intervention type for the ticket event
      text - The text to add to the creation event
      Returns:
      The newly created creation event
    • ensureTicketEventSetupForCreationEvent

      public CsCustomerEventModel ensureTicketEventSetupForCreationEvent(CsTicketModel ticket, CsCustomerEventModel creationEvent)
      Description copied from interface: TicketEventStrategy
      Ensure that the specified creation event is correctly setup and bound to the ticket. This ensures that all of the manadatory underlying fields on the event are populated.
      Specified by:
      ensureTicketEventSetupForCreationEvent in interface TicketEventStrategy
      Parameters:
      ticket - The ticket the creation event is for
      creationEvent - The creation event
      Returns:
      The updated creation event
    • onTicketCreation

      protected void onTicketCreation(CsTicketModel ticket, CsCustomerEventModel creationEvent)
      Placeholder for post ticket creation business rules
    • addAttachmentsToEvent

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

      public void setEmailCommentType(String emailCommentType)
    • setTicketCreatedType

      public void setTicketCreatedType(String ticketCreatedType)
    • setTicketEventFactory

      public void setTicketEventFactory(TicketEventFactory ticketEventFactory)
    • setOpenState

      public void setOpenState(CsTicketState openState)
    • setCustomerNoteCommentType

      public void setCustomerNoteCommentType(String customerNoteCommentType)
      Parameters:
      customerNoteCommentType - the customerNoteCommentType to set
    • setAgentNoteCommentType

      public void setAgentNoteCommentType(String agentNoteCommentType)
      Parameters:
      agentNoteCommentType - the agentNoteCommentType to set
    • getTicketEventFactory

      protected TicketEventFactory getTicketEventFactory()
      Returns:
      the ticketEventFactory
    • getTicketCreatedType

      protected String getTicketCreatedType()
      Returns:
      the ticketCreatedType
    • getEmailCommentType

      protected String getEmailCommentType()
      Returns:
      the emailCommentType
    • getOpenState

      protected CsTicketState getOpenState()
      Returns:
      the openState
    • getCustomerNoteCommentType

      public String getCustomerNoteCommentType()
      Returns:
      the customerNoteCommentType
    • getAgentNoteCommentType

      public String getAgentNoteCommentType()
      Returns:
      the agentNoteCommentType
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)