Class CustomField
- java.lang.Object
-
- com.hellosign.sdk.resource.AbstractResource
-
- com.hellosign.sdk.resource.support.CustomField
-
- Direct Known Subclasses:
FormField
public class CustomField extends AbstractResource
This class represents a HelloSign Custom Field. This is a field that is set up during the creation of the signature request or template and contains information that must be filled in by the requester, prior to sending. Right now, this is only applicable to text fields.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CUSTOM_FIELD_API_ID
static java.lang.String
CUSTOM_FIELD_AVG_TEXT_LENGTH
static java.lang.String
CUSTOM_FIELD_EDITOR
static java.lang.String
CUSTOM_FIELD_HEIGHT
static java.lang.String
CUSTOM_FIELD_NAME
static java.lang.String
CUSTOM_FIELD_NUM_CHARS_PER_LINE
static java.lang.String
CUSTOM_FIELD_NUM_LINES
static java.lang.String
CUSTOM_FIELD_REQUIRED
static java.lang.String
CUSTOM_FIELD_TYPE
static java.lang.String
CUSTOM_FIELD_VALUE
static java.lang.String
CUSTOM_FIELD_WIDTH
static java.lang.String
CUSTOM_FIELD_X
static java.lang.String
CUSTOM_FIELD_Y
-
Fields inherited from class com.hellosign.sdk.resource.AbstractResource
dataObj, warnings
-
-
Constructor Summary
Constructors Constructor Description CustomField()
CustomField(org.json.JSONObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getApiId()
java.lang.String
getEditor()
java.lang.Integer
getEstimatedCharsPerLine()
Once processed with a position, height, and width, HelloSign will estimate the number of lines a custom field can contain, along with the number of characters per line.java.lang.Integer
getEstimatedTextLines()
Once processed with a position, height, and width, HelloSign will estimate the number of lines a custom field can contain, along with the number of characters per line.java.lang.Integer
getHeight()
Returns the pixel height of this field.java.lang.String
getName()
FieldType
getType()
java.lang.String
getTypeString()
java.lang.String
getValue()
java.lang.Integer
getWidth()
Returns the pixel width of this field.java.lang.Integer
getX()
Returns the x coordinate for this field.java.lang.Integer
getY()
Returns the y coordinate for this field.java.lang.Boolean
isRequired()
void
setApiId(java.lang.String apiId)
Set the API ID for this custom field.void
setEditor(java.lang.String editor)
Specify what signer role may edit this field.void
setHeight(int height)
Sets the pixel height for this field.void
setIsRequired(java.lang.Boolean isRequired)
Specify whether this field is required.void
setName(java.lang.String name)
Set the name of this custom field.void
setType(FieldType type)
Set the type for this custom field.void
setValue(java.lang.String value)
Set the value for this field.void
setWidth(int width)
Sets the pixel height for this field.void
setX(int x)
Returns the x coordinate for this field.void
setY(int y)
Set the y coordinate for this field.-
Methods inherited from class com.hellosign.sdk.resource.AbstractResource
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getObject, getString, getWarnings, has, hasString, set, toString, toString
-
-
-
-
Field Detail
-
CUSTOM_FIELD_NAME
public static final java.lang.String CUSTOM_FIELD_NAME
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_TYPE
public static final java.lang.String CUSTOM_FIELD_TYPE
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_API_ID
public static final java.lang.String CUSTOM_FIELD_API_ID
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_VALUE
public static final java.lang.String CUSTOM_FIELD_VALUE
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_EDITOR
public static final java.lang.String CUSTOM_FIELD_EDITOR
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_REQUIRED
public static final java.lang.String CUSTOM_FIELD_REQUIRED
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_X
public static final java.lang.String CUSTOM_FIELD_X
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_Y
public static final java.lang.String CUSTOM_FIELD_Y
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_WIDTH
public static final java.lang.String CUSTOM_FIELD_WIDTH
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_HEIGHT
public static final java.lang.String CUSTOM_FIELD_HEIGHT
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_AVG_TEXT_LENGTH
public static final java.lang.String CUSTOM_FIELD_AVG_TEXT_LENGTH
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_NUM_LINES
public static final java.lang.String CUSTOM_FIELD_NUM_LINES
- See Also:
- Constant Field Values
-
CUSTOM_FIELD_NUM_CHARS_PER_LINE
public static final java.lang.String CUSTOM_FIELD_NUM_CHARS_PER_LINE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CustomField
public CustomField()
-
CustomField
public CustomField(org.json.JSONObject json) throws HelloSignException
- Throws:
HelloSignException
-
-
Method Detail
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String name)
Set the name of this custom field.- Parameters:
name
- String
-
getType
public FieldType getType()
-
setType
public void setType(FieldType type)
Set the type for this custom field.- Parameters:
type
- FieldType
-
getTypeString
public java.lang.String getTypeString()
-
getValue
public java.lang.String getValue()
-
setValue
public void setValue(java.lang.String value)
Set the value for this field.- Parameters:
value
- String
-
getApiId
public java.lang.String getApiId()
-
setApiId
public void setApiId(java.lang.String apiId)
Set the API ID for this custom field.- Parameters:
apiId
- String
-
getEditor
public java.lang.String getEditor()
-
setEditor
public void setEditor(java.lang.String editor)
Specify what signer role may edit this field.- Parameters:
editor
- String
-
isRequired
public java.lang.Boolean isRequired()
-
setIsRequired
public void setIsRequired(java.lang.Boolean isRequired)
Specify whether this field is required.- Parameters:
isRequired
- Boolean
-
getX
public java.lang.Integer getX()
Returns the x coordinate for this field.- Returns:
- Integer or null if not set
-
setX
public void setX(int x)
Returns the x coordinate for this field.- Parameters:
x
- int pixel coordinate
-
getY
public java.lang.Integer getY()
Returns the y coordinate for this field.- Returns:
- Integer or null if not set
-
setY
public void setY(int y)
Set the y coordinate for this field.- Parameters:
y
- int pixel coordinate
-
getWidth
public java.lang.Integer getWidth()
Returns the pixel width of this field.- Returns:
- Integer or null if not set
-
setWidth
public void setWidth(int width)
Sets the pixel height for this field.- Parameters:
width
- int pixel height
-
getHeight
public java.lang.Integer getHeight()
Returns the pixel height of this field.- Returns:
- Integer or null if not set
-
setHeight
public void setHeight(int height)
Sets the pixel height for this field.- Parameters:
height
- int pixel height
-
getEstimatedTextLines
public java.lang.Integer getEstimatedTextLines()
Once processed with a position, height, and width, HelloSign will estimate the number of lines a custom field can contain, along with the number of characters per line. This method will return the estimated average number of lines of text this field can hold.- Returns:
- Integer or null if not set
-
getEstimatedCharsPerLine
public java.lang.Integer getEstimatedCharsPerLine()
Once processed with a position, height, and width, HelloSign will estimate the number of lines a custom field can contain, along with the number of characters per line. This method will return the estimated average number of characters per line this field can hold.- Returns:
- Integer or null if not set
-
-