Class V2ApiUtils


  • public class V2ApiUtils
    extends Object
    Utilities helpful for common V2 API declaration tasks.
    • Method Detail

      • isEnabled

        public static boolean isEnabled()
      • flattenToCommaDelimitedString

        public static void flattenToCommaDelimitedString​(Map<String,​Object> destination,
                                                         List<String> toFlatten,
                                                         String newKey)
      • squashIntoSolrResponseWithoutHeader

        public static void squashIntoSolrResponseWithoutHeader​(SolrQueryResponse rsp,
                                                               JacksonReflectMapWriter mw)
        Convert a JacksonReflectMapWriter (typically a SolrJerseyResponse) into the NamedList on a SolrQueryResponse, omitting the response header
        Parameters:
        rsp - the response to attach the resulting NamedList to
        mw - the input object to be converted into a NamedList
      • squashIntoSolrResponseWithHeader

        public static void squashIntoSolrResponseWithHeader​(SolrQueryResponse rsp,
                                                            JacksonReflectMapWriter mw)
        Convert a JacksonReflectMapWriter (typically a SolrJerseyResponse) into the NamedList on a SolrQueryResponse, including the response header
        Parameters:
        rsp - the response to attach the resulting NamedList to
        mw - the input object to be converted into a NamedList
      • squashIntoNamedList

        public static void squashIntoNamedList​(org.apache.solr.common.util.NamedList<Object> destination,
                                               JacksonReflectMapWriter mw)