mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-07 17:48:35 +00:00
ATS-675/ATS-703 Rename OptionsBuilder to PdfRendererOptionsBuilder
This is to avoid confilct with OptionsBuilders in other T-engines.
This commit is contained in:
@@ -114,7 +114,7 @@ public class AlfrescoPdfRendererController extends AbstractTransformerController
|
|||||||
logger.debug("Processing request with: sourceFile '{}', targetFile '{}', transformOptions" +
|
logger.debug("Processing request with: sourceFile '{}', targetFile '{}', transformOptions" +
|
||||||
" '{}', timeout {} ms", sourceFile, targetFile, transformOptions, timeout);
|
" '{}', timeout {} ms", sourceFile, targetFile, transformOptions, timeout);
|
||||||
|
|
||||||
final String options = OptionsBuilder
|
final String options = PdfRendererOptionsBuilder
|
||||||
.builder()
|
.builder()
|
||||||
.withPage(transformOptions.get("page"))
|
.withPage(transformOptions.get("page"))
|
||||||
.withWidth(transformOptions.get("width"))
|
.withWidth(transformOptions.get("width"))
|
||||||
@@ -147,7 +147,7 @@ public class AlfrescoPdfRendererController extends AbstractTransformerController
|
|||||||
File targetFile = createTargetFile(request, targetFilename);
|
File targetFile = createTargetFile(request, targetFilename);
|
||||||
// Both files are deleted by TransformInterceptor.afterCompletion
|
// Both files are deleted by TransformInterceptor.afterCompletion
|
||||||
|
|
||||||
final String options = OptionsBuilder
|
final String options = PdfRendererOptionsBuilder
|
||||||
.builder()
|
.builder()
|
||||||
.withPage(page)
|
.withPage(page)
|
||||||
.withWidth(width)
|
.withWidth(width)
|
||||||
|
@@ -36,7 +36,7 @@ import java.util.StringJoiner;
|
|||||||
*
|
*
|
||||||
* @author Cezar Leahu
|
* @author Cezar Leahu
|
||||||
*/
|
*/
|
||||||
final class OptionsBuilder
|
public final class PdfRendererOptionsBuilder
|
||||||
{
|
{
|
||||||
private Integer page;
|
private Integer page;
|
||||||
private Integer width;
|
private Integer width;
|
||||||
@@ -44,58 +44,58 @@ final class OptionsBuilder
|
|||||||
private Boolean allowPdfEnlargement;
|
private Boolean allowPdfEnlargement;
|
||||||
private Boolean maintainPdfAspectRatio;
|
private Boolean maintainPdfAspectRatio;
|
||||||
|
|
||||||
private OptionsBuilder() {}
|
private PdfRendererOptionsBuilder() {}
|
||||||
|
|
||||||
public OptionsBuilder withPage(final String page)
|
public PdfRendererOptionsBuilder withPage(final String page)
|
||||||
{
|
{
|
||||||
return withPage(stringToInteger(page));
|
return withPage(stringToInteger(page));
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withPage(final Integer page)
|
public PdfRendererOptionsBuilder withPage(final Integer page)
|
||||||
{
|
{
|
||||||
this.page = page;
|
this.page = page;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withWidth(final String width)
|
public PdfRendererOptionsBuilder withWidth(final String width)
|
||||||
{
|
{
|
||||||
return withWidth(stringToInteger(width));
|
return withWidth(stringToInteger(width));
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withWidth(final Integer width)
|
public PdfRendererOptionsBuilder withWidth(final Integer width)
|
||||||
{
|
{
|
||||||
this.width = width;
|
this.width = width;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withHeight(final String height)
|
public PdfRendererOptionsBuilder withHeight(final String height)
|
||||||
{
|
{
|
||||||
return withHeight(stringToInteger(height));
|
return withHeight(stringToInteger(height));
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withHeight(final Integer height)
|
public PdfRendererOptionsBuilder withHeight(final Integer height)
|
||||||
{
|
{
|
||||||
this.height = height;
|
this.height = height;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withAllowPdfEnlargement(final String allowPdfEnlargement)
|
public PdfRendererOptionsBuilder withAllowPdfEnlargement(final String allowPdfEnlargement)
|
||||||
{
|
{
|
||||||
return withAllowPdfEnlargement(stringToBoolean(allowPdfEnlargement));
|
return withAllowPdfEnlargement(stringToBoolean(allowPdfEnlargement));
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withAllowPdfEnlargement(final Boolean allowPdfEnlargement)
|
public PdfRendererOptionsBuilder withAllowPdfEnlargement(final Boolean allowPdfEnlargement)
|
||||||
{
|
{
|
||||||
this.allowPdfEnlargement = allowPdfEnlargement;
|
this.allowPdfEnlargement = allowPdfEnlargement;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withMaintainPdfAspectRatio(final String maintainPdfAspectRatio)
|
public PdfRendererOptionsBuilder withMaintainPdfAspectRatio(final String maintainPdfAspectRatio)
|
||||||
{
|
{
|
||||||
return withMaintainPdfAspectRatio(stringToBoolean(maintainPdfAspectRatio));
|
return withMaintainPdfAspectRatio(stringToBoolean(maintainPdfAspectRatio));
|
||||||
}
|
}
|
||||||
|
|
||||||
public OptionsBuilder withMaintainPdfAspectRatio(final Boolean maintainPdfAspectRatio)
|
public PdfRendererOptionsBuilder withMaintainPdfAspectRatio(final Boolean maintainPdfAspectRatio)
|
||||||
{
|
{
|
||||||
this.maintainPdfAspectRatio = maintainPdfAspectRatio;
|
this.maintainPdfAspectRatio = maintainPdfAspectRatio;
|
||||||
return this;
|
return this;
|
||||||
@@ -127,8 +127,8 @@ final class OptionsBuilder
|
|||||||
return args.toString();
|
return args.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OptionsBuilder builder()
|
public static PdfRendererOptionsBuilder builder()
|
||||||
{
|
{
|
||||||
return new OptionsBuilder();
|
return new PdfRendererOptionsBuilder();
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user