Class SearchResult<T>
java.lang.Object
com.atlassian.confluence.api.model.search.SearchResult<T>
- Type Parameters:
T
- entityRef type - the type of the wrapped result
- All Implemented Interfaces:
com.atlassian.sal.api.search.SearchMatch
- Direct Known Subclasses:
ContentSearchResult
,SpaceSearchResult
,UserSearchResult
public abstract class SearchResult<T>
extends Object
implements com.atlassian.sal.api.search.SearchMatch
A result of a search. SearchResult is a adapter around another result entity to make
representing polymorphic search results simpler. The original entity is available via the
getEntity() method
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SearchResult.Builder<T>
builder
(T entity) final String
com.atlassian.sal.api.search.ResourceType
The top level container of the result that is not contained in another container.Deprecated.getTitle()
getUrl()
-
Method Details
-
getEntity
-
getEntityRef
- Returns:
- a reference to the result entity that this searchResult wraps.
-
getEntityType
-
getTitle
- Specified by:
getTitle
in interfacecom.atlassian.sal.api.search.SearchMatch
-
getExcerpt
- Specified by:
getExcerpt
in interfacecom.atlassian.sal.api.search.SearchMatch
-
getUrl
- Specified by:
getUrl
in interfacecom.atlassian.sal.api.search.SearchMatch
-
getIconCssClass
-
getLastModifiedAt
- Since:
- 8.6
-
getFriendlyLastModified
-
getResultParentRef
-
getResultParent
Deprecated.since 5.9 UsegetResultParentContainer()
instead.- Returns:
- the container of this result if it is different to what is returned by getResultGlobalContainer.
-
getResultParentContainer
- Returns:
- the container of this result if it is different to what is returned by getResultGlobalContainer.
- Since:
- 5.9
-
getResultGlobalContainerRef
-
getResultGlobalContainer
The top level container of the result that is not contained in another container.For example, if this result referenced a comment, a comment is contained in a page, and a page is contained in a space, but a space is not contained in another entity. This method would return a summary of the space.
-
getResourceType
public com.atlassian.sal.api.search.ResourceType getResourceType()- Specified by:
getResourceType
in interfacecom.atlassian.sal.api.search.SearchMatch
-
builder
-
getResultParentContainer()
instead.