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

Update Application class based on changes to fflib_Application #28

Open
ImJohnMDaniel opened this issue Dec 28, 2019 · 4 comments
Open
Assignees

Comments

@ImJohnMDaniel
Copy link
Collaborator

The fflib_Application class has been enhanced so that an extension is possible. Changes are needed to Application to account for this

see fflib-apex-common #257 for more information

@ImJohnMDaniel ImJohnMDaniel self-assigned this Dec 28, 2019
@ClayChipps
Copy link
Contributor

ClayChipps commented May 2, 2021

@ImJohnMDaniel So I have investigated this, and from initial observation I don't believe we will be able to leverage extending the fflib_Application class. The current issue is that there is not a 0-arg constructor defined on the Factory inner classes in the fflib_Application class.

The only way I see us being able to do this currently, would be to super the existing constructors and pass empty/null values to them. This seems a little.....silly.

I would think the better solution would be to implement 0-arg constructors on the fflib_Application Factory inner classes, but that would obviously require a change to the fflib_Application class.

Additionally, the current setMock methods are private virtual, which cannot be overridden by the extending class. These would need to be updated to be protected virtual so that we could override the setMock behavior on the extended class.

@stohn777
Copy link
Collaborator

stohn777 commented May 3, 2021

@ctchipps

These seem like reasonable changes for Apex Commons, since extending the Application Class is a much needed feature. Do y'all have the bandwidth to PR that to Commons? I'm in favor of it.

cc @ImJohnMDaniel

@ClayChipps
Copy link
Contributor

@stohn777 Already in progress, should be up this evening. :)

@ClayChipps
Copy link
Contributor

@ImJohnMDaniel @stohn777 PR open over on the apex commons repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants