Skip to content

Make PrintConfig mandatory in the OutputService.generatePrintedOutput() fluent interface #53

@rmcdouga

Description

@rmcdouga

One of the goals of a good fluent interface is that it enforces mandatory parameters when coding to that interface at compile-time (i.e. code won't compile without the mandatory parameters). This is better than allowing a developer to compile their code and then producing an exception at run-time.

AEM requires that the PrintConfig parameter be set but does nothing to require it in the OutputService/PrintedOutputOptions interfaces. We should be able to do better than that.

By replacing the generatePrintedOutput() method with a new generatePrintedOutput(PrintConfig printConfig) method we force the developer to provide a PrintConfig at compile time. In order to maintain compatibility with existing code, generatePrintedOutput() willl be retained, but deprecated.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions