com.adobe.platform.operation.internal.cpf.builder.OCRParamsDtoBuilder Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2019 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received this file from a source other than Adobe,
* then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
*/
package com.adobe.platform.operation.internal.cpf.builder;
import com.adobe.platform.operation.internal.cpf.context.OCRRequestParamsContext;
import com.adobe.platform.operation.internal.cpf.dto.request.OCRParamsDto;
public class OCRParamsDtoBuilder {
private OCRRequestParamsContext ocrRequestParamsContext;
public OCRParamsDtoBuilder(OCRRequestParamsContext ocrRequestParamsContext) {
this.ocrRequestParamsContext = ocrRequestParamsContext;
}
public OCRParamsDto build() {
OCRParamsDto ocrParamsDto = new OCRParamsDto();
if(ocrRequestParamsContext != null) {
ocrParamsDto.setOcrLang(ocrRequestParamsContext.getOcrLang());
ocrParamsDto.setOcrType(ocrRequestParamsContext.getOcrType());
}
return ocrParamsDto;
}
}