Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Bug 531986 - Change isQueryResult logic #88

Merged
merged 1 commit into from
Apr 23, 2019
Merged

Conversation

berezovskyi
Copy link
Member

Previously, all arrays were treated as OSLC Query results unless the
array type was explicitly marked with @OslcNotQueryResult annotation.
This prevented from returning arrays of mixed-typed OSLC resources (as
Object[] or IResource[]) because there is no way to annotate those
classes accordingly.

From now on, only arrays returned from JAX-RS methods annotated with
@OslcQueryCapability will be automatically treated as OSLC Query results
(again, unless the returned array type is annotated with the
@OslcNotQueryResult).

Previously, all arrays were treated as OSLC Query results unless the
array type was explicitly marked with @OslcNotQueryResult annotation.
This prevented from returning arrays of mixed-typed OSLC resources (as
Object[] or IResource[]) because there is no way to annotate those
classes accordingly.

From now on, only arrays returned from JAX-RS methods annotated with
@OslcQueryCapability will be automatically treated as OSLC Query results
(again, unless the returned array type is annotated with the
@OslcNotQueryResult).

Signed-off-by: Andrew Berezovskyi <[email protected]>
@berezovskyi
Copy link
Member Author

Requires #22 to be fixed first.

@berezovskyi
Copy link
Member Author

@jadelkhoury @jamsden please review

Copy link
Contributor

@jamsden jamsden left a comment

Choose a reason for hiding this comment

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

What are the implications of this change to existing server and client implementations?

@berezovskyi
Copy link
Member Author

This will have impact on the services that:

  1. Have a JAX-RS method that returns an array of resources, like Requirement[].
  2. The JAX-RS method DOES NOT have @OslcQueryCapability annotation.
  3. Requirement does not have a @ OslcNotQueryResult annotation.
  4. The developer expects Lyo to wrap this array as a Query result.

We expect the number of services impacted to be ZERO.

@jamsden jamsden self-requested a review April 23, 2019 12:42
@berezovskyi
Copy link
Member Author

And no implications for the clients at all

@jadelkhoury jadelkhoury merged commit 631c78a into master Apr 23, 2019
@jadelkhoury jadelkhoury deleted the b531986-query-annot branch April 23, 2019 20:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants