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

XWIKI-22681: Provide a relative ResourceReferenceEntityReferenceResolver #3673

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

surli
Copy link
Member

@surli surli commented Nov 22, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-22681

TODO

  • Add missing tests for Page/PageAttachment resources

Changes

Description

  • Provide implementation for a RelativeResourceReferenceEntityReferenceResolver
  • Resolution of untyped document references is closely related to resolution performed by the default resolver, except when it's not possible to have info about the parent. We need to ensure we agree on this implem. Note that it also impacts resolution of attachment resources.

Clarifications

Screenshots & Video

Executed Tests

Run mvn clean install -Pquality on module xwiki-platform-rendering-xwiki. Now this component implem is used for #3654 so integration tests are executed in that one.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 16.10.x since we need that to fix XWIKI-22571

// TODO: check that this assert is ok, we don't get the default page since we don't have any info to properly
// resolve the absolute ref (no wiki, no base reference)
assertEquals(PAGE_ENTITY_REFERENCE,
this.resolver.resolve(documentResource(SPACE + '.' + PAGE, false), null));
Copy link
Member Author

Choose a reason for hiding this comment

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

This assertion is probably the first one we should ensure we agree on.

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.

1 participant