Package com.skava.assets.processor
Class AssetImageUploadProcessor
java.lang.Object
com.skava.assets.processor.AssetImageUploadProcessor
- All Implemented Interfaces:
org.apache.camel.Processor
@Component
@Service("assetImageUploadProcessor")
public class AssetImageUploadProcessor
extends Object
implements org.apache.camel.Processor
The Class CatalogImageUploadProcessor is used to convert the user micro-service response into the admin required response. It will remove the unwanted data from micro-service also this will add the required data to the response.
- Since:
- Nov 2020
- Version:
- 8.9
- Author:
- catalog admin team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.apache.camel.Exchange exchange) This processor class is used to convert the user micro-service response into the admin required response.static StringvalidateAndGetContentType(byte[] fileBytes, String filenameWithExtension, String fileContentType) validateAndGetContentType - This method will validate and get the content type from meta data.
-
Constructor Details
-
AssetImageUploadProcessor
public AssetImageUploadProcessor()
-
-
Method Details
-
process
public void process(org.apache.camel.Exchange exchange) throws IOException, jakarta.mail.MessagingException This processor class is used to convert the user micro-service response into the admin required response. It will remove the unwanted data from micro-service also this will add the required data to the response.
- Specified by:
processin interfaceorg.apache.camel.Processor- Parameters:
exchange- An Exchange is the message container holding the information during the entire routing.- Throws:
IOException- Exception typejakarta.mail.MessagingException- Exception type
-
validateAndGetContentType
public static String validateAndGetContentType(byte[] fileBytes, String filenameWithExtension, String fileContentType) throws IOException validateAndGetContentType - This method will validate and get the content type from meta data.- Parameters:
fileBytes-filenameWithExtension-fileContent-- Returns:
- Throws:
IOException
-