Package com.skava.assets.processor
Class Base64ImageUploadProcessor
java.lang.Object
com.skava.assets.processor.Base64ImageUploadProcessor
- All Implemented Interfaces:
org.apache.camel.Processor
@Component
@Service("base64ImageUploadProcessor")
public class Base64ImageUploadProcessor
extends Object
implements org.apache.camel.Processor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.apache.camel.Exchange exchange) This processor class is used to convert the base64image data URL to the Content and then to save the respective content to framework ContentRepositoryvoidsetErrorResponse(org.apache.camel.Exchange exchange) setErrorResponse - This method is to set the errorResponsevoiduploadContent(org.apache.camel.Exchange exchange, String base64String, String fileName) uploadContentvalidateAndGetFileName(String fileName) validateAndGetFileName - This method is to validate and get the fileName and ExtensionsbooleanvalidateImage(String base64String)
-
Constructor Details
-
Base64ImageUploadProcessor
public Base64ImageUploadProcessor()
-
-
Method Details
-
process
This processor class is used to convert the base64image data URL to the Content and then to save the respective content to framework ContentRepository
- Specified by:
processin interfaceorg.apache.camel.Processor- Throws:
Exception
-
validateImage
-
uploadContent
public void uploadContent(org.apache.camel.Exchange exchange, String base64String, String fileName) throws IOException uploadContent
- Throws:
IOException
-
setErrorResponse
public void setErrorResponse(org.apache.camel.Exchange exchange) throws com.fasterxml.jackson.core.JsonProcessingException setErrorResponse - This method is to set the errorResponse- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
validateAndGetFileName
validateAndGetFileName - This method is to validate and get the fileName and Extensions
-