Class DefaultCustomerTicketingFacade

java.lang.Object
de.hybris.platform.customerticketingfacades.customerticket.DefaultCustomerTicketingFacade
All Implemented Interfaces:
TicketFacade

public class DefaultCustomerTicketingFacade extends Object implements TicketFacade
CS Integration Ticket Facade Facade should provide access to a user's support ticket details and full details of support ticket.
  • Field Details

  • Constructor Details

    • DefaultCustomerTicketingFacade

      public DefaultCustomerTicketingFacade()
  • Method Details

    • createTicket

      public TicketData createTicket(TicketData ticketData)
      Description copied from interface: TicketFacade
      Creates ticket.
      Specified by:
      createTicket in interface TicketFacade
      Parameters:
      ticketData - TicketData
      Returns:
      TicketData or null
    • getDefaultCsAgentManagerGroup

      protected CsAgentGroupModel getDefaultCsAgentManagerGroup()
      Returns:
      CsAgentGroupModel - Default Cs Agent Group Manager
    • updateTicket

      public TicketData updateTicket(TicketData ticketData)
      Description copied from interface: TicketFacade
      Updates ticket
      Specified by:
      updateTicket in interface TicketFacade
      Parameters:
      ticketData - TicketData
      Returns:
      TicketData
    • addAttachmentToEventByEventCode

      public TicketEventData addAttachmentToEventByEventCode(String ticketId, String eventCode, org.springframework.web.multipart.MultipartFile file)
      Description copied from interface: TicketFacade
      Requesting for adding an attachment to a ticket event of a customer by event code.
      Specified by:
      addAttachmentToEventByEventCode in interface TicketFacade
      Parameters:
      ticketId - ticket data object
      eventCode - ticket event code
      file - file to be uploaded as attachment
      Returns:
      TicketEventData or null
    • getAttachments

      protected List<MediaModel> getAttachments(TicketData ticketData)
      Parameters:
      ticketData -
      Returns:
      List
    • createAttachmentModel

      protected MediaModel createAttachmentModel(org.springframework.web.multipart.MultipartFile file)
      Parameters:
      file -
      Returns:
      MediaModel
    • getCsStatus

      protected CsTicketState getCsStatus(TicketData data)
      Matches TicketData.Status with CsTicketStatus, using statusMapping map.
      Parameters:
      data -
      Returns:
      CsTicketState
    • getAttachmentFileByAttachmentId

      public TicketEventAttachmentFileData getAttachmentFileByAttachmentId(String ticketId, String eventCode, String attachmentId)
      Description copied from interface: TicketFacade
      Requesting to retrieve an attachment file to a ticket event of a customer by event code.
      Specified by:
      getAttachmentFileByAttachmentId in interface TicketFacade
      Parameters:
      ticketId - ticket id
      eventCode - ticket event code
      attachmentId - ticket attachment id
      Returns:
      TicketEventAttachmentFileData or throws a runtime exception
    • getAttachmentCountByEventCode

      public int getAttachmentCountByEventCode(String ticketId, String eventCode)
      Description copied from interface: TicketFacade
      Requesting to count the total number of attachments for a ticket event of a customer by event code.
      Specified by:
      getAttachmentCountByEventCode in interface TicketFacade
      Parameters:
      ticketId - ticket id
      eventCode - ticket event code
      Returns:
      int value indicating the total number of attachments for the given ticket event
    • getTicket

      public TicketData getTicket(String ticketId)
      Description copied from interface: TicketFacade
      Requesting for a ticket of a customer.
      Specified by:
      getTicket in interface TicketFacade
      Parameters:
      ticketId - ticket id
      Returns:
      TicketData or null
    • getTicketEvent

      protected CsTicketEventModel getTicketEvent(String ticketId, String eventCode)
    • getTickets

      public SearchPageData<TicketData> getTickets(PageableData pageableData)
      Description copied from interface: TicketFacade
      Requesting for all tickets of a customer.
      Specified by:
      getTickets in interface TicketFacade
      Parameters:
      pageableData - pageable data
      Returns:
      not-null list
    • convertPageData

      protected <S, T> SearchPageData<T> convertPageData(SearchPageData<S> source, Converter<S,T> converter)
    • getAssociatedToObjects

      public Map<String,List<TicketAssociatedData>> getAssociatedToObjects()
      Description copied from interface: TicketFacade
      Search in cart and orders any data for association for ticket.
      Specified by:
      getAssociatedToObjects in interface TicketFacade
      Returns:
      non-null map, key - special code describes carts/orders are presented in value-list
    • createCsTicketParameter

      protected CsTicketParameter createCsTicketParameter(TicketData ticketData)
    • filterBySiteId

      protected void filterBySiteId(Map<String,List<TicketAssociatedData>> associatedObjects, String baseSiteId)
      remove if associated obj is not related to this basesite, and remove the key who only has empty list。
    • removeEmptyList

      protected void removeEmptyList(Map<String,List<TicketAssociatedData>> associatedObjects)
      remove key if list is empty
    • getTicketService

      protected TicketService getTicketService()
      Returns:
      the ticketService
    • getUserService

      protected UserService getUserService()
      Returns:
      the userService
    • getTicketBusinessService

      protected TicketBusinessService getTicketBusinessService()
      Returns:
      the ticketBusinessService
    • setTicketService

      public void setTicketService(TicketService ticketService)
      Parameters:
      ticketService - the ticketService to set
    • setUserService

      public void setUserService(UserService userService)
      Parameters:
      userService - the userService to set
    • setTicketBusinessService

      public void setTicketBusinessService(TicketBusinessService ticketBusinessService)
      Parameters:
      ticketBusinessService - the ticketBusinessService to set
    • getTicketConverter

      protected Converter<CsTicketModel,TicketData> getTicketConverter()
      Returns:
      the ticketConverter
    • getTicketListConverter

      protected Converter<CsTicketModel,TicketData> getTicketListConverter()
    • getTicketEventConverter

      protected Converter<CsCustomerEventModel,TicketEventData> getTicketEventConverter()
      Returns:
      the ticketEventConverter
    • setTicketListConverter

      public void setTicketListConverter(Converter<CsTicketModel,TicketData> ticketListConverter)
    • getStatusMapping

      protected Map<String,StatusData> getStatusMapping()
      Returns:
      the statusMapping
    • getAssociationStrategies

      protected List<TicketAssociationStrategies> getAssociationStrategies()
      Returns:
      the associationStrategies
    • setTicketConverter

      public void setTicketConverter(Converter<CsTicketModel,TicketData> ticketConverter)
      Parameters:
      ticketConverter - the ticketConverter to set
    • setTicketEventConverter

      public void setTicketEventConverter(Converter<CsCustomerEventModel,TicketEventData> ticketEventConverter)
      Parameters:
      ticketEventConverter - the ticketEventConverter to set
    • setStatusMapping

      public void setStatusMapping(Map<String,StatusData> statusMapping)
      Parameters:
      statusMapping - the statusMapping to set
    • setAssociationStrategies

      public void setAssociationStrategies(List<TicketAssociationStrategies> associationStrategies)
      Parameters:
      associationStrategies - the associationStrategies to set
    • getTicketPriority

      protected String getTicketPriority()
      Returns:
      the ticketPriority
    • setTicketPriority

      public void setTicketPriority(String ticketPriority)
      Parameters:
      ticketPriority - the ticketPriority to set
    • getTicketReason

      protected String getTicketReason()
      Returns:
      the ticketReason
    • setTicketReason

      public void setTicketReason(String ticketReason)
      Parameters:
      ticketReason - the ticketReason to set
    • getEnumerationService

      protected EnumerationService getEnumerationService()
      Returns:
      the enumerationService
    • setEnumerationService

      public void setEnumerationService(EnumerationService enumerationService)
      Parameters:
      enumerationService - the enumerationService to set
    • getTicketCategories

      public List<TicketCategory> getTicketCategories()
      Specified by:
      getTicketCategories in interface TicketFacade
      Returns:
      a map with available ticket categories in string representation for the customer ticket creation as a key and it's localizations as a value.
    • getConfigurationService

      protected ConfigurationService getConfigurationService()
      Returns:
      the configurationService
    • setConfigurationService

      public void setConfigurationService(ConfigurationService configurationService)
      Parameters:
      configurationService - the configurationService to set
    • getBaseSiteService

      protected BaseSiteService getBaseSiteService()
      Returns:
      the baseSiteService
    • setBaseSiteService

      public void setBaseSiteService(BaseSiteService baseSiteService)
      Parameters:
      baseSiteService - the baseSiteService to set
    • getTicketAttachmentsService

      protected TicketAttachmentsService getTicketAttachmentsService()
      Returns:
      the ticketAttachmentsService
    • setTicketAttachmentsService

      public void setTicketAttachmentsService(TicketAttachmentsService ticketAttachmentsService)
      Parameters:
      ticketAttachmentsService - the ticketAttachmentsService to set
    • getMediaService

      protected MediaService getMediaService()
      Returns:
      the mediaService
    • setMediaService

      public void setMediaService(MediaService mediaService)
      Parameters:
      mediaService - the mediaService to set