Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Merge branch master_260924" #1426

Merged
merged 1 commit into from
Sep 27, 2024
Merged
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
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ jobs:
TYPE: cypress
BROWSER: chrome
CONTEXTPATH: lc

resource_class: xlarge
working_directory: /home/circleci/build
parallelism: 8
Expand Down
2 changes: 1 addition & 1 deletion .circleci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
entrypoint: tail -f /dev/null # Keeps the container running

circleci-aem-cloudready:
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:17689-rel-openjdk11
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:3f4b114b96-openjdk11
depends_on:
- circleci-qp
# Add any additional configurations or environment variables if needed
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

See below for a full list of minimum system requirements for historical versions of the Forms Core Components:


| Forms Core Components | WCM Core Components | AEM 6.5 | Java | Maven |
|-----------------------|---------------------|---------| ----- | ------ |
| 1.1.52 | 2.24.6 | 6.5.20+ | 8, 11 | 3.3.9+ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
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.models.form.Button;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractBaseImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down Expand Up @@ -88,11 +87,6 @@ public String getButtonType() {
return buttonType;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.BUTTON);
}

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_DOR_EXCLUSION)
@Default(booleanValues = false)
protected boolean dorExclusion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.CheckBox;
import com.adobe.cq.forms.core.components.models.form.CheckBoxGroup;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractOptionsFieldImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down Expand Up @@ -84,9 +83,4 @@ public Integer getMaxItems() {
public Type getType() {
return super.getType(); // check box group always has type array // we always return boolean[], string[] or number[]
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.CHECKBOX_GROUP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.ConstraintType;
import com.adobe.cq.forms.core.components.models.form.DatePicker;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;
import com.adobe.cq.forms.core.components.util.ComponentUtils;

Expand Down Expand Up @@ -84,11 +83,6 @@ public Date getExclusiveMinimumDate() {
return ComponentUtils.clone(exclusiveMinimumVaue);
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.DATE_INPUT);
}

public @NotNull Map<ConstraintType, String> getConstraintMessages() {
Map<ConstraintType, String> res = super.getConstraintMessages();
String msg = getConstraintMessage(ConstraintType.MINIMUM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
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.models.form.DropDown;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractOptionsFieldImpl;

@Model(
Expand Down Expand Up @@ -57,9 +56,4 @@ public Integer getMaxItems() {
public Boolean isMultiSelect() {
return multiSelect;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.DROP_DOWN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.adobe.cq.export.json.ExporterConstants;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FileInput;
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;

Expand Down Expand Up @@ -80,11 +79,6 @@ public Type getType() {
}
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.FILE_INPUT);
}

@Override
public Boolean isMultiple() {
return multiSelection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.adobe.cq.export.json.ExporterConstants;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.NumberInput;
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;
import com.adobe.cq.forms.core.components.util.ComponentUtils;
Expand Down Expand Up @@ -130,11 +129,6 @@ public Type getType() {
}
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.NUMBER_INPUT);
}

@PostConstruct
private void initNumberInput() {
Object tempExclusiveMaximumValue = ComponentUtils.getExclusiveValue(exclusiveMaximum, maximumAsStr != null ? maximumAsStr : maximum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.adobe.cq.export.json.ExporterConstants;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.Panel;
import com.adobe.cq.forms.core.components.util.AbstractContainerImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -108,11 +107,6 @@ public Type getType() {
return null;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.PANEL);
}

@Override
@JsonInclude(JsonInclude.Include.NON_NULL)
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.adobe.cq.export.json.ExporterConstants;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.RadioButton;
import com.adobe.cq.forms.core.components.util.AbstractOptionsFieldImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -69,9 +68,4 @@ private void initRadioButtonModel() {
public Orientation getOrientation() {
return orientation;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.RADIO_GROUP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.adobe.cq.export.json.ExporterConstants;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.StaticImage;
import com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl;
import com.day.cq.wcm.foundation.Image;
Expand Down Expand Up @@ -139,9 +138,4 @@ public String getLinkUrl() {
}
return properties;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.IMAGE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.adobe.cq.export.json.ExporterConstants;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.Text;
import com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -70,9 +69,4 @@ public boolean isRichText() {
public String getText() {
return getValue();
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.PLAIN_TEXT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ public boolean isMultiLine() {
public String getFieldType() {
if (isMultiLine()) {
return FieldType.MULTILINE_INPUT.getValue();
} else {
return super.getFieldType();
}
return super.getFieldType(FieldType.TEXT_INPUT);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import com.adobe.cq.forms.core.components.internal.models.v1.form.FormMetaDataImpl;
import com.adobe.cq.forms.core.components.models.form.AutoSaveConfiguration;
import com.adobe.cq.forms.core.components.models.form.Container;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FormClientLibManager;
import com.adobe.cq.forms.core.components.models.form.FormContainer;
import com.adobe.cq.forms.core.components.models.form.FormMetaData;
Expand Down Expand Up @@ -129,11 +128,6 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
@Self(injectionStrategy = InjectionStrategy.OPTIONAL)
private AutoSaveConfiguration autoSaveConfig;

@Override
public String getFieldType() {
return super.getFieldType(FieldType.FORM);
}

@PostConstruct
protected void initFormContainerModel() {
if (request != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import com.adobe.cq.forms.core.components.internal.Heading;
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.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FormTitle;
import com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl;
import com.adobe.cq.forms.core.components.util.ComponentUtils;
Expand Down Expand Up @@ -70,11 +69,6 @@ public class TitleImplV2 extends AbstractFormComponentImpl implements FormTitle

private Heading heading;

@Override
public String getFieldType() {
return super.getFieldType(FieldType.PLAIN_TEXT);
}

/**
* Translation of the title property
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ public enum FieldType {
PANEL("panel"),
FORM("form"),
CHECKBOX_GROUP("checkbox-group"),
IMAGE("image"),
TELEPHONE("tel"),
PASSWORD("password"),
RANGE("range");
IMAGE("image");

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public interface FormContainer extends Container {
*/
String PN_CLIENT_LIB_REF = GuideConstants.CLIENT_LIB_REF;

String DEFAULT_FORMS_SPEC_VERSION = "0.14.1";
String DEFAULT_FORMS_SPEC_VERSION = "0.14.0";

/**
* Returns form metadata {@link FormMetaData}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import com.adobe.aemds.guide.service.GuideException;
import com.adobe.cq.forms.core.components.models.form.Captcha;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
Expand All @@ -32,11 +31,6 @@ public abstract class AbstractCaptchaImpl extends AbstractFieldImpl implements C
@JsonIgnore
public abstract String getProvider();

@Override
public String getFieldType() {
return super.getFieldType(FieldType.CAPTCHA);
}

public abstract Map<String, Object> getCaptchaProperties();

public Map<String, Object> getProperties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Base;
import com.adobe.cq.forms.core.components.models.form.FieldType;

/**
* Abstract class which can be used as base class for {@link Base} implementations.
Expand Down Expand Up @@ -58,9 +57,4 @@ public Object[] getEnums() {
return ComponentUtils.coerce(type, enums);
}
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.CHECKBOX);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class AbstractFormComponentImpl extends AbstractComponentImpl implements
protected String dataRef;

// mandatory property else adapt should fail for adaptive form components
@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_FIELDTYPE)
@ValueMapValue(name = ReservedProperties.PN_FIELDTYPE)
protected String fieldTypeJcr;
private FieldType fieldType;

Expand Down Expand Up @@ -148,9 +148,7 @@ public class AbstractFormComponentImpl extends AbstractComponentImpl implements
@PostConstruct
protected void initBaseModel() {
// first check if this is in the supported list of field type
if (StringUtils.isNotEmpty(fieldTypeJcr)) {
fieldType = FieldType.fromString(fieldTypeJcr);
}
fieldType = FieldType.fromString(fieldTypeJcr);
if (request != null && i18n == null) {
i18n = GuideUtils.getI18n(request, resource);
}
Expand Down Expand Up @@ -218,13 +216,6 @@ public String getFieldType() {
return fieldType.getValue();
}

protected String getFieldType(@Nonnull FieldType defaultFieldType) {
if (fieldType == null) {
return defaultFieldType.getValue();
}
return fieldType.getValue();
}

/**
* Returns {@code true} if form field should be visible, otherwise {@code false}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ public static void testSchemaValidation(@NotNull Object model) {
// create an instance of the JsonSchemaFactory using version flag
JsonSchemaFactory schemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);
try {
InputStream schemaStream = Utils.class.getResourceAsStream("/schema/0.14.1/adaptive-form.schema.json");
InputStream schemaStream = Utils.class.getResourceAsStream("/schema/0.14.0/adaptive-form.schema.json");
JsonSchema schema = schemaFactory.getSchema(schemaStream);
// read data from the stream and store it into JsonNode
JsonNode json = objectMapper.readTree(jsonStream);
// if there is a version bump of schema, then it needs to be validated against its corresponding sling model here
// by explicitly checking the model implementation
if (!(model instanceof FormContainerImpl)) {
InputStream formContainerTemplate = Utils.class.getResourceAsStream("/schema/0.14.1/form.json");
InputStream formContainerTemplate = Utils.class.getResourceAsStream("/schema/0.14.0/form.json");
JsonNode formContainerTemplateNode = objectMapper.readTree(formContainerTemplate);
((ObjectNode) formContainerTemplateNode).putArray("items").add(json);
json = formContainerTemplateNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public class ButtonImplTest {
private static final String CONTENT_ROOT = "/content";
private static final String PATH_BUTTON_1 = CONTENT_ROOT + "/button";
private static final String PATH_BUTTON_CUSTOMIZED = CONTENT_ROOT + "/button-customized";
private static final String PATH_BUTTON_NO_FIELDTYPE = CONTENT_ROOT + "/button-without-fieldtype";
private final AemContext context = FormsCoreComponentTestContext.newAemContext();

@BeforeEach
Expand Down Expand Up @@ -142,10 +141,4 @@ void testGetProperties() {
Button button = Utils.getComponentUnderTest(PATH_BUTTON_1, Button.class, context);
assertEquals("button", button.getProperties().get("fd:buttonType"));
}

@Test
void testNoFieldType() {
Button button = Utils.getComponentUnderTest(PATH_BUTTON_NO_FIELDTYPE, Button.class, context);
assertEquals(FieldType.BUTTON.getValue(), button.getFieldType());
}
}
Loading
Loading