Class JsonPropertyFactory
- java.lang.Object
-
- com.atlassian.confluence.plugins.contentproperty.JsonPropertyFactory
-
@Component public class JsonPropertyFactory extends Object
Factory for ContentProperty objects- Since:
- 5.6
-
-
Constructor Summary
Constructors Constructor Description JsonPropertyFactory(ContentService contentService, SpaceService spaceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonContentPropertybuildContentPropertyFrom(CustomContentEntityObject storageContentProperty, Expansions expansions)Convert the given CustomContentEntityObject into a corresponding ContentProperty.com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty>buildContentPropertyFromFunction()com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty>buildContentPropertyFromFunction(Content content, Expansions expansions)JsonContentPropertybuildFrom(Content content, CustomContentEntityObject storageContentProperty, Expansions expansions)Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.JsonSpacePropertybuildFrom(Space space, CustomContentEntityObject storageContentProperty, Expansions expansions)JsonContentPropertybuildFrom(CustomContentEntityObject storageContentProperty)Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.JsonSpacePropertybuildSpacePropertyFrom(CustomContentEntityObject property, Expansions expansions)Convert the given CustomContentEntityObject into a corresponding SpaceProperty.com.google.common.base.Function<CustomContentEntityObject,JsonSpaceProperty>buildSpacePropertyFromFunction(Space space, Expansions expansions)VersionmakeVersion(ContentEntityObject entity)Reference<Version>makeVersion(ContentEntityObject entity, boolean expanded)
-
-
-
Constructor Detail
-
JsonPropertyFactory
@Autowired public JsonPropertyFactory(ContentService contentService, SpaceService spaceService)
-
-
Method Detail
-
buildContentPropertyFromFunction
public com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty> buildContentPropertyFromFunction(Content content, Expansions expansions)
-
buildContentPropertyFromFunction
public com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty> buildContentPropertyFromFunction()
-
buildSpacePropertyFromFunction
public com.google.common.base.Function<CustomContentEntityObject,JsonSpaceProperty> buildSpacePropertyFromFunction(Space space, Expansions expansions)
-
buildContentPropertyFrom
public JsonContentProperty buildContentPropertyFrom(CustomContentEntityObject storageContentProperty, Expansions expansions)
Convert the given CustomContentEntityObject into a corresponding ContentProperty.- Parameters:
storageContentProperty- the storage value to convertexpansions- the properties to expand while building the ContentProperty- Returns:
- the property
- Throws:
NotFoundException- if the referenced owner in the storageContentProperty cannot be found via the ContentService
-
buildSpacePropertyFrom
public JsonSpaceProperty buildSpacePropertyFrom(CustomContentEntityObject property, Expansions expansions)
Convert the given CustomContentEntityObject into a corresponding SpaceProperty.- Parameters:
property- the storage value to convertexpansions- the properties to expand while building the SpaceProperty- Returns:
- the property
- Throws:
NotFoundException- if the referenced owner in the property cannot be found via the SpaceService
-
buildFrom
public JsonContentProperty buildFrom(Content content, CustomContentEntityObject storageContentProperty, Expansions expansions)
Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.- Parameters:
content- the container. This must have been initialized via the ContentService or ContentFactory, rather than deserialized from the clientstorageContentProperty- the storage value to convertexpansions- the properties to expand while building the ContentProperty- Returns:
- the property
-
buildFrom
public JsonContentProperty buildFrom(CustomContentEntityObject storageContentProperty)
Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.- Parameters:
storageContentProperty- the storage value to convert- Returns:
- the property
-
buildFrom
public JsonSpaceProperty buildFrom(Space space, CustomContentEntityObject storageContentProperty, Expansions expansions)
-
makeVersion
public Version makeVersion(ContentEntityObject entity)
-
makeVersion
public Reference<Version> makeVersion(ContentEntityObject entity, boolean expanded)
-
-