Class DefaultTicketAttachmentsService
- java.lang.Object
-
- de.hybris.platform.ticket.service.impl.DefaultTicketAttachmentsService
-
- All Implemented Interfaces:
TicketAttachmentsService
public class DefaultTicketAttachmentsService extends java.lang.Object implements TicketAttachmentsService
Implementation forTicketAttachmentsService
-
-
Constructor Summary
Constructors Constructor Description DefaultTicketAttachmentsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkFileExtension(java.lang.String name)
MediaModel
createAttachment(java.lang.String name, java.lang.String contentType, byte[] data, UserModel customer)
CreateMediaModel
attachment based on provided parameters.protected java.lang.String
getAllowedUploadedFormats()
protected java.lang.String
getCatalogId()
protected java.lang.String
getCatalogVersionName()
protected CatalogVersionService
getCatalogVersionService()
protected java.lang.String
getCommonCsAgentUserGroup()
protected java.lang.String
getFolderName()
protected MediaPermissionService
getMediaPermissionService()
protected MediaService
getMediaService()
protected ModelService
getModelService()
protected UserService
getUserService()
void
setAllowedUploadedFormats(java.lang.String allowedUploadedFormats)
void
setCatalogId(java.lang.String catalogId)
void
setCatalogVersionName(java.lang.String catalogVersionName)
void
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setCommonCsAgentUserGroup(java.lang.String commonCsAgentUserGroup)
void
setFolderName(java.lang.String folderName)
void
setMediaPermissionService(MediaPermissionService mediaPermissionService)
void
setMediaService(MediaService mediaService)
void
setModelService(ModelService modelService)
void
setUserService(UserService userService)
-
-
-
Method Detail
-
createAttachment
public MediaModel createAttachment(java.lang.String name, java.lang.String contentType, byte[] data, UserModel customer)
Description copied from interface:TicketAttachmentsService
CreateMediaModel
attachment based on provided parameters.Created file will be stored in DB inside secure media folder, configured via Spring. Read permission will be granted only for customer and common agent group also configured via Spring.
- Specified by:
createAttachment
in interfaceTicketAttachmentsService
- Parameters:
name
- filenamecontentType
- content typedata
- binary datacustomer
- customer- Returns:
- created, configured and stored
MediaModel
-
checkFileExtension
protected void checkFileExtension(java.lang.String name)
-
getMediaService
protected MediaService getMediaService()
- Returns:
- the mediaService
-
setMediaService
public void setMediaService(MediaService mediaService)
- Parameters:
mediaService
- the mediaService to set
-
getMediaPermissionService
protected MediaPermissionService getMediaPermissionService()
- Returns:
- the mediaPermissionService
-
setMediaPermissionService
public void setMediaPermissionService(MediaPermissionService mediaPermissionService)
- Parameters:
mediaPermissionService
- the mediaPermissionService to set
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
- Returns:
- the catalogVersionService
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
- Parameters:
catalogVersionService
- the catalogVersionService to set
-
getModelService
protected ModelService getModelService()
- Returns:
- the modelService
-
setModelService
public void setModelService(ModelService modelService)
- Parameters:
modelService
- the modelService to set
-
getCatalogId
protected java.lang.String getCatalogId()
- Returns:
- the catalogId
-
setCatalogId
public void setCatalogId(java.lang.String catalogId)
- Parameters:
catalogId
- the catalogId to set
-
getCatalogVersionName
protected java.lang.String getCatalogVersionName()
- Returns:
- the catalogVersionName
-
setCatalogVersionName
public void setCatalogVersionName(java.lang.String catalogVersionName)
- Parameters:
catalogVersionName
- the catalogVersionName to set
-
getCommonCsAgentUserGroup
protected java.lang.String getCommonCsAgentUserGroup()
- Returns:
- the commonCsAgentUserGroup
-
setCommonCsAgentUserGroup
public void setCommonCsAgentUserGroup(java.lang.String commonCsAgentUserGroup)
- Parameters:
commonCsAgentUserGroup
- the commonCsAgentUserGroup to set
-
getFolderName
protected java.lang.String getFolderName()
- Returns:
- the folderName
-
setFolderName
public void setFolderName(java.lang.String folderName)
- Parameters:
folderName
- the folderName to set
-
getUserService
protected UserService getUserService()
- Returns:
- the userService
-
setUserService
public void setUserService(UserService userService)
- Parameters:
userService
- the userService to set
-
getAllowedUploadedFormats
protected java.lang.String getAllowedUploadedFormats()
-
setAllowedUploadedFormats
public void setAllowedUploadedFormats(java.lang.String allowedUploadedFormats)
-
-