Extend public interface of SearchService (enhancement)
zipwiz opened this issue · 11 comments
SerchService is somewaht "3/4 OK": There are more "getResult()" signature variants than for "getMyResult()". This is significantly bad if one needs to make calls to (authenticated) /myatom/ URIs and not only (public) /atom/ URIs to lookup "non-public" resources.
Just "complete" what is missing :-)
If you run into gaps, we accept contributions. The contributions are reviewed by the team, and require corresponding tests.
Coud you please simply add this method to SearchService:
/**
* Lists the elements in an Atom entry representing the result returned by a search.
*
* @param query
* Text to search for
* @param Map
* for additional parameters
* @return EntityList<Result>
* @throws ClientServicesException
*/
public EntityList<Result> getMyResultsList(String query,Map<String, List<String>> parameters) throws ClientServicesException {
if(parameters==null){
parameters= new HashMap<String,List<String>>();
}
StringBuilder searchQry = new StringBuilder(SearchUrls.MYSEARCH.format(this, SearchUrls.getQuery(query)));
addUrlParameters(searchQry, parameters);
return getResultEntityList(searchQry.toString(), new HashMap<String,String>());
}
SearchURLs.MYSEARCH makes the difference. This functionality is not reachable by other means due to visibility of required low-level methods.
Q: I do not want to create a new fork for what I want to add, but instead work on my "old" fork. This would cause a chain of empty merge commits to be part of the pull request. Would that be acceptable? Or do i have to fork freshly from the current OpenNTF/SocialSDK master?
accepting fix, no problem
@ManishKataria could you review the code? I'll review with @PeterTanner
@prb112 @ManishKataria @PeterTanner ping. Please.
Obsoleted by another issue.