Custom Components, APIs, and OSGi/Java Development
Extension points
Custom development targets Adaptive Form components (client libraries, custom widgets), custom submit actions, custom workflow steps, and Java APIs for Document Services and FDM. Know the OSGi component model: @Component, @Service, @Reference, configuration PIDs, and the distinction between immediate and delayed components.
APIs to know
Document Services Java APIs (Output, Assembler, PDF Generator), FDM service invocation APIs, and workflow WorkflowProcess implementations. Understand servlet registration via @SlingServlet/resource types and how to expose custom endpoints securely.
Traps
- Referencing a service without a satisfied dependency, causing the component to stay unsatisfied.
- Using static state across requests in an OSGi service.
- Forgetting to register custom submit actions so they appear in the author UI.
- Ignoring thread-safety when calling Document Services concurrently.
Worked example
A custom submit action must call an FDM write service and then Assembler. Implement a WorkflowProcess or submit-action service, inject the FDM and Assembler services via @Reference, handle exceptions, and avoid holding large PDFs in memory longer than needed. If the component is unsatisfied at runtime, check the reference target and configuration PID first.