Class DefaultContentEntityBuilder<T extends ContentEntityObject>
- java.lang.Object
-
- com.atlassian.confluence.plugins.rest.entities.builders.DefaultContentEntityBuilder<T>
-
- All Implemented Interfaces:
ContentEntityBuilder<T>
,SearchEntityBuilder
- Direct Known Subclasses:
CustomContentEntityBuilder
,WikiLinkableContentEntityBuilder
public class DefaultContentEntityBuilder<T extends ContentEntityObject> extends Object implements SearchEntityBuilder, ContentEntityBuilder<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected GlobalSettingsManager
settingsManager
-
Constructor Summary
Constructors Constructor Description DefaultContentEntityBuilder(GlobalSettingsManager settingsManager, DateEntityFactory dateEntityFactory, UserEntityHelper userEntityHelper)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchResultEntity
build(SearchResult result)
Builds a REST ContentEntity for the given search resultSearchResultEntity
build(SearchResult result)
Builds a REST ContentEntity for the given search resultContentEntity
build(T object)
Builds a REST ContentEntity for the given CEOstatic SpaceEntity
createSpaceEntity(Space space)
-
-
-
Field Detail
-
settingsManager
protected final GlobalSettingsManager settingsManager
-
-
Constructor Detail
-
DefaultContentEntityBuilder
public DefaultContentEntityBuilder(GlobalSettingsManager settingsManager, DateEntityFactory dateEntityFactory, UserEntityHelper userEntityHelper)
-
-
Method Detail
-
build
public SearchResultEntity build(SearchResult result)
Description copied from interface:SearchEntityBuilder
Builds a REST ContentEntity for the given search result- Specified by:
build
in interfaceSearchEntityBuilder
- Parameters:
result
- theSearchResult
- Returns:
- the entity, or
null
if the current user is not permitted to view the content or if no content object can be found for the given result.
-
build
public SearchResultEntity build(SearchResult result)
Description copied from interface:SearchEntityBuilder
Builds a REST ContentEntity for the given search result- Specified by:
build
in interfaceSearchEntityBuilder
- Parameters:
result
- theSearchResult
- Returns:
- the entity, or
null
if the current user is not permitted to view the content or if no content object can be found for the given result.
-
build
public ContentEntity build(T object)
Description copied from interface:ContentEntityBuilder
Builds a REST ContentEntity for the given CEO- Specified by:
build
in interfaceContentEntityBuilder<T extends ContentEntityObject>
- Parameters:
object
- theContentEntityObject
- Returns:
- the entity, or
null
if the current user is not permitted to view the content or if no content object can be found for the given object.
-
createSpaceEntity
public static SpaceEntity createSpaceEntity(Space space)
-
-