public abstract class AbstractRequest extends AbstractResource
Modifier and Type | Field and Description |
---|---|
static String |
REQUEST_ALLOW_DECLINE |
static String |
REQUEST_ALLOW_REASSIGN |
static String |
REQUEST_CLIENT_ID |
static String |
REQUEST_CUSTOM_FIELDS |
static String |
REQUEST_HIDE_TEXT_TAGS |
static String |
REQUEST_MESSAGE |
static String |
REQUEST_METADATA |
static String |
REQUEST_REDIRECT_URL |
static String |
REQUEST_SUBJECT |
static String |
REQUEST_TEST_MODE |
static String |
REQUEST_TITLE |
static String |
REQUEST_USE_PREEXISTING_FIELDS |
static String |
REQUEST_USE_TEXT_TAGS |
static String |
REQUEST_UX_VERSION |
static int |
UX_VERSION_1 |
static int |
UX_VERSION_2 |
dataObj, warnings
Constructor and Description |
---|
AbstractRequest() |
AbstractRequest(org.json.JSONObject json,
String optionalKey) |
Modifier and Type | Method and Description |
---|---|
void |
addCustomField(CustomField field)
Add the custom field to this request.
|
void |
addDocument(Document doc)
Adds a Document to the signature request.
|
void |
addDocument(Document doc,
int order)
Adds a Document to the signature request at the specific order.
|
void |
addFile(File file)
Adds the file to the request.
|
void |
addFile(File file,
Integer order)
Adds the file to the request in the given order.
|
void |
addFileUrl(String url)
Add a file_url to this request.
|
void |
addMetadata(String key,
String value) |
void |
clearCustomFields()
Clears the current custom fields for this request.
|
void |
clearDocuments()
Remove all documents from this request.
|
String |
getClientId()
The API app client ID that has been associated with this signature
request.
|
List<CustomField> |
getCustomFields()
Gets the custom fields associated with this request, set when sending the
request.
|
List<CustomField> |
getCustomFieldsList()
Deprecated.
Use
getCustomFields() instead. |
Map<String,String> |
getCustomFieldsMap()
Returns the map of custom fields for the request.
|
List<Document> |
getDocuments()
Returns a reference to the list of documents for this request.
|
List<String> |
getFileUrls()
Return the current file_url list.
|
abstract String |
getId() |
Boolean |
getIsDeclinable()
Retrieve the flag that designates whether this request is declinable by
signers.
|
String |
getMessage() |
Metadata |
getMetadata() |
String |
getMetadata(String key) |
boolean |
getOrderMatters()
A flag that determines whether order of the signers list is enforced.
|
Map<String,Serializable> |
getPostFields() |
String |
getRedirectUrl() |
String |
getSubject() |
String |
getTitle() |
int |
getUxVersion()
Return the UX version for this request.
|
boolean |
hasAllowReassign() |
boolean |
hasHideTextTags() |
boolean |
hasMessage() |
boolean |
hasRedirectUrl() |
boolean |
hasSubject() |
boolean |
hasTitle() |
boolean |
hasUsePreexistingFields() |
boolean |
hasUseTextTags() |
boolean |
isAllowReassign() |
Boolean |
isHidingTextTags() |
boolean |
isTestMode() |
Boolean |
isUsingPreexistingFields() |
Boolean |
isUsingTextTags() |
void |
setAllowReassign(boolean b) |
void |
setClientId(String clientId)
Associates this request with an API app.
|
void |
setCustomFields(Map<String,String> fields)
Overwrites the current map of custom fields to the provided map.
|
void |
setCustomFieldValue(String fieldNameOrApiId,
String value)
Adds the value to fill in for a custom field with the given field name.
|
void |
setDocuments(List<Document> docs)
Overwrites this requests document list with the provided document list.
|
void |
setFileUrls(List<String> fileUrls)
Overwrite the current file_url list.
|
void |
setHideTextTags(boolean hideTextTags) |
void |
setIsDeclinable(Boolean isDeclinable)
Designate this request as declinable by signers.
|
void |
setMessage(String message) |
void |
setOrderMatters(boolean b)
Determines whether the order of the signers list is to be enforced.
|
void |
setRedirectUrl(String url) |
void |
setSubject(String subject) |
void |
setTestMode(boolean testMode) |
void |
setTitle(String title) |
void |
setUsePreexistingFields(boolean usePreexistingFields) |
void |
setUseTextTags(boolean useTextTags) |
void |
setUxVersion(int uxVersion)
Set the UX version for this request.
|
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getString, getWarnings, has, hasString, set, toString, toString
public static final String REQUEST_TITLE
public static final String REQUEST_SUBJECT
public static final String REQUEST_MESSAGE
public static final String REQUEST_REDIRECT_URL
public static final String REQUEST_TEST_MODE
public static final String REQUEST_USE_TEXT_TAGS
public static final String REQUEST_USE_PREEXISTING_FIELDS
public static final String REQUEST_HIDE_TEXT_TAGS
public static final String REQUEST_METADATA
public static final String REQUEST_UX_VERSION
public static final String REQUEST_CLIENT_ID
public static final String REQUEST_ALLOW_DECLINE
public static final String REQUEST_ALLOW_REASSIGN
public static final String REQUEST_CUSTOM_FIELDS
public static final int UX_VERSION_1
public static final int UX_VERSION_2
public AbstractRequest()
public AbstractRequest(org.json.JSONObject json, String optionalKey) throws HelloSignException
HelloSignException
public Map<String,Serializable> getPostFields() throws HelloSignException
HelloSignException
public abstract String getId()
public String getTitle()
public void setTitle(String title)
public boolean hasTitle()
public String getSubject()
public void setSubject(String subject)
public boolean hasSubject()
public String getMessage()
public void setMessage(String message)
public boolean hasMessage()
public void setTestMode(boolean testMode)
public boolean isTestMode()
public String getRedirectUrl()
public void setRedirectUrl(String url)
public boolean hasRedirectUrl()
public boolean hasUseTextTags()
public Boolean isUsingTextTags()
public void setUseTextTags(boolean useTextTags)
public boolean hasHideTextTags()
public Boolean isHidingTextTags()
public void setHideTextTags(boolean hideTextTags)
public boolean hasUsePreexistingFields()
public Boolean isUsingPreexistingFields()
public void setUsePreexistingFields(boolean usePreexistingFields)
public Metadata getMetadata()
public void addFile(File file) throws HelloSignException
file
- FileHelloSignException
- thrown if there is a problem attaching the
File to this request.public void addFile(File file, Integer order) throws HelloSignException
file
- Fileorder
- Integer or nullHelloSignException
- thrown if there is a problem attaching the
File to this request.public void addDocument(Document doc) throws HelloSignException
doc
- DocumentHelloSignException
- thrown if null is providedpublic void addDocument(Document doc, int order) throws HelloSignException
doc
- Documentorder
- intHelloSignException
- thrown if null is provided or there is a
problem attaching the Document.public List<Document> getDocuments()
public void setDocuments(List<Document> docs)
docs
- Listpublic void clearDocuments()
public void setOrderMatters(boolean b)
b
- true if the order matters, false otherwisepublic boolean getOrderMatters()
public void addFileUrl(String url)
url
- Stringpublic void setFileUrls(List<String> fileUrls)
fileUrls
- Listpublic void setUxVersion(int uxVersion)
uxVersion
- intpublic int getUxVersion()
public void setClientId(String clientId) throws HelloSignException
clientId
- String client ID of the API app.HelloSignException
- thrown if clientId is nullpublic String getClientId()
public void setIsDeclinable(Boolean isDeclinable)
isDeclinable
- true if declinable, false otherwise (null if the
parameter should be left off)public Boolean getIsDeclinable()
public boolean hasAllowReassign()
public boolean isAllowReassign()
public void setAllowReassign(boolean b)
public void addCustomField(CustomField field)
field
- CustomFieldpublic void setCustomFieldValue(String fieldNameOrApiId, String value)
fieldNameOrApiId
- String name (or "Field Label") of the custom field
to be filled in. The "api_id" can also be used instead of the name.value
- String valuepublic Map<String,String> getCustomFieldsMap()
public List<CustomField> getCustomFields()
public List<CustomField> getCustomFieldsList()
getCustomFields()
instead.public void setCustomFields(Map<String,String> fields)
fields
- Mappublic void clearCustomFields()
Copyright © 2019 HelloSign. All rights reserved.