Package com.hellosign.sdk.resource
Class EmbeddedRequest
- java.lang.Object
-
- com.hellosign.sdk.resource.AbstractResource
-
- com.hellosign.sdk.resource.AbstractRequest
-
- com.hellosign.sdk.resource.EmbeddedRequest
-
public class EmbeddedRequest extends AbstractRequest
Represents an Embedded signature request (either standard or templated). An embedded request is one that can be signed from either within HelloSign or from within an iFrame on your website.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EMBEDDED_CLIENT_ID
-
Fields inherited from class com.hellosign.sdk.resource.AbstractRequest
REQUEST_ALLOW_DECLINE, REQUEST_ALLOW_REASSIGN, REQUEST_CLIENT_ID, REQUEST_CUSTOM_FIELDS, REQUEST_HIDE_TEXT_TAGS, REQUEST_MESSAGE, REQUEST_METADATA, REQUEST_REDIRECT_URL, REQUEST_SUBJECT, REQUEST_TEST_MODE, REQUEST_TITLE, REQUEST_USE_PREEXISTING_FIELDS, REQUEST_USE_TEXT_TAGS, REQUEST_UX_VERSION, UX_VERSION_1, UX_VERSION_2
-
Fields inherited from class com.hellosign.sdk.resource.AbstractResource
dataObj, warnings
-
-
Constructor Summary
Constructors Constructor Description EmbeddedRequest(java.lang.String clientId, AbstractRequest request)
Creates an Embedded signature request using the client ID and the AbstractRequest object provided.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCustomField(CustomField field)
Add the custom field to this request.void
clearCustomFields()
Clears the current custom fields for this request.java.lang.String
getClientId()
Set the client ID of the web app you're using to create this embedded signature request.java.util.List<CustomField>
getCustomFields()
Gets the custom fields associated with this request, set when sending the request.java.util.Map<java.lang.String,java.lang.String>
getCustomFieldsMap()
Returns the map of custom fields for the request.java.lang.String
getId()
java.lang.String
getMessage()
java.util.Map<java.lang.String,java.io.Serializable>
getPostFields()
java.lang.String
getRedirectUrl()
AbstractRequest
getRequest()
Get the AbstractRequest associated with this Embedded signature request.java.lang.String
getSubject()
java.lang.String
getTitle()
boolean
hasMessage()
boolean
hasRedirectUrl()
boolean
hasSubject()
boolean
hasTitle()
boolean
isTestMode()
void
setClientId(java.lang.String clientId)
Set the client ID of the web app you're using to create this embedded signature request.void
setCustomFields(java.util.Map<java.lang.String,java.lang.String> fields)
Overwrites the current map of custom fields to the provided map.void
setCustomFieldValue(java.lang.String fieldNameOrApiId, java.lang.String value)
Adds the value to fill in for a custom field with the given field name.void
setMessage(java.lang.String message)
void
setRedirectUrl(java.lang.String url)
void
setRequest(AbstractRequest request)
Set the AbstractRequest associated with this Embedded signature request.void
setSubject(java.lang.String subject)
void
setTestMode(boolean testMode)
void
setTitle(java.lang.String title)
-
Methods inherited from class com.hellosign.sdk.resource.AbstractRequest
addDocument, addDocument, addFile, addFile, addFileUrl, addMetadata, clearDocuments, getCustomFieldsList, getDocuments, getFileUrls, getIsDeclinable, getMetadata, getMetadata, getOrderMatters, getUxVersion, hasAllowReassign, hasHideTextTags, hasUsePreexistingFields, hasUseTextTags, isAllowReassign, isHidingTextTags, isUsingPreexistingFields, isUsingTextTags, setAllowReassign, setDocuments, setFileUrls, setHideTextTags, setIsDeclinable, setOrderMatters, setUsePreexistingFields, setUseTextTags, setUxVersion
-
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
-
EMBEDDED_CLIENT_ID
public static final java.lang.String EMBEDDED_CLIENT_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EmbeddedRequest
public EmbeddedRequest(java.lang.String clientId, AbstractRequest request)
Creates an Embedded signature request using the client ID and the AbstractRequest object provided. First, instantiate the request object (either a SignatureRequest or TemplateSignatureRequest) and then create your EmbeddedRequest using that object.- Parameters:
clientId
- String client IDrequest
- AbstractRequest
-
-
Method Detail
-
getClientId
public java.lang.String getClientId()
Set the client ID of the web app you're using to create this embedded signature request. See: http://app.hellosign.com/api/embedded- Overrides:
getClientId
in classAbstractRequest
- Returns:
- String client ID
-
setClientId
public void setClientId(java.lang.String clientId)
Set the client ID of the web app you're using to create this embedded signature request. See: http://app.hellosign.com/api/embedded- Overrides:
setClientId
in classAbstractRequest
- Parameters:
clientId
- String client ID
-
getRequest
public AbstractRequest getRequest()
Get the AbstractRequest associated with this Embedded signature request.- Returns:
- AbstractRequest
-
setRequest
public void setRequest(AbstractRequest request)
Set the AbstractRequest associated with this Embedded signature request.- Parameters:
request
- AbstractRequest
-
getPostFields
public java.util.Map<java.lang.String,java.io.Serializable> getPostFields() throws HelloSignException
- Overrides:
getPostFields
in classAbstractRequest
- Throws:
HelloSignException
-
getTitle
public java.lang.String getTitle()
- Overrides:
getTitle
in classAbstractRequest
-
setTitle
public void setTitle(java.lang.String title)
- Overrides:
setTitle
in classAbstractRequest
-
hasTitle
public boolean hasTitle()
- Overrides:
hasTitle
in classAbstractRequest
-
getSubject
public java.lang.String getSubject()
- Overrides:
getSubject
in classAbstractRequest
-
setSubject
public void setSubject(java.lang.String subject)
- Overrides:
setSubject
in classAbstractRequest
-
hasSubject
public boolean hasSubject()
- Overrides:
hasSubject
in classAbstractRequest
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classAbstractRequest
-
setMessage
public void setMessage(java.lang.String message)
- Overrides:
setMessage
in classAbstractRequest
-
hasMessage
public boolean hasMessage()
- Overrides:
hasMessage
in classAbstractRequest
-
isTestMode
public boolean isTestMode()
- Overrides:
isTestMode
in classAbstractRequest
-
setTestMode
public void setTestMode(boolean testMode)
- Overrides:
setTestMode
in classAbstractRequest
-
getRedirectUrl
public java.lang.String getRedirectUrl()
- Overrides:
getRedirectUrl
in classAbstractRequest
-
setRedirectUrl
public void setRedirectUrl(java.lang.String url)
- Overrides:
setRedirectUrl
in classAbstractRequest
-
hasRedirectUrl
public boolean hasRedirectUrl()
- Overrides:
hasRedirectUrl
in classAbstractRequest
-
getId
public java.lang.String getId()
- Specified by:
getId
in classAbstractRequest
-
addCustomField
public void addCustomField(CustomField field)
Description copied from class:AbstractRequest
Add the custom field to this request. This is useful for specifying a pre-filled value and/or a field editor.- Overrides:
addCustomField
in classAbstractRequest
- Parameters:
field
- CustomField
-
setCustomFieldValue
public void setCustomFieldValue(java.lang.String fieldNameOrApiId, java.lang.String value)
Description copied from class:AbstractRequest
Adds the value to fill in for a custom field with the given field name.- Overrides:
setCustomFieldValue
in classAbstractRequest
- Parameters:
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 value
-
getCustomFields
public java.util.List<CustomField> getCustomFields()
Description copied from class:AbstractRequest
Gets the custom fields associated with this request, set when sending the request.- Overrides:
getCustomFields
in classAbstractRequest
- Returns:
- List CustomFields
-
setCustomFields
public void setCustomFields(java.util.Map<java.lang.String,java.lang.String> fields)
Description copied from class:AbstractRequest
Overwrites the current map of custom fields to the provided map. This is a map of String field names to String field values.- Overrides:
setCustomFields
in classAbstractRequest
- Parameters:
fields
- Map
-
getCustomFieldsMap
public java.util.Map<java.lang.String,java.lang.String> getCustomFieldsMap()
Description copied from class:AbstractRequest
Returns the map of custom fields for the request. This is a map of String field names to String field values.- Overrides:
getCustomFieldsMap
in classAbstractRequest
- Returns:
- Map
-
clearCustomFields
public void clearCustomFields()
Description copied from class:AbstractRequest
Clears the current custom fields for this request.- Overrides:
clearCustomFields
in classAbstractRequest
-
-