Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

3324: Changed using of DefaultPatientTemplateService service bean #9

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

druchniewicz
Copy link
Collaborator

No description provided.

@@ -170,6 +170,6 @@ private boolean isPatientTemplatesShouldNotBeCreated(String gpKey) {
}

private DefaultPatientTemplateService getDefaultPatientTemplateService() {
return Context.getService(DefaultPatientTemplateService.class);
return Context.getRegisteredComponent("clfMultiProjectDefaultPatientTemplateService", DefaultPatientTemplateService.class);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the bean name required?

Do I understand correctly? There is a default implementation of DefaultPatientTemplateService, then there is another implementation of DefaultPatientTemplateService which applies Multi-Project logic. The getService doesn't support 'service override', and getRegisteredComponent does - getRegisteredComponent returns correct bean?

Copy link
Collaborator Author

@druchniewicz druchniewicz Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, in this place Context.getService(DefaultPatientTemplateService.class) always returns DefaultPatientTemplate service which is a default implementation. I had to pass concrete name of bean to obtain multi-project implementation of this service (that's why getRegisteredComponent has been used)

@pwargulak pwargulak merged commit ac9e16b into main Jun 25, 2024
1 check failed
@pwargulak pwargulak deleted the feature/3324 branch June 25, 2024 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants