|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.search.v2.lucene.AbstractLuceneSearchResult
public abstract class AbstractLuceneSearchResult
Constructor Summary | |
---|---|
AbstractLuceneSearchResult()
Deprecated. since 5.2. Use AbstractLuceneSearchResult(com.google.common.base.Function) |
|
AbstractLuceneSearchResult(com.google.common.base.Function<java.lang.String,ConfluenceUser> userLookup)
|
Method Summary | |
---|---|
java.lang.String |
getContent()
Gets the text content of the search result. |
java.lang.Integer |
getContentVersion()
Returns the version of the content if available, or null if there's no version for this result. |
java.util.Date |
getCreationDate()
|
java.lang.String |
getCreator()
Deprecated. |
ConfluenceUser |
getCreatorUser()
Gets the person who created the entity represented by the search result. |
protected java.util.Date |
getDateResult(java.lang.String key)
|
java.lang.String |
getDisplayTitle()
Gets the title of the search result appropriate for displaying to a user. |
protected java.lang.Integer |
getIntegerResult(java.lang.String fieldName)
|
java.util.Set<java.lang.String> |
getLabels(com.atlassian.user.User user)
Gets the labels on the current search result that are visible to the specified user. |
java.util.Date |
getLastModificationDate()
Gets the last modification date of the entity represented by the search result. |
java.lang.String |
getLastModifier()
Deprecated. |
ConfluenceUser |
getLastModifierUser()
Gets the last person to modify the entity represented by the search result. |
java.lang.String |
getLastUpdateDescription()
Gets some string describing the last modification to this content. |
java.lang.String |
getOwnerTitle()
If this result represents an attachment then this field will return the title of the page or blog post the attachment is attached to. |
java.lang.String |
getOwnerType()
If this result represents an attachment then this field will return the type of the container, a page or blogpost. |
java.util.Set<java.lang.String> |
getPersonalLabels()
Gets all the personal labels on the current search result. |
java.lang.String |
getSpaceKey()
|
java.lang.String |
getSpaceName()
|
protected java.lang.String |
getStringResult(java.lang.String... fieldNames)
Retrieves the value for the specified field name. |
java.lang.String |
getType()
Gets a string representation of the type of the entity represented by the search result. |
java.lang.String |
getUrlPath()
Gets the URL path to the search result, relative to the site's context root. |
protected ConfluenceUser |
getUserResult(java.lang.String fieldName)
Attempts to resolve the contents of the given field as a ConfluenceUser . |
protected boolean |
hasLabels(java.util.Map<java.lang.String,?> results)
|
boolean |
isHomePage()
Checks if the search result represents the homepage of a space. |
protected java.util.Map<java.lang.String,java.lang.String> |
mapExtraFields()
|
protected void |
populatePersonalLabels(org.apache.lucene.document.Document document)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.search.v2.SearchResult |
---|
getExtraFields, hasLabels |
Methods inherited from interface com.atlassian.confluence.search.v2.BaseSearchResult |
---|
getField, getHandle, isFieldRequested |
Constructor Detail |
---|
public AbstractLuceneSearchResult(com.google.common.base.Function<java.lang.String,ConfluenceUser> userLookup)
@Deprecated public AbstractLuceneSearchResult()
AbstractLuceneSearchResult(com.google.common.base.Function)
Method Detail |
---|
protected void populatePersonalLabels(org.apache.lucene.document.Document document)
protected boolean hasLabels(java.util.Map<java.lang.String,?> results)
public java.util.Set<java.lang.String> getLabels(com.atlassian.user.User user)
SearchResult
getLabels
in interface SearchResult
user
- filter labels by this user
public java.util.Set<java.lang.String> getPersonalLabels()
SearchResult
getPersonalLabels
in interface SearchResult
public java.lang.String getContent()
SearchResult
getContent
in interface SearchResult
public java.lang.String getType()
SearchResult
ContentEntityObject.getType()
getType
in interface SearchResult
ContentTypeAware.getType()
public boolean isHomePage()
SearchResult
isHomePage
in interface SearchResult
public java.util.Date getCreationDate()
getCreationDate
in interface SearchResult
@Deprecated public java.lang.String getCreator()
getCreator
in interface SearchResult
public ConfluenceUser getCreatorUser()
SearchResult
getCreatorUser
in interface SearchResult
public java.lang.String getOwnerType()
SearchResult
getOwnerType
in interface SearchResult
public java.lang.String getOwnerTitle()
SearchResult
getOwnerTitle
in interface SearchResult
public java.lang.Integer getContentVersion()
SearchResult
null
if there's no version for this result.
getContentVersion
in interface SearchResult
public java.util.Date getLastModificationDate()
SearchResult
getLastModificationDate
in interface SearchResult
@Deprecated public java.lang.String getLastModifier()
getLastModifier
in interface SearchResult
public ConfluenceUser getLastModifierUser()
SearchResult
getLastModifierUser
in interface SearchResult
public java.lang.String getDisplayTitle()
SearchResult
getDisplayTitle
in interface SearchResult
Addressable.getDisplayTitle()
public java.lang.String getUrlPath()
SearchResult
getUrlPath
in interface SearchResult
Addressable.getUrlPath()
public java.lang.String getLastUpdateDescription()
SearchResult
This string is user-supplied, and therefore not internationalised
getLastUpdateDescription
in interface SearchResult
ContentEntityObject.getVersionComment()
public java.lang.String getSpaceName()
getSpaceName
in interface SearchResult
public java.lang.String getSpaceKey()
getSpaceKey
in interface SearchResult
protected java.lang.String getStringResult(java.lang.String... fieldNames)
fieldNames
- field name(s) to retrieve a value for
protected ConfluenceUser getUserResult(java.lang.String fieldName)
ConfluenceUser
.
The method first attempts to resolve the user using the field value as a UserKey
. If that fails,
it tries to resolve the user using the field value as a username. If that fails, it returns null.
This is necessary because the same DocumentFieldName.LAST_MODIFIER_NAME
and
ContentEntityMetadataExtractor.CREATOR_NAME_FIELD
fields are used both to store userkeys (post-upgrade)
and usernames (pre-upgrade).
protected java.util.Date getDateResult(java.lang.String key)
protected java.lang.Integer getIntegerResult(java.lang.String fieldName)
protected java.util.Map<java.lang.String,java.lang.String> mapExtraFields()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |