0

I'm wondering if (and if so, how) it's possible to make RESTEasy return an object with custom atom links, such as links to next/previous page when paginating, particularly what I want to get is something akin to the following:

<collection>
    <start>4</start>
    <values>4</values>
    <total>20</total>

    <item>...</item>
    <item>...</item>
    <item>...</item>
    <item>...</item>

    <atom:link rel="next" href="...?page=3"/>
    <atom:link rel="previous" href="...?page=1"/>
    <atom:link rel="first" href="...?page=1"/>
    <atom:link rel="last" href="...?page=5"/>
</collection>

I've worked out how to give links for discovery, but making custom links like this appears to be more complicated, if at all possible.

Vala
  • 5,628
  • 1
  • 29
  • 55

1 Answers1

0

In the end I've ended up using the <any/> element and creating my own Elements to insert in to the any field of the JAXB objects. That seems to have its own problems, but at least it's a step further.

Community
  • 1
  • 1
Vala
  • 5,628
  • 1
  • 29
  • 55