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

Add CallContext to getListing inside AbstractListingResourceWithGenericId #38

Open
matthiasohst opened this issue Feb 18, 2020 · 1 comment

Comments

@matthiasohst
Copy link

In order to set the allowed values in the returned schema dynamically, the getListing method of the class AbstractListingResourceWithGenericId should use a CallContext.

For example, if the method

protected CallContext getCallContextForListing(SearchQueryBean searchQueryBean) {
    return Parameter.createContext();
}

is added and the line

return lf.forCall(rel, r -> r.getListing(searchQueryBean));

in the method getListing is replaced by

return lf.forCall(rel, r -> r.getListing(searchQueryBean), getCallContextForListing(searchQueryBean));

then everything should be working as before, with the option to provide a CallContext dynamically.

Similarly, one could also add a CallContext to the link REL_INSTANCE inside the method getListing as well as to those links generated for SummaryType and FullType.

@JoergAdler
Copy link
Contributor

Hi @matthiasohst,

good idea. Would you mind to provide a pull request for this?

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

No branches or pull requests

2 participants