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

Enable to add new LdapDicomConfigurationExtension by CDI Producers #2797

Closed
gunterze opened this issue Sep 30, 2020 · 0 comments
Closed

Enable to add new LdapDicomConfigurationExtension by CDI Producers #2797

gunterze opened this issue Sep 30, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gunterze
Copy link
Member

gunterze commented Sep 30, 2020

Replace hard-coded list of registered LdapDicomConfigurationExtensions

@ApplicationScoped
public class LdapArchiveConfigurationFactory {
...
   private static final LdapDicomConfigurationExtension[] configExts() {
        return new LdapDicomConfigurationExtension[]{
                new LdapAuditLoggerConfiguration(),
                new LdapAuditRecordRepositoryConfiguration(),
                new LdapImageReaderConfiguration(),
                new LdapImageWriterConfiguration(),
                new LdapArchiveConfiguration(),
                new LdapArchiveUIConfiguration(),
                newLdapHL7Configuration()
        };
    };

by

@ApplicationScoped
public class LdapArchiveConfigurationFactory {
...
    @Inject
    private Instance<LdapDicomConfigurationExtension> configExts;

So a LdapDicomConfigurationExtension can be added by declaring its implementation class as @ApplicationScoped bean, e.g.:

@ApplicationScoped
public class LdapArchiveUIConfiguration extends LdapDicomConfigurationExtension {

or providing it by a Producer method or field, e.g.

    @Produces
    @ApplicationScoped
    private static LdapAuditLoggerConfiguration ldapAuditLoggerConfiguration =
            new LdapAuditLoggerConfiguration();
@gunterze gunterze added the enhancement New feature or request label Sep 30, 2020
@gunterze gunterze added this to the 5.22.6 milestone Sep 30, 2020
@gunterze gunterze self-assigned this Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant