[MGNLREST-188] Make JCRDeliveryEndpoint extendable Created: 29/May/18 Updated: 26/Jan/21 |
|
| Status: | Open |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Jordie Diepeveen | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
The JCRDeliveryEndpoint allows used to easily create an endpoint using some default settings which can be specified in the endpoint definition (JcrDeliveryEndpointDefinition). The JCRDeliveryEndpoint contains some really useful informatie, like the reference resolvers which can be used for retrieving images, contact, etc.. With the current implementation of the JCRDeliveryEndpoint it's not possible to extend it correctly. To create an endpoint with the same functionality (use reference resolvers), but to only build a custom NodeIterator, you need to copy over most of the private method. Please make retrieval of the nodes overridable or make the methods like #initReferenceContext, #instantiatePredicate, #instantiateResolver, #shouldSupportI18n and the private class ReferenceResolverWrapper protected so we can extend the JCREndpointDefinition without copying all the private methods. |
| Comments |
| Comment by Christopher Zimmermann [ 05/Jan/21 ] |
|
Can you share some examples of how you would like to use this? How would you want to extend the endpoint? |
| Comment by Marc Johnen [ 26/Jan/21 ] |
|
I uploaded an example where I just added one endpoint. I marked what I had to copy from the JcrDeliveryEndpoint to make it work because methods/classes are private. |