Class ExtRepositorySearchResult<T extends ExtRepositoryObject>

java.lang.Object
com.liferay.document.library.repository.external.ExtRepositorySearchResult<T>

public class ExtRepositorySearchResult<T extends ExtRepositoryObject> extends Object
Holds search results to be returned by the ExtRepository.search(SearchContext, Query, ExtRepositoryQueryMapper) method.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExtRepositorySearchResult(T object, float score, String snippet)
    Creates the search result matching the external repository object, score, and snippet.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the external repository object associated with the search result.
    float
    Returns the score (between 0 and 1) associated with the search result.
    Returns the text snippet to highlight when displaying the search results in the UI.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExtRepositorySearchResult

      public ExtRepositorySearchResult(T object, float score, String snippet)
      Creates the search result matching the external repository object, score, and snippet.
      Parameters:
      object - the repository object found by the search (file, folder, or both)
      score - the score (between 0 and 1) assigned to the repository object by the search engine.
      snippet - the snippet used for highlighting when displaying the search results in the UI
  • Method Details

    • getObject

      public T getObject()
      Returns the external repository object associated with the search result.
      Returns:
      the external repository object associated with the search result
    • getScore

      public float getScore()
      Returns the score (between 0 and 1) associated with the search result.
      Returns:
      the score associated with the search result
    • getSnippet

      public String getSnippet()
      Returns the text snippet to highlight when displaying the search results in the UI.
      Returns:
      the text snippet to highlight when displaying the search results in the UI