Class DefaultTicketAttachmentsService

    • Constructor Detail

      • DefaultTicketAttachmentsService

        public DefaultTicketAttachmentsService()
    • Method Detail

      • createAttachment

        public MediaModel createAttachment​(java.lang.String name,
                                           java.lang.String contentType,
                                           byte[] data,
                                           UserModel customer)
        Description copied from interface: TicketAttachmentsService
        Create MediaModel 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 interface TicketAttachmentsService
        Parameters:
        name - filename
        contentType - content type
        data - binary data
        customer - 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)