Class JsonPropertyFactory
java.lang.Object
com.atlassian.confluence.plugins.contentproperty.JsonPropertyFactory
Factory for ContentProperty objects
- Since:
- 5.6
-
Constructor Summary
ConstructorDescriptionJsonPropertyFactory
(ContentService contentService, SpaceService spaceService) -
Method Summary
Modifier and TypeMethodDescriptionbuildContentPropertyFrom
(CustomContentEntityObject storageContentProperty, Expansions expansions) Convert the given CustomContentEntityObject into a corresponding ContentProperty.com.google.common.base.Function<CustomContentEntityObject,
JsonContentProperty> com.google.common.base.Function<CustomContentEntityObject,
JsonContentProperty> buildContentPropertyFromFunction
(Content content, Expansions expansions) buildFrom
(Content content, CustomContentEntityObject storageContentProperty, Expansions expansions) Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.buildFrom
(Space space, CustomContentEntityObject storageContentProperty, Expansions expansions) buildFrom
(CustomContentEntityObject storageContentProperty) Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.buildSpacePropertyFrom
(CustomContentEntityObject property, Expansions expansions) Convert the given CustomContentEntityObject into a corresponding SpaceProperty.com.google.common.base.Function<CustomContentEntityObject,
JsonSpaceProperty> buildSpacePropertyFromFunction
(Space space, Expansions expansions) makeVersion
(ContentEntityObject entity) makeVersion
(ContentEntityObject entity, boolean expanded)
-
Constructor Details
-
JsonPropertyFactory
-
-
Method Details
-
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
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
-
makeVersion
-