Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ public Boolean isReadOnly() {
return readOnly;
}

@Override
@JsonInclude(JsonInclude.Include.NON_NULL)
@Nullable
public boolean isWrapData() {
return wrapData;
}

@Override
@JsonIgnore
@NotNull
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

package com.adobe.cq.forms.core.components.internal.models.v1.form;

import java.util.LinkedHashMap;
import java.util.Map;

import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy;
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue;

import com.adobe.cq.export.json.ExporterConstants;

@Model(adaptables = Resource.class)
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class SignerInfoFieldImpl {

private static final String PN_SIGNER_TITLE = "signerTitle";
private static final String PN_COUNTRY_CODE_SOURCE = "countryCodeSource";
private static final String PN_EMAIL = "email";
private static final String PN_EMAIL_SOURCE = "emailSource";
private static final String PN_PHONE_SOURCE = "phoneSource";
private static final String PN_RECIPIENT_ROLE = "recipientRole";
private static final String PN_DELEGATES_TO = "delegatesTo";
private static final String PN_SECURITY_OPTION = "securityOption";

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_SIGNER_TITLE)
private String signerTitle;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_COUNTRY_CODE_SOURCE)
private String countryCodeSource;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_EMAIL)
private String email;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_EMAIL_SOURCE)
private String emailSource;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_PHONE_SOURCE)
private String phoneSource;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_RECIPIENT_ROLE)
private String recipientRole;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_DELEGATES_TO)
private String delegatesTo;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = PN_SECURITY_OPTION)
private String securityOption;

public Map<String, Object> getSignerFieldMap() {
Map<String, Object> signerField = new LinkedHashMap<>();
signerField.put(PN_SIGNER_TITLE, signerTitle);
signerField.put(PN_COUNTRY_CODE_SOURCE, countryCodeSource);
signerField.put(PN_EMAIL, email);
signerField.put(PN_EMAIL_SOURCE, emailSource);
signerField.put(PN_PHONE_SOURCE, phoneSource);
signerField.put(PN_RECIPIENT_ROLE, recipientRole);
signerField.put(PN_DELEGATES_TO, delegatesTo);
signerField.put(PN_SECURITY_OPTION, securityOption);
return signerField;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

package com.adobe.cq.forms.core.components.internal.models.v1.form;

import java.util.*;

import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.Model;

import com.adobe.aemds.guide.model.SignerInfo;
import com.adobe.aemds.guide.model.SignerResource;
import com.adobe.cq.export.json.ExporterConstants;

@Model(adaptables = Resource.class)
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class SignerInfoImpl {
public static Map<String, Object> getSignerDetails(Resource signerInfoResource) {
Map<String, Object> signerProperties = new LinkedHashMap<>();
SignerResource signerResource = signerInfoResource.adaptTo(SignerResource.class);
if (signerResource == null) {
return signerProperties;
}
signerProperties.put("firstSignerFormFiller", signerResource.isFirstSignerFormFiller());
signerProperties.put("workflowType", signerResource.getWorkflowType());
if (signerResource.getAllSignerInfo().size() > 0) {
List<SignerInfo> signersList = signerResource.getAllSignerInfo();
signerProperties.put("signers", signersList);
}
return signerProperties;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@ public interface Panel extends Container, ContainerConstraint {
default Boolean isReadOnly() {
return null;
}

/**
* Checks if the container is wrap data.
*
* @return {@code true} if the container is wrap data, {@code false} otherwise
* @since com.adobe.cq.forms.core.components.models.form 5.3.0
*/
default boolean isWrapData() {
return false;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

package com.adobe.cq.forms.core.components.models.form;

import org.osgi.annotation.versioning.ConsumerType;

@ConsumerType
public interface SignerInfo {

/**
* Check if first signer form filler
*
* @return the firstSignerFormFiller
* @since com.adobe.cq.forms.core.components.models.form 0.0.1
*/
String getFirstSignerFormFiller();

/**
* Returns the workflow type
*
* @return the signer's email
* @since com.adobe.cq.forms.core.components.models.form 0.0.1
*/
String getWorkflowType();

/**
* Returns the signer
*
* @return the signer
* @since com.adobe.cq.forms.core.components.models.form 0.0.1
*/
String[] getSigners();

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import com.adobe.cq.forms.core.components.internal.form.FeatureToggleConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.internal.models.v1.form.SignerInfoImpl;
import com.adobe.cq.forms.core.components.models.form.BaseConstraint;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FormComponent;
Expand Down Expand Up @@ -308,6 +309,7 @@ protected boolean getEditMode() {

public static final String CUSTOM_ASSOCIATE_PROPERTY_WRAPPER = "fd:associate";
public static final String CUSTOM_DOR_PROPERTY_WRAPPER = "fd:dor";
public static final String CUSTOM_SIGNER_PROPERTY_WRAPPER = "fd:signerInfo";
public static final String CUSTOM_DOR_CONTAINER_WRAPPER = "dorContainer";
// used for DOR and SPA editor to work
public static final String CUSTOM_JCR_PATH_PROPERTY_WRAPPER = "fd:path";
Expand Down Expand Up @@ -336,8 +338,9 @@ protected boolean getEditMode() {
if (!getCustomLayoutProperties().isEmpty()) {
properties.put(CUSTOM_PROPERTY_WRAPPER, getCustomLayoutProperties());
}
if (!getDorProperties().isEmpty()) {
properties.put(CUSTOM_DOR_PROPERTY_WRAPPER, getDorProperties());
Map<String, Object> dorProperties = getDorProperties();
if (!dorProperties.isEmpty()) {
properties.put(CUSTOM_DOR_PROPERTY_WRAPPER, dorProperties);
}
Map<String, Object> annotations = getCqAnnotations();
if (annotations != null) {
Expand All @@ -358,6 +361,12 @@ protected boolean getEditMode() {
if (!associateProperties.isEmpty()) {
properties.put(CUSTOM_ASSOCIATE_PROPERTY_WRAPPER, associateProperties);
}

Resource signerInfoResource = resource.getChild(CUSTOM_SIGNER_PROPERTY_WRAPPER);
if (signerInfoResource != null) {
properties.put(CUSTOM_SIGNER_PROPERTY_WRAPPER, SignerInfoImpl.getSignerDetails(signerInfoResource));
}

return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,12 @@
</columns>
</items>
</submitActions>
<signature
jcr:primaryType="nt:unstructured"
jcr:title="Electronic Signature"
sling:resourceType="granite/ui/components/coral/foundation/include"
path="fd/af/authoring/content/coreComponentSign/dialogConfig"
resouceType="granite/ui/components/coral/foundation/container"/>
<dor
granite:class="cmp-adaptiveform-container__dor"
jcr:primaryType="nt:unstructured"
Expand Down
Loading