Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

[declarative-linking] - Support query parameters and copy of request query params #263

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

Conversation

fooinha
Copy link

@fooinha fooinha commented Feb 27, 2017

  • New Annotation @LinkQueryParam(name="...", value="...")

    Adds query parameters to Link.

  • New @InjectLink attributes :

    boolean copyRequestQueryParams - Specifies that request query params must be included in Link.
    String[] excludeFromRequestQueryParams - If request query params are copied to inject Link,
    then exclude query parameters from this list.

Useful if the user's needs to inject at Link the request query parameters.
Use case: keep all query parameters and create link for next page.

Example:

@InjectLinks({
      @InjectLink(
          value = "${entity.id}",
          copyRequestQueryParams = true,
          excludeFromRequestQueryParams = { "page" },
          queryParams = {
              @LinkQueryParam (name = "page", value = "${instance.page}"),
              @LinkQueryParam (name = "type", value = "${instance.type}"),
              }
          ),
         rel = "next"
    })

With unit tests ...

It's compatible with 2.25.x ...

@fooinha fooinha force-pushed the feature/master/declarative-linking/queryParams branch 7 times, most recently from 8459c09 to 2babd91 Compare March 3, 2017 21:16
@fooinha fooinha changed the title [declarative-linking] - Support query parameters [declarative-linking] - Support query parameters and copy Request Query Params Mar 4, 2017
@fooinha fooinha changed the title [declarative-linking] - Support query parameters and copy Request Query Params [declarative-linking] - Support query parameters and copy of request query params Mar 4, 2017
@fooinha fooinha force-pushed the feature/master/declarative-linking/queryParams branch 2 times, most recently from f79190e to 3311b02 Compare March 5, 2017 16:25
@fooinha
Copy link
Author

fooinha commented Mar 28, 2017

Is this useful? If so, can I have this reviewed?

@pavelbucek
Copy link
Member

Thanks for your contribution!

We cannot evaluate and accept your proposal without you signing Oracle Contributor Agreement: http://www.oracle.com/technetwork/community/oca-486395.html. Please let us know whether you plan to do that.

Best regards,
Pavel

@fooinha
Copy link
Author

fooinha commented Apr 7, 2017

Yes, I sent the OCA ... Thanx

@fooinha
Copy link
Author

fooinha commented May 13, 2017

The OCA was approved. Is it possible to resume this?

- New Annotation @LinkQueryParam(name="...", value="...)

  Adds query parameters to Link.

- New @InjectLink attributes :

  boolean copyRequestQueryParams - Specifies that request query params must be include in Link.
  String[] excludeFromRequestQueryParams -  If request query params are copied to inject Link,
                                            then exclude query parameters from this list.

It's compatible with 2.25.x ...
@fooinha fooinha force-pushed the feature/master/declarative-linking/queryParams branch from 3311b02 to 0cf55fd Compare July 13, 2017 19:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants