Skip to content

Commit

Permalink
PB-19360. Add support for the font size
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed May 15, 2019
1 parent 26260b1 commit 98a4b4a
Show file tree
Hide file tree
Showing 14 changed files with 324 additions and 229 deletions.
24 changes: 24 additions & 0 deletions sdk/src/main/java/com/silanis/esl/api/model/CeremonySettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class CeremonySettings extends ViewSettings
@JsonIgnore
public static final String FIELD_ADA = "ada";
@JsonIgnore
public static final String FIELD_FONT_SIZE = "fontSize";
@JsonIgnore
public static final String FIELD_STYLE = "style";

// Empty Constructor
Expand Down Expand Up @@ -86,6 +88,7 @@ public CeremonySettings() {
protected Boolean _enforceCaptureSignature = false;
protected List<String> _optOutReasons = new ArrayList<String>();
protected Boolean _ada = false;
protected Integer _fontSize = null;

// Accessors

Expand Down Expand Up @@ -676,6 +679,27 @@ public boolean evalAda() {
}



public CeremonySettings setFontSize(Integer value) {
this._fontSize = value;
setDirty(FIELD_FONT_SIZE);
return this;
}

// Used internally by aws. Invokes a the corresponding setter if the value is not null
@JsonIgnore
public CeremonySettings safeSetFontSize(Integer value) {
if (value != null)
this.setFontSize(value);
return this;
}

public Integer getFontSize() {
return _fontSize;
}



@Override
public CeremonySettings setStyle(LayoutStyle value) {
super.setStyle(value);
Expand Down
22 changes: 20 additions & 2 deletions sdk/src/main/java/com/silanis/esl/api/model/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public class Field extends Entity
public static final String FIELD_VALUE = "value";
@JsonIgnore
public static final String FIELD_WIDTH = "width";
@JsonIgnore
public static final String FIELD_FONT_SIZE = "fontSize";

// Empty Constructor
public Field ( ) {}
Expand All @@ -58,6 +60,7 @@ public Field ( ) {}
protected FieldValidation _validation = null;
protected String _value = "";
protected Double _width = 0.0;
protected Integer _fontSize = null;

// Accessors

Expand Down Expand Up @@ -340,6 +343,21 @@ public Field safeSetWidth( Double value ){
public Double getWidth(){
return _width;
}





public Field setFontSize( Integer value ){
this._fontSize = value;
setDirty(FIELD_FONT_SIZE);
return this;
}
// Used internally by aws. Invokes a the corresponding setter if the value is not null
@JsonIgnore
public Field safeSetFontSize( Integer value ){
if ( value != null ) { this.setFontSize( value ); }
return this;
}
public Integer getFontSize(){
return _fontSize;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class DocumentPackageSettings {
private Boolean disableOptOutOther = null;
private Boolean enforceCaptureSignature = null;
private Boolean ada = null;
private Integer fontSize = null;

private String linkText;
private String linkTooltip;
Expand Down Expand Up @@ -205,4 +206,12 @@ public Boolean getAda() {
public void setAda(Boolean ada) {
this.ada = ada;
}

public Integer getFontSize() {
return fontSize;
}

public void setFontSize(Integer fontSize) {
this.fontSize = fontSize;
}
}
9 changes: 9 additions & 0 deletions sdk/src/main/java/com/silanis/esl/sdk/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class Field implements Serializable {
private FieldValidator fieldValidator;
private FieldId id;
private TextAnchor textAnchor;
private Integer fontSize;

public Field() {}

Expand Down Expand Up @@ -148,4 +149,12 @@ public TextAnchor getTextAnchor() {
public void setTextAnchor( TextAnchor textAnchor ) {
this.textAnchor = textAnchor;
}

public Integer getFontSize() {
return fontSize;
}

public void setFontSize(Integer fontSize) {
this.fontSize = fontSize;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class DocumentPackageSettingsBuilder {
private Boolean disableOptOutOther = null;
private Boolean enforceCaptureSignature = null;
private Boolean ada = null;
private Integer fontSize = null;

private String linkText = null;
private String linkTooltip = null;
Expand Down Expand Up @@ -261,6 +262,7 @@ public DocumentPackageSettingsBuilder withAda() {
return this;
}


/**
* Disables the option for a signer to sign ADA documents.
* <p>
Expand All @@ -274,6 +276,19 @@ public DocumentPackageSettingsBuilder withoutAda() {
return this;
}

/**
* Sets the default font size for the package..
* <p>
* DEFAULT: null
* <p>
*
* @return This
*/
public DocumentPackageSettingsBuilder withFontSize(Integer fontSize) {
this.fontSize = fontSize;
return this;
}

/**
* Enables adding a link on the signing ceremony page where the user will be
* sent after being shown the completion dialog box. Replaces the continue
Expand Down Expand Up @@ -383,6 +398,7 @@ public DocumentPackageSettings build() {
result.setDisableOptOutOther(disableOptOutOther);
result.setEnforceCaptureSignature(enforceCaptureSignature);
result.setAda(ada);
result.setFontSize(fontSize);

result.setCeremonyLayoutSettings(ceremonyLayoutSettings);

Expand Down
Loading

0 comments on commit 98a4b4a

Please sign in to comment.