Class DefaultCustomerTicketingFacade
java.lang.Object
de.hybris.platform.customerticketingfacades.customerticket.DefaultCustomerTicketingFacade
- All Implemented Interfaces:
TicketFacade
CS Integration Ticket Facade Facade should provide access to a user's support ticket details and full details of
support ticket.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<CsTicketState,BiFunction<CsTicketModel, TicketData, CsTicketModel>> Special map, that know what to do in case of status changed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttachmentToEventByEventCode(String ticketId, String eventCode, org.springframework.web.multipart.MultipartFile file) Requesting for adding an attachment to a ticket event of a customer by event code.protected <S,T> SearchPageData<T> convertPageData(SearchPageData<S> source, Converter<S, T> converter) protected MediaModelcreateAttachmentModel(org.springframework.web.multipart.MultipartFile file) protected CsTicketParametercreateCsTicketParameter(TicketData ticketData) createTicket(TicketData ticketData) Creates ticket.protected voidfilterBySiteId(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。Search in cart and orders any data for association for ticket.protected List<TicketAssociationStrategies>intgetAttachmentCountByEventCode(String ticketId, String eventCode) Requesting to count the total number of attachments for a ticket event of a customer by event code.getAttachmentFileByAttachmentId(String ticketId, String eventCode, String attachmentId) Requesting to retrieve an attachment file to a ticket event of a customer by event code.protected List<MediaModel>getAttachments(TicketData ticketData) protected BaseSiteServiceprotected ConfigurationServiceprotected CsTicketStategetCsStatus(TicketData data) Matches TicketData.Status with CsTicketStatus, using statusMapping map.protected CsAgentGroupModelprotected EnumerationServiceprotected MediaServiceprotected Map<String,StatusData> Requesting for a ticket of a customer.protected TicketAttachmentsServiceprotected TicketBusinessServiceprotected Converter<CsTicketModel,TicketData> protected CsTicketEventModelgetTicketEvent(String ticketId, String eventCode) protected Converter<CsCustomerEventModel,TicketEventData> protected Converter<CsTicketModel,TicketData> protected Stringprotected StringgetTickets(PageableData pageableData) Requesting for all tickets of a customer.protected TicketServiceprotected UserServiceprotected voidremoveEmptyList(Map<String, List<TicketAssociatedData>> associatedObjects) remove key if list is emptyvoidsetAssociationStrategies(List<TicketAssociationStrategies> associationStrategies) voidsetBaseSiteService(BaseSiteService baseSiteService) voidsetConfigurationService(ConfigurationService configurationService) voidsetEnumerationService(EnumerationService enumerationService) voidsetMediaService(MediaService mediaService) voidsetStatusMapping(Map<String, StatusData> statusMapping) voidsetTicketAttachmentsService(TicketAttachmentsService ticketAttachmentsService) voidsetTicketBusinessService(TicketBusinessService ticketBusinessService) voidsetTicketConverter(Converter<CsTicketModel, TicketData> ticketConverter) voidsetTicketEventConverter(Converter<CsCustomerEventModel, TicketEventData> ticketEventConverter) voidsetTicketListConverter(Converter<CsTicketModel, TicketData> ticketListConverter) voidsetTicketPriority(String ticketPriority) voidsetTicketReason(String ticketReason) voidsetTicketService(TicketService ticketService) voidsetUserService(UserService userService) updateTicket(TicketData ticketData) Updates ticket
-
Field Details
-
stateChanges
Special map, that know what to do in case of status changed.
-
-
Constructor Details
-
DefaultCustomerTicketingFacade
public DefaultCustomerTicketingFacade()
-
-
Method Details
-
createTicket
Description copied from interface:TicketFacadeCreates ticket.- Specified by:
createTicketin interfaceTicketFacade- Parameters:
ticketData- TicketData- Returns:
- TicketData or null
-
getDefaultCsAgentManagerGroup
- Returns:
- CsAgentGroupModel - Default Cs Agent Group Manager
-
updateTicket
Description copied from interface:TicketFacadeUpdates ticket- Specified by:
updateTicketin interfaceTicketFacade- Parameters:
ticketData- TicketData- Returns:
- TicketData
-
addAttachmentToEventByEventCode
public TicketEventData addAttachmentToEventByEventCode(String ticketId, String eventCode, org.springframework.web.multipart.MultipartFile file) Description copied from interface:TicketFacadeRequesting for adding an attachment to a ticket event of a customer by event code.- Specified by:
addAttachmentToEventByEventCodein interfaceTicketFacade- Parameters:
ticketId- ticket data objecteventCode- ticket event codefile- file to be uploaded as attachment- Returns:
- TicketEventData or null
-
getAttachments
- Parameters:
ticketData-- Returns:
- List
-
createAttachmentModel
- Parameters:
file-- Returns:
- MediaModel
-
getCsStatus
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:TicketFacadeRequesting to retrieve an attachment file to a ticket event of a customer by event code.- Specified by:
getAttachmentFileByAttachmentIdin interfaceTicketFacade- Parameters:
ticketId- ticket ideventCode- ticket event codeattachmentId- ticket attachment id- Returns:
- TicketEventAttachmentFileData or throws a runtime exception
-
getAttachmentCountByEventCode
Description copied from interface:TicketFacadeRequesting to count the total number of attachments for a ticket event of a customer by event code.- Specified by:
getAttachmentCountByEventCodein interfaceTicketFacade- Parameters:
ticketId- ticket ideventCode- ticket event code- Returns:
- int value indicating the total number of attachments for the given ticket event
-
getTicket
Description copied from interface:TicketFacadeRequesting for a ticket of a customer.- Specified by:
getTicketin interfaceTicketFacade- Parameters:
ticketId- ticket id- Returns:
- TicketData or null
-
getTicketEvent
-
getTickets
Description copied from interface:TicketFacadeRequesting for all tickets of a customer.- Specified by:
getTicketsin interfaceTicketFacade- Parameters:
pageableData- pageable data- Returns:
- not-null list
-
convertPageData
protected <S,T> SearchPageData<T> convertPageData(SearchPageData<S> source, Converter<S, T> converter) -
getAssociatedToObjects
Description copied from interface:TicketFacadeSearch in cart and orders any data for association for ticket.- Specified by:
getAssociatedToObjectsin interfaceTicketFacade- Returns:
- non-null map, key - special code describes carts/orders are presented in value-list
-
createCsTicketParameter
-
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
remove key if list is empty -
getTicketService
- Returns:
- the ticketService
-
getUserService
- Returns:
- the userService
-
getTicketBusinessService
- Returns:
- the ticketBusinessService
-
setTicketService
- Parameters:
ticketService- the ticketService to set
-
setUserService
- Parameters:
userService- the userService to set
-
setTicketBusinessService
- Parameters:
ticketBusinessService- the ticketBusinessService to set
-
getTicketConverter
- Returns:
- the ticketConverter
-
getTicketListConverter
-
getTicketEventConverter
- Returns:
- the ticketEventConverter
-
setTicketListConverter
-
getStatusMapping
- Returns:
- the statusMapping
-
getAssociationStrategies
- Returns:
- the associationStrategies
-
setTicketConverter
- Parameters:
ticketConverter- the ticketConverter to set
-
setTicketEventConverter
public void setTicketEventConverter(Converter<CsCustomerEventModel, TicketEventData> ticketEventConverter) - Parameters:
ticketEventConverter- the ticketEventConverter to set
-
setStatusMapping
- Parameters:
statusMapping- the statusMapping to set
-
setAssociationStrategies
- Parameters:
associationStrategies- the associationStrategies to set
-
getTicketPriority
- Returns:
- the ticketPriority
-
setTicketPriority
- Parameters:
ticketPriority- the ticketPriority to set
-
getTicketReason
- Returns:
- the ticketReason
-
setTicketReason
- Parameters:
ticketReason- the ticketReason to set
-
getEnumerationService
- Returns:
- the enumerationService
-
setEnumerationService
- Parameters:
enumerationService- the enumerationService to set
-
getTicketCategories
- Specified by:
getTicketCategoriesin interfaceTicketFacade- 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
- Returns:
- the configurationService
-
setConfigurationService
- Parameters:
configurationService- the configurationService to set
-
getBaseSiteService
- Returns:
- the baseSiteService
-
setBaseSiteService
- Parameters:
baseSiteService- the baseSiteService to set
-
getTicketAttachmentsService
- Returns:
- the ticketAttachmentsService
-
setTicketAttachmentsService
- Parameters:
ticketAttachmentsService- the ticketAttachmentsService to set
-
getMediaService
- Returns:
- the mediaService
-
setMediaService
- Parameters:
mediaService- the mediaService to set
-