com.silanis.esl.sdk.builder
Class SignerBuilder

java.lang.Object
  extended by com.silanis.esl.sdk.builder.SignerBuilder

public final class SignerBuilder
extends Object

The SignerBuilder class is a convenient class used to create and customize a signer.


Nested Class Summary
static class SignerBuilder.AuthenticationBuilder
          Authentication builder is a convenient class used to create an Authentication object with email defined as the authentication method.
static class SignerBuilder.ChallengeBuilder
          Challenge builder is a convenient class used to create an Authentication object.
static class SignerBuilder.SMSAuthenticationBuilder
           
 
Field Summary
static int DEFAULT_SIGNING_ORDER
           
 
Method Summary
 Signer build()
          Builds the actual signer object.
 SignerBuilder canChangeSigner()
          The signer can assign someone else to sign the package.
 SignerBuilder challengedWithKnowledgeBasedAuthentication(KnowledgeBasedAuthentication knowledgeBasedAuthentication)
          Adds KBA to the signer.
 SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxCanada signerInformationForEquifaxCanada)
          Adds a signer information for Equifax Canada to the signer.
 SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxCanadaBuilder signerInformationForEquifaxCanadaBuilder)
          Adds a signer information for Equifax Canada to the signer.
 SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxUSA signerInformationForEquifaxUSA)
          Adds a signer information for Equifax USA to the signer.
 SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxUSABuilder signerInformationForEquifaxUSABuilder)
          Adds a signer information for Equifax USA to the signer.
 SignerBuilder challengedWithQuestions(SignerBuilder.ChallengeBuilder challengeBuilder)
           Sets the signer's authentication type to CHALLENGE.
 SignerBuilder deliverSignedDocumentsByEmail()
          Invoking this method results in documents being distributed back to the sender as an email attachments once the package is complete.
static SignerBuilder newSignerFromGroup(GroupId groupId)
          Creates a SignerBuilder object.
static SignerBuilder newSignerPlaceholder(Placeholder placeholder)
          Creates a SignerBuilder object.
static SignerBuilder newSignerWithEmail(String email)
          Creates a SignerBuilder object.
 SignerBuilder replacing(Placeholder placeholder)
          Sets the signer's ID to the placeholder's ID.
 SignerBuilder signingOrder(int signingOrder)
          Sets the signing order.
 SignerBuilder withAttachmentRequirement(AttachmentRequirement attachmentRequirement)
          Adds an attachment requirement for the signer.
 SignerBuilder withAttachmentRequirement(AttachmentRequirementBuilder builder)
          Adds an attachment requirement for the signer.
 SignerBuilder withAuthentication(Authentication authentication)
          Sets the Signer's authentication.
 SignerBuilder withCompany(String company)
          Sets the signer's company name.
 SignerBuilder withCustomId(String id)
          Sets the ID of the signer for this package.
 SignerBuilder withEmailMessage(String message)
          Sets the signer's email message they will receive in the email invitation to start the signing ceremony.
 SignerBuilder withFirstName(String firstName)
          Sets the signer's first name.
 SignerBuilder withLanguage(Locale language)
          Sets the signer's language.
 SignerBuilder withLastName(String lastName)
          Sets the signer's last name.
 SignerBuilder withLocalLanguage()
           
 SignerBuilder withRoleId(String roleId)
          Deprecated. Use withCustomId() from now on. Will get deleted in a future release
 SignerBuilder withSmsSentTo(String phoneNumber)
           Sets the signer's authentication type to SMS.
 SignerBuilder withSSOAuthentication()
           Sets the signer's authentication type to SSO.
 SignerBuilder withTitle(String title)
          Sets the signer's title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SIGNING_ORDER

public static final int DEFAULT_SIGNING_ORDER
See Also:
Constant Field Values
Method Detail

newSignerWithEmail

public static SignerBuilder newSignerWithEmail(String email)

Creates a SignerBuilder object.

Parameters:
email - the signer's email @size(min="6", max="255", valid email address)
Returns:
the signer builder itself

newSignerFromGroup

public static SignerBuilder newSignerFromGroup(GroupId groupId)

Creates a SignerBuilder object.

Parameters:
groupId - the group ID.
Returns:
the signer builder itself

newSignerPlaceholder

public static SignerBuilder newSignerPlaceholder(Placeholder placeholder)

Creates a SignerBuilder object.

Parameters:
placeholder - the placeholder's ID.
Returns:
the signer builder itself

withCustomId

public SignerBuilder withCustomId(String id)
Sets the ID of the signer for this package.

E.g.: the signer's email makes for a good unique ID. [email protected]

Parameters:
id - the signer's ID @size(min="1", max="64")
Returns:
the signer builder itself

replacing

public SignerBuilder replacing(Placeholder placeholder)
Sets the signer's ID to the placeholder's ID.

Parameters:
placeholder -
Returns:

withFirstName

public SignerBuilder withFirstName(String firstName)
Sets the signer's first name.

Parameters:
firstName - the signer's first name @size(min="1", max="64")
Returns:
the signer builder itself

withLastName

public SignerBuilder withLastName(String lastName)
Sets the signer's last name.

Parameters:
lastName - the signer's last name @size(min="1", max="64")
Returns:
the signer builder itself

signingOrder

public SignerBuilder signingOrder(int signingOrder)
Sets the signing order. If all signers can sign in any order, don't set this setting.

E.g.: a signer with a signingOrder of 1 would be required to sign before a signer with a signingOrder of 2, for example.

