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

Investigate in providing a JAX-RS based endpoint #16

Open
poikilotherm opened this issue May 10, 2022 · 1 comment
Open

Investigate in providing a JAX-RS based endpoint #16

poikilotherm opened this issue May 10, 2022 · 1 comment

Comments

@poikilotherm
Copy link
Member

poikilotherm commented May 10, 2022

Currently, Dataverse uses a very classic Servlet although it's a Jakarta EE application.

Maybe it would be a good thing to provide a sane but extensible JAX-RS based endpoint implementation as a separate module?

@poikilotherm
Copy link
Member Author

poikilotherm commented May 12, 2022

Looked at this again briefly.

When using a JAX-RS endpoint instead of a servlet, the main entry point is DataProvider.handle(), receiving an OAIRequest or a Builder<OAIRequest>.

This is handed down in a few different ways as a Request object (which is the model for the OAI-PMH <request> response part) and as a OAICompiledRequest. The compilation of this request object does validation on creation etc.

A JAX-RS endpoint might make use of an @BeanParameter, injecting the POJO directly. The OAICompiledRequest could be declared an interface with a reasonable default implementation.

A distinct JAX-RS module (or within same module but with JAX-RS made an optional dependency) might provide another implementation using @QueryParam data binding and JAX-RS based validation.

(The validation would be moved outside of OAIRequest, so it can be reused.)

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

No branches or pull requests

1 participant