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

Combining Repository Validating Interceptor and IG installments #210

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

jvitrifork
Copy link
Collaborator

@jamesagnew I would like your comments on this way of wiring the interceptors. Is different from the current way of doing it but it is logically the same. I would say it is a bit more type safe and stream lined, but I will only continue doing so if you're ok with it

@jvitrifork
Copy link
Collaborator Author

@tadgh If @jamesagnew is busy doing other stuff I would value your approval / comments on this piece

@tadgh
Copy link
Collaborator

tadgh commented Feb 10, 2021

Heya, I can read over this by EOD hopefully

@jvitrifork jvitrifork changed the title Springified the wiring of interceptors Combining Repository Validating Interceptor and IG installments Feb 10, 2021
Copy link
Collaborator

@tadgh tadgh left a comment

Choose a reason for hiding this comment

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

Looks ok to me with some comments.

@@ -97,6 +97,9 @@
@Autowired
ApplicationContext myApplicationContext;

@Autowired(required = false)
RepositoryValidationInterceptorFactoryR4 factory;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense for the R4 factory to be in BaseJpaREstfulServer? Seems like those repositoryValidationInterceptorFactorys could inherit some interface, and you can autowire the interface.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree - all the leg work had been done so I've introduced the interface

.setName(guide.getValue().getName())
.setVersion(guide.getValue().getVersion())
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL));
PackageInstallOutcomeJson outcome = packageInstallerSvc.install(new PackageInstallationSpec()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't seem like this variable assignment is necessary, though I may just be missing its usage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Was used in a debug session. It shouldn't have survived

}
}

if(factory != null)
interceptorService.registerInterceptor(factory.buildUsingStoredStructureDefinitions());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Its just a style thing, but would appreciate braces around the if, even though its only one line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@jvitrifork jvitrifork merged commit 9b3a89c into rel_5_3_0 Feb 11, 2021
@jvitrifork jvitrifork deleted the interceptor-wiring-rework branch February 11, 2021 10:20
@jvitrifork
Copy link
Collaborator Author

jvitrifork commented Feb 12, 2021

@tadgh any chance you could get @jamesagnew to read my last message I left him at zulip?

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 this pull request may close these issues.

None yet

2 participants