Parameters:
signingOrder - a value greater than zero
Returns:
the signer builder itself

build

public Signer build()
Builds the actual signer object.

Returns:
the signer object

challengedWithQuestions

public SignerBuilder challengedWithQuestions(SignerBuilder.ChallengeBuilder challengeBuilder)

Sets the signer's authentication type to CHALLENGE.

The signer will be asked to authenticate, before accessing his signing ceremony, by providing answers to authentication questions.

Parameters:
challengeBuilder - the challenge builder
Returns:
the signer builder object itself
See Also:
SignerBuilder.ChallengeBuilder

withSmsSentTo

public SignerBuilder withSmsSentTo(String phoneNumber)

Sets the signer's authentication type to SMS.

The signer will be asked to authenticate, before accessing his signing ceremony, by providing an SMS PIN number that will have been sent by eSignLive to his phone.

Parameters:
phoneNumber - the signer's cellphone number to which the SMS PIN number will be sent @size(min="10", max="40")
Returns:
the signer builder object itself

withSSOAuthentication

public SignerBuilder withSSOAuthentication()

Sets the signer's authentication type to SSO.

Returns:
the signer builder object itself

withAuthentication

public SignerBuilder withAuthentication(Authentication authentication)
Sets the Signer's authentication. The authentication types are email, questions and answers (challenges) or SMS.

Parameters:
authentication - the authentication object
Returns:

withTitle

public SignerBuilder withTitle(String title)

Sets the signer's title.

E.g.: Mr., Mrs., Ms., etc...

Parameters:
title - the signer's title @size(min="0", max="64")
Returns:
the signer builder object itself

withCompany

public SignerBuilder withCompany(String company)

Sets the signer's company name.

Parameters:
company - the signer's company name @size(max="255")
Returns:
the signer builder object itself
Throws:
EslException - throws an exception if signer is a group signer.

withLanguage

public SignerBuilder withLanguage(Locale language)

Sets the signer's language.

Parameters:
language - the signer's language
Returns:
the signer builder object itself
Throws:
EslException - throws an exception if signer is a group signer.

canChangeSigner

public SignerBuilder canChangeSigner()
The signer can assign someone else to sign the package.

Sets the canChangeSigner property to true.

Returns:
the signer builder object itself

withEmailMessage

public SignerBuilder withEmailMessage(String message)
Sets the signer's email message they will receive in the email invitation to start the signing ceremony.

Parameters:
message - the message the signer will receive in the email invitation to start the signing ceremony @size(min="0", max="2000")
Returns:
the signet builder object itself

deliverSignedDocumentsByEmail

public SignerBuilder deliverSignedDocumentsByEmail()

Invoking this method results in documents being distributed back to the sender as an email attachments once the package is complete.

Returns:
the signer builder object itself

withRoleId

@Deprecated
public SignerBuilder withRoleId(String roleId)
Deprecated. Use withCustomId() from now on. Will get deleted in a future release

Parameters:
roleId -
Returns:

withLocalLanguage

public SignerBuilder withLocalLanguage()

withAttachmentRequirement

public SignerBuilder withAttachmentRequirement(AttachmentRequirementBuilder builder)

Adds an attachment requirement for the signer. The attachment requirement is conveniently customized by the builder provided as parameter.

Parameters:
builder - the attachment requirement builder
Returns:
the signer builder object itself
See Also:
AttachmentRequirementBuilder

withAttachmentRequirement

public SignerBuilder withAttachmentRequirement(AttachmentRequirement attachmentRequirement)
Adds an attachment requirement for the signer.

Parameters:
attachmentRequirement - the attachment
Returns:
the signer builder object itself

challengedWithKnowledgeBasedAuthentication

public SignerBuilder challengedWithKnowledgeBasedAuthentication(KnowledgeBasedAuthentication knowledgeBasedAuthentication)

Adds KBA to the signer.

Parameters:
knowledgeBasedAuthentication - knowledge based authentication
Returns:
the signer builder itself

challengedWithKnowledgeBasedAuthentication

public SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxCanadaBuilder signerInformationForEquifaxCanadaBuilder)

Adds a signer information for Equifax Canada to the signer. The signer information is conveniently customized by the builder provided as parameter.

Parameters:
signerInformationForEquifaxCanadaBuilder - the signer builder for Equifax Canada
Returns:
the signer builder itself

challengedWithKnowledgeBasedAuthentication

public SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxCanada signerInformationForEquifaxCanada)

Adds a signer information for Equifax Canada to the signer.

Parameters:
signerInformationForEquifaxCanada - a signer information for Equifax Canada
Returns:
the signer builder itself

challengedWithKnowledgeBasedAuthentication

public SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxUSABuilder signerInformationForEquifaxUSABuilder)

Adds a signer information for Equifax USA to the signer. The signer information is conveniently customized by the builder provided as parameter.

Parameters:
signerInformationForEquifaxUSABuilder - the signer builder for Equifax USA
Returns:
the signer builder itself

challengedWithKnowledgeBasedAuthentication

public SignerBuilder challengedWithKnowledgeBasedAuthentication(SignerInformationForEquifaxUSA signerInformationForEquifaxUSA)

Adds a signer information for Equifax USA to the signer.

Parameters:
signerInformationForEquifaxUSA - a signer information for Equifax USA
Returns:
the signer builder itself


Copyright 2014, Silanis Technology, Inc. All rights reserved.