com.acrolinx.client.sdk.check.CheckOptionsBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
A library to interact with the Acrolinx Platform.
/**
* Copyright (c) 2019-present Acrolinx GmbH
*/
package com.acrolinx.client.sdk.check;
import java.util.List;
public class CheckOptionsBuilder
{
private String guidanceProfileId;
private String batchId;
private List reportTypes;
private CheckType checkType;
private String contentFormat = "AUTO";
private boolean disableCustomFieldValidation;
CheckOptionsBuilder()
{
}
public CheckOptionsBuilder withGuidanceProfileId(String guidanceProfileId)
{
this.guidanceProfileId = guidanceProfileId;
return this;
}
public CheckOptionsBuilder withBatchId(String batchId)
{
this.batchId = batchId;
return this;
}
public CheckOptionsBuilder withGenerateReportTypes(List reportTypes)
{
this.reportTypes = reportTypes;
return this;
}
/**
*
* How to choose a correct Check Type? Following are different use cases of the check with
* corresponding check type:
*
*
* Check Type
* Ux
* Use case
*
*
* interactive
* Interactive
* User checks her own document.
*
*
* batch
* Interactive
* User checks set of her own documents.
*
*
* baseline
* Noninteractive
* A repository of documents are checked as part of build job running nightly and the user
* doesn't own the documents.
*
*
* automated
* Noninteractive
* Check of a single document for automated scenarios as for example a git hook or save a
* document.
*
*
*
*
* @param checkType Based on the origin of check
* @return CheckOptionsBuilder
*/
public CheckOptionsBuilder withCheckType(CheckType checkType)
{
this.checkType = checkType;
return this;
}
public CheckOptionsBuilder withContentFormat(String contentFormat)
{
this.contentFormat = contentFormat;
return this;
}
public CheckOptionsBuilder withCustomFieldValidationDisabled(boolean disableCustomFieldValidation)
{
this.disableCustomFieldValidation = disableCustomFieldValidation;
return this;
}
public CheckOptions build()
{
return new CheckOptions(guidanceProfileId, batchId, reportTypes, checkType, contentFormat,
disableCustomFieldValidation);
}
}