How 4pointsolutions/fluentformsapi works
Purpose and deployment model
This monorepo provides Java integrations for on-premise Adobe Experience Manager (AEM) Forms: a fluent in-process API, AEM-hosted REST endpoints, Java REST clients, and Spring Boot starters. The core and REST-server artifacts are deployed as OSGi bundles into AEM; client and Spring layers run externally and call AEM over HTTP. Maven reactor roots are pom.xml, fluentforms/pom.xml, rest-services/pom.xml, and spring/pom.xml.
Layered entry points
Consumers select one of four progressively higher-level entry paths:
• AEM OSGi fluent API: service factory and document abstractions for bundle developers: fluentforms/core/src/main/java/com/_4point/aem/fluentforms/factory/ServerFactory.java, fluentforms/core/src/main/java/com/_4point/aem/fluentforms/api/Document.java.
• AEM REST server: servlet-style resource classes expose document operations remotely: rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/forms/RenderPdfForm.java, rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/output/GeneratePdfOutput.java.
• Java REST client: adapters translate fluent service calls to REST requests: rest-services/client/src/main/java/com/_4point/aem/docservices/rest_services/client/RestClient.java, rest-services/jersey-client/src/main/java/com/_4point/aem/docservices/rest_services/client/jersey/JerseyRestClient.java.
• Spring Boot: auto-configured beans, proxy endpoints, and sample application entry points: spring/fluentforms-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/FluentFormsAutoConfiguration.java, spring/fluentforms-sample-cli-app/src/main/java/com/_4point/aem/fluentforms/sampleapp/SimpleSampleApplication.java.
Fluent Forms core boundary
fluentforms/core defines typed service contracts and options around AEM’s native Forms APIs. Major domains are forms, assembler/PDF-A, PDF conversion, document assurance, PDF generation, output, and PDF utilities; representative contracts are fluentforms/core/src/main/java/com/_4point/aem/fluentforms/api/forms/FormsService.java, fluentforms/core/src/main/java/com/_4point/aem/fluentforms/api/assembler/AssemblerService.java, and fluentforms/core/src/main/java/com/_4point/aem/fluentforms/api/output/OutputService.java.
For each domain, public interfaces/options are separated from implementations. *ServiceImpl delegates through Adobe adapters, while “Traditional” implementations bind the existing AEM APIs; safe wrappers isolate exceptions/unsafe behavior. Examples: fluentforms/core/src/main/java/com/_4point/aem/fluentforms/impl/forms/FormsServiceImpl.java, fluentforms/core/src/main/java/com/_4point/aem/fluentforms/impl/forms/AdobeFormsServiceAdapter.java, fluentforms/core/src/main/java/com/_4point/aem/fluentforms/impl/forms/SafeFormsServiceAdapterWrapper.java.
REST request/response flow
External clients construct a configured RestClient and domain adapter; adapters serialize documents, template/data parameters, and options into HTTP requests to AEM REST resources. Server resources parse transport concerns then invoke Fluent Forms/AEM services and return document or operation results. Shared HTTP and parameter handling lives at the server boundary: rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/FormParameters.java, rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/ServletUtils.java.
DataCache is the notable stateful server subsystem, supporting cached request data/prefill beyond otherwise request-oriented transformations: rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/data/DataCache.java, rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/data/DataCacheService.java.
Spring integration and proxying
The default Spring Boot integration configures Fluent Forms service beans plus Spring RestClient transport; the Jersey variant substitutes Jersey transport and proxy handling. Auto-configuration is registered through META-INF/spring imports. Key boundaries: spring/fluentforms-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/AemConfiguration.java, spring/fluentforms-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/AemProxyEndpoint.java, spring/fluentforms-jersey-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/FluentFormsJerseyAutoConfiguration.java.
Sample MVC and Jersey apps demonstrate application-owned endpoints, adaptive-form submission handling, and pluggable local/in-memory data persistence rather than being production platform modules.
Runtime and infrastructure
Material runtimes are Java 17/21, AEM 6.5 LTS as the OSGi host and Adobe Forms provider, Maven artifacts, and Spring Boot 4.x for starter consumers. Network boundaries include REST calls from external Java/Spring applications to AEM and optional reverse-proxy endpoints for AEM form assets/submissions. Artifacts are built/deployed through GitHub Actions workflows, notably .github/workflows/build-and-deploy-all.yml, and published/retrieved via GitHub Packages.
Main entry points: FormsService.java Typed service contracts · RenderPdfForm.java REST resources · build-and-deploy-all.yml GitHub Actions · RestClient.java REST client abstraction
Components 18
AEM OSGi runtime
Bundles deployed into AEM 6.5 LTS.
- Fluent service factory · Creates in-process Fluent Forms services.
fluentforms/core/src/main/java/com/_4point/aem/fluentforms/factory/ServerFactory.java - Document abstraction · Typed document input and output boundary.
fluentforms/core/src/main/java/com/_4point/aem/fluentforms/api/Document.java - Typed service contracts · Forms, assembler, output, conversion, assurance, and utility contracts.
fluentforms/core/src/main/java/com/_4point/aem/fluentforms/api/forms/FormsService.java - Service implementations · Domain implementations delegate to Adobe adapters.
fluentforms/core/src/main/java/com/_4point/aem/fluentforms/impl/forms/FormsServiceImpl.java - Safe Adobe adapters · Wraps native Forms APIs and isolates unsafe behavior.
fluentforms/core/src/main/java/com/_4point/aem/fluentforms/impl/forms/SafeFormsServiceAdapterWrapper.java - Adobe Forms APIs · Native on-premise AEM Forms services.
- REST resources · Exposes document operations over HTTP.
rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/forms/RenderPdfForm.java - Server transport handling · Parses parameters and handles servlet concerns.
rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/FormParameters.java - Request data cache · Caches request data and prefill content.
rest-services/server/src/main/java/com/_4point/aem/docservices/rest_services/server/data/DataCacheService.java
External Java runtime
Client and Spring applications run outside AEM.
- REST client abstraction · Configures transport and domain adapters.
rest-services/client/src/main/java/com/_4point/aem/docservices/rest_services/client/RestClient.java - Jersey transport · Jersey-backed client transport variant.
rest-services/jersey-client/src/main/java/com/_4point/aem/docservices/rest_services/client/jersey/JerseyRestClient.java - Spring auto-configuration · Provides Fluent Forms beans and default REST transport.
spring/fluentforms-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/FluentFormsAutoConfiguration.java - AEM proxy endpoint · Optional reverse proxy for AEM form assets and submissions.
spring/fluentforms-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/AemProxyEndpoint.java - Spring Jersey variant · Substitutes Jersey transport and proxy handling.
spring/fluentforms-jersey-spring-boot-autoconfigure/src/main/java/com/_4point/aem/fluentforms/spring/FluentFormsJerseyAutoConfiguration.java - Sample applications · Demonstrate MVC, Jersey, submissions, and local persistence.
spring/fluentforms-sample-cli-app/src/main/java/com/_4point/aem/fluentforms/sampleapp/SimpleSampleApplication.java
Build and delivery
- Maven reactor · Builds the monorepo artifacts.
pom.xml - GitHub Actions · Builds, deploys, and publishes artifacts.
.github/workflows/build-and-deploy-all.yml - GitHub Packages
Connections 19
- Maven reactor → GitHub Actions: build workflow
- GitHub Actions → GitHub Packages: publishes artifacts
- GitHub Packages → Spring auto-configuration: starter dependency
- GitHub Actions → Fluent service factory: deploys OSGi bundle
- Fluent service factory → Typed service contracts: creates services
- Typed service contracts → Document abstraction: uses documents
- Typed service contracts → Service implementations: implemented by
- Service implementations → Safe Adobe adapters: delegates through
- Safe Adobe adapters → Adobe Forms APIs: invokes
- REST resources → Server transport handling: uses
- Server transport handling → Request data cache: reads and stores prefill data
- REST resources → Typed service contracts: invokes Fluent services
- REST client abstraction → REST resources: HTTP requests to AEM
- Jersey transport → REST client abstraction: implements transport
- Spring auto-configuration → REST client abstraction: configures beans
- Spring Jersey variant → Jersey transport: configures
- Sample applications → Spring auto-configuration: uses starter
- Sample applications → AEM proxy endpoint: exposes application endpoints
- AEM proxy endpoint → REST resources: proxies AEM HTTP