@Override
  public void execute() {
    DocumentPackage template =
        PackageBuilder.newPackageNamed("Template " + getPackageName())
            .describedAs("first message")
            .withEmailMessage(PACKAGE_EMAIL_MESSAGE)
            .withSigner(
                newSignerWithEmail(email1)
                    .withFirstName(PACKAGE_SIGNER1_FIRST)
                    .withLastName(PACKAGE_SIGNER1_LAST)
                    .withTitle(PACKAGE_SIGNER1_TITLE)
                    .withCompany(PACKAGE_SIGNER1_COMPANY)
                    .withCustomId(PACKAGE_SIGNER1_CUSTOM_ID))
            .withDocument(
                DocumentBuilder.newDocumentWithName(DOCUMENT_NAME)
                    .fromStream(documentInputStream1, DocumentType.PDF)
                    .withId(DOCUMENT_ID)
                    .build())
            .build();

    template.setId(eslClient.getTemplateService().createTemplate(template));

    DocumentPackage newPackage =
        PackageBuilder.newPackageNamed(getPackageName())
            .describedAs(PACKAGE_DESCRIPTION)
            .withEmailMessage(PACKAGE_EMAIL_MESSAGE2)
            .withSigner(
                newSignerWithEmail(email2)
                    .withFirstName(PACKAGE_SIGNER2_FIRST)
                    .withLastName(PACKAGE_SIGNER2_LAST)
                    .withTitle(PACKAGE_SIGNER2_TITLE)
                    .withCompany(PACKAGE_SIGNER2_COMPANY)
                    .withCustomId(PACKAGE_SIGNER2_CUSTOM_ID))
            .withSettings(
                DocumentPackageSettingsBuilder.newDocumentPackageSettings()
                    .withoutInPerson()
                    .withoutDecline()
                    .withoutOptOut()
                    .withWatermark()
                    .build())
            .build();

    packageId =
        eslClient.getTemplateService().createPackageFromTemplate(template.getId(), newPackage);
    retrievedPackage = eslClient.getPackage(packageId);
  }
  @Override
  public void execute() {
    DocumentPackage template =
        PackageBuilder.newPackageNamed("Template " + getPackageName())
            .describedAs("first message")
            .withEmailMessage(PACKAGE_EMAIL_MESSAGE)
            .withSigner(SignerBuilder.newSignerPlaceholder(new Placeholder(PLACEHOLDER_ID)))
            .withDocument(
                DocumentBuilder.newDocumentWithName(DOCUMENT_NAME)
                    .fromStream(documentInputStream1, DocumentType.PDF)
                    .withId(DOCUMENT_ID)
                    .withSignature(
                        SignatureBuilder.signatureFor(new Placeholder(PLACEHOLDER_ID))
                            .onPage(0)
                            .atPosition(100, 100))
                    .build())
            .build();

    template.setId(eslClient.getTemplateService().createTemplate(template));

    DocumentPackage newPackage =
        PackageBuilder.newPackageNamed(getPackageName())
            .describedAs(PACKAGE_DESCRIPTION)
            .withEmailMessage(PACKAGE_EMAIL_MESSAGE2)
            .withSigner(
                newSignerWithEmail(email1)
                    .withFirstName(SIGNER1_FIRST)
                    .withLastName(SIGNER1_LAST)
                    .withTitle(SIGNER1_TITLE)
                    .withCompany(SIGNER1_COMPANY)
                    .withCustomId(PLACEHOLDER_ID)
                    .withAttachmentRequirement(
                        AttachmentRequirementBuilder.newAttachmentRequirementWithName(
                                ATTACHMENT_REQUIREMENT_NAME)
                            .withDescription(ATTACHMENT_REQUIREMENT_DESCRIPTION)
                            .isRequiredAttachment()
                            .build()))
            .withSettings(
                DocumentPackageSettingsBuilder.newDocumentPackageSettings().withInPerson().build())
            .build();

    packageId =
        eslClient.getTemplateService().createPackageFromTemplate(template.getId(), newPackage);
    retrievedPackage = eslClient.getPackage(packageId);
  }
  @Override
  public void execute() {

    // Note that the field ID for injected field is not a significant for the field injection.
    // InjectedField list is not returned by the esl-backend.
    DocumentPackage superDuperPackage =
        newPackageNamed(
                "FieldInjectionAndExtractionExample "
                    + new SimpleDateFormat("HH:mm:ss").format(new Date()))
            .withSettings(
                DocumentPackageSettingsBuilder.newDocumentPackageSettings().withInPerson())
            .withSigner(newSignerWithEmail(email1).withFirstName("John").withLastName("Smith"))
            .withDocument(
                newDocumentWithName(DOCUMENT_NAME)
                    .fromStream(documentInputStream1, DocumentType.PDF)
                    .withInjectedField(
                        FieldBuilder.textField()
                            .withName("Text1")
                            .withValue("First Injected Value"))
                    .withInjectedField(
                        FieldBuilder.textField()
                            .withName("Text2")
                            .withValue("Second Injected Value"))
                    .withInjectedField(
                        FieldBuilder.textField()
                            .withName("Text3")
                            .withValue("Third Injected Value"))
                    .withInjectedField(
                        FieldBuilder.textField()
                            .withName("Text4")
                            .withValue("Fourth Injected Value"))
                    .withInjectedField(
                        FieldBuilder.textField()
                            .withName("Text5")
                            .withValue("Fifth Injected Value"))
                    .withInjectedField(
                        FieldBuilder.textField()
                            .withName("Text6")
                            .withValue("À à Â â Æ æ Ç ç È è É é Ê ë")))
            .build();

    packageId = eslClient.createPackage(superDuperPackage);
    retrievedPackage = eslClient.getPackage(packageId);
  }
  @Override
  public void execute() {
    DocumentPackage superDuperPackage =
        newPackageNamed(getPackageName())
            .describedAs("This is a package created using the eSignLive SDK")
            .withSettings(
                DocumentPackageSettingsBuilder.newDocumentPackageSettings().withInPerson())
            .withSigner(newSignerWithEmail(email1).withFirstName("John").withLastName("Smith"))
            .withDocument(
                newDocumentWithName(DOCUMENT_NAME)
                    .fromStream(documentInputStream1, DocumentType.PDF)
                    .withSignature(
                        signatureFor(email1)
                            .onPage(0)
                            .atPosition(400, 100)
                            .withField(
                                textField()
                                    .withId(new FieldId(TEXTFIELD_ID))
                                    .onPage(TEXTFIELD_PAGE)
                                    .atPosition(textfieldPositionX, textfieldPositionY))
                            .withField(
                                checkBox()
                                    .withId(new FieldId(CHECKBOX_1_ID))
                                    .onPage(CHECKBOX_1_PAGE)
                                    .withSize(checkbox1Width, checkbox1Height)
                                    .atPosition(checkbox1PositionX, checkbox1PositionY))
                            .withField(
                                checkBox()
                                    .withId(new FieldId(CHECKBOX_2_ID))
                                    .withValue(CHECKBOX_2_VALUE)
                                    .onPage(CHECKBOX_2_PAGE)
                                    .withSize(checkbox2Width, checkbox2Height)
                                    .atPosition(checkbox2PositionX, checkbox2PositionY))
                            .withField(
                                radioButton(RADIO_1_GROUP)
                                    .withId(new FieldId(RADIO_1_ID))
                                    .onPage(RADIO_1_PAGE)
                                    .withSize(radio1Width, radio1Height)
                                    .atPosition(radio1PositionX, radio1PositionY))
                            .withField(
                                radioButton(RADIO_2_GROUP)
                                    .withId(new FieldId(RADIO_2_ID))
                                    .withValue(RADIO_2_VALUE)
                                    .onPage(RADIO_2_PAGE)
                                    .withSize(radio2Width, radio2Height)
                                    .atPosition(radio2PositionX, radio2PositionY))
                            .withField(
                                dropList()
                                    .withId(new FieldId(DROP_LIST_ID))
                                    .withValue(DROP_LIST_OPTION2)
                                    .withValidation(
                                        FieldValidatorBuilder.basic()
                                            .withOption(DROP_LIST_OPTION1)
                                            .withOption(DROP_LIST_OPTION2)
                                            .withOption(DROP_LIST_OPTION3))
                                    .onPage(DROP_LIST_PAGE)
                                    .withSize(dropListWidth, dropListHeight)
                                    .atPosition(dropListPositionX, dropListPositionY))
                            .withField(
                                textArea()
                                    .withId(new FieldId(TEXT_AREA_ID))
                                    .withValue(TEXT_AREA_VALUE)
                                    .onPage(TEXT_AREA_PAGE)
                                    .withSize(textAreaWidth, textAreaHeight)
                                    .atPosition(textAreaPositionX, textAreaPositionY))
                            .withField(
                                label()
                                    .withId(new FieldId(LABEL_ID))
                                    .withName(LABEL_NAME)
                                    .withValue(LABEL_VALUE)
                                    .onPage(LABEL_PAGE)
                                    .withSize(labelFieldWidth, labelFieldHeight)
                                    .atPosition(labelFieldPositionX, labelFieldPositionY))
                            .withField(
                                datepicker()
                                    .withId(new FieldId(DATEPICKER_ID))
                                    .withName(DATEPICKER_NAME)
                                    .withValue(DATEPICKER_VALUE)
                                    .onPage(DATEPICKER_PAGE)
                                    .withSize(datepickerFieldWidth, datepickerFieldHeight)
                                    .atPosition(datepickerFieldPositionX, datepickerFieldPositionY)
                                    .withValidation(
                                        FieldValidatorBuilder.datepickerFormat(DATEPICKER_FORMAT)
                                            .required()))))
            .build();

    packageId = eslClient.createPackage(superDuperPackage);
    eslClient.sendPackage(packageId);
  }