Skip to content

MCR-3483 object lock for REST API#2606

Merged
sebhofmann merged 11 commits intomainfrom
issues/MCR-3483-object-lock-for-rest-api
Oct 29, 2025
Merged

MCR-3483 object lock for REST API#2606
sebhofmann merged 11 commits intomainfrom
issues/MCR-3483-object-lock-for-rest-api

Conversation

@Mewel
Copy link
Member

@Mewel Mewel commented Aug 7, 2025

@Mewel Mewel requested a review from yagee-de August 7, 2025 13:23
rsteph-de
rsteph-de previously approved these changes Aug 13, 2025
Copy link
Member

@rsteph-de rsteph-de left a comment

Choose a reason for hiding this comment

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

MCRRestAPIObjects is getting longer ...

Is there a possibility to separate the Lock-API calls into another class?
This can be done in a follow-up PR which cleans up the REST-API code.

Otherwise O.K.

@Mewel
Copy link
Member Author

Mewel commented Aug 13, 2025

MCRRestAPIObjects is getting longer ...

Is there a possibility to separate the Lock-API calls into another class? This can be done in a follow-up PR which cleans up the REST-API code.

Otherwise O.K.

I'm doing some changes right now anyway. I could also move it separate if you like.

Edit: question is where too?

@rsteph-de
Copy link
Member

I'm doing some changes right now anyway. I could also move it separate if you like.

This could show as "proof-of-concept" - that it is possible to have multiple RESTController classes with the same path-prefix.

@Mewel Mewel force-pushed the issues/MCR-3483-object-lock-for-rest-api branch from 9a645b7 to 03dcc67 Compare August 13, 2025 13:52
@Mewel Mewel requested a review from rsteph-de August 13, 2025 13:52
@Mewel Mewel force-pushed the issues/MCR-3483-object-lock-for-rest-api branch from ce67545 to 53bfb63 Compare August 14, 2025 12:32
@Mewel Mewel force-pushed the issues/MCR-3483-object-lock-for-rest-api branch from 2d359b8 to bfc48fe Compare October 1, 2025 10:28
@Mewel Mewel requested a review from yagee-de October 2, 2025 10:31
@Mewel Mewel force-pushed the issues/MCR-3483-object-lock-for-rest-api branch from df88c10 to 20b0c44 Compare October 2, 2025 11:28
@Context
UriInfo uriInfo;

@Inject
Copy link
Member

Choose a reason for hiding this comment

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

This is the introduction of the Jersey Dependency Injection mechanismn in MyCoRe (first use).
In my opinion this is a architectural decision that adds "complexity" to the code and should be discussed first in an online meeting..
I tend to stay with "our" MCRConfiguration2.getInstance().

Copy link
Member Author

Choose a reason for hiding this comment

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

I can see your point. And im ok with changing it.

But in general I prefer the default way and for me that would be using the @Inject method, cause its out of the box available without any boilerplate code (and tbh our property injection stuff comes with a lot of it...). The binding happens in MCRRestV2App. I could see using our property configuration there.

We also use the @singleton annotation from the same package. So we kind of mix the stuff already.

Copy link
Member

@yagee-de yagee-de left a comment

Choose a reason for hiding this comment

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

Good work, but a minor issue between interface, implementation and configuration. Maybe the interface is not necessary?

Comment on lines +84 to +85
bind(MCRRestObjectLockServiceImpl.class)
.to(MCRRestObjectLockService.class);
Copy link
Member

Choose a reason for hiding this comment

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

It's either hard coded (no interface) or configurable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can make it configurable.
But an interface is in both cases good. For example if somebody decides to write tests for the MCRRestObjects class. Then you can easily mock the ObjectLockService interface.

yagee-de
yagee-de previously approved these changes Oct 21, 2025
@Mewel Mewel requested review from rsteph-de and yagee-de October 23, 2025 10:19
@Mewel Mewel force-pushed the issues/MCR-3483-object-lock-for-rest-api branch from 2774390 to 46507eb Compare October 23, 2025 10:26
@Mewel Mewel force-pushed the issues/MCR-3483-object-lock-for-rest-api branch from 58ac831 to 0306a39 Compare October 29, 2025 16:57
@sebhofmann sebhofmann merged commit 1e019fc into main Oct 29, 2025
3 checks passed
@sebhofmann sebhofmann deleted the issues/MCR-3483-object-lock-for-rest-api branch October 29, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants