OpenNTF/SocialSDK

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?

I added some more stuff to fill up the gaps with #1678 . Take a look and decide.

waits for accepting #1682 to fix #1677 . After this a separate pull request to resolve this will follow.

accepting fix, no problem

solution should be #1683 .

@ManishKataria could you review the code? I'll review with @PeterTanner

@zipwiz it's my task to review and decide how to handle your extensions.

Obsoleted by another issue